CVS difference for ai12s/ai12-0021-1.txt

Differences between 1.5 and version 1.6
Log of other versions for file ai12s/ai12-0021-1.txt

--- ai12s/ai12-0021-1.txt	2018/12/07 06:51:06	1.5
+++ ai12s/ai12-0021-1.txt	2018/12/13 00:58:39	1.6
@@ -1,9 +1,8 @@
-!standard 11.4.1(19)                                 18-12-06    AI12-0021-1/04
+!standard 11.4.1(19)                                 18-12-10    AI12-0021-1/05
 !standard A.8.1(15)
 !standard A.8.2(1)
 !standard A.8.2(28.3/4)
 !standard A.8.4(18)
-!standard A.8.4(20)
 !standard A.10.1(85)
 !standard A.10.2(5)
 !standard A.12.1(26)
@@ -12,6 +11,8 @@
 !standard A.16.2(0)
 !standard A.17.1(0)
 !class Amendment 12-03-13
+!status Amendment 1-2012 18-12-10
+!status ARG Approved 10-0-2  18-12-10
 !status work item 12-02-25
 !status received 12-02-25
 !priority High
@@ -40,8 +41,8 @@
 Add after 11.4.1(19):
 
 NOTES
-It is recommended that exception messages requiring non-ASCII characters use 
-UTF-8 encoding.
+UTF-8 encoding (see A.4.11) can be used to represent non-ASCII characters in
+exception messages.
 
 Add after A.8.1(15):
 
@@ -88,24 +89,15 @@
 end Wide_Wide_File_Names;
 
 
-Modify A.8.2(1):
-
-The procedures and functions described in this subclause provide for the control
-of external files; their declarations are repeated in each of the packages for
-sequential, direct, text, {wide text, wide wide text, }and stream input-output.
-For text input-output, the procedures Create, Open, and Reset have additional
-effects described in subclause A.10.2.
-
-
 Add after A.8.2(28.3/4):
 
-The nested package Wide_File_Names provides operations equivalent to those in
-regular Sequential_IO except that Wide_String is used instead of String for the
-name and form of the external file.
-
-The nested package Wide_Wide_File_Names provides operations equivalent to those
-in regular Sequential_IO except that Wide_Wide_String is used instead of String
-for the name and form of the external file.
+The nested package Wide_File_Names provides operations equivalent to the 
+operations of the same name of the outer package except that Wide_String is 
+used instead of String for the name and form of the external file.
+
+The nested package Wide_Wide_File_Names provides operations equivalent to the 
+operations of the same name of the outer package except that Wide_Wide_String 
+is used instead of String for the name and form of the external file.
 
 
 
@@ -138,7 +130,7 @@
    -- File management
 
    procedure Create(File : in out File_Type;
-                    Mode : in File_Mode := InOut_File;
+                    Mode : in File_Mode := Inout_File;
                     Name : in Wide_Wide_String := "";
                     Form : in Wide_Wide_String := "");
 
@@ -154,17 +146,7 @@
 end Wide_Wide_File_Names;
 
 
-Add after A.8.4(20):
-
-The nested package Wide_File_Names provides operations that are the equivalent
-of those for regular Direct_IO except that Wide_String is used instead of String
-for the name and form of the external file.
-
-The nested package Wide_Wide_File_Names provides operations that are the
-equivalent of those for regular Direct_IO except that Wide_Wide_String is used
-instead of String for the name and form of the external file.
 
-
 Add after A.10.1(85):
 
 ... -- Enclosing package Ada.Text_IO
@@ -210,16 +192,6 @@
 end Wide_Wide_File_Names;
 
 
-Add after A.10.2(5):
-
-The nested package Wide_File_Names provides operations equivalent to those in
-regular Text_IO except that Wide_String is used instead of String for the name
-and form of the external file.
-
-The nested package Wide_Wide_File_Names provides operations equivalent to those
-in regular Text_IO except that Wide_Wide_String is used instead of String for
-the name and form of the external file.
-
 
 Add after A.12.1(26):
 
@@ -234,14 +206,14 @@
                      Name : in Wide_String := "";
                      Form : in Wide_String := "");
 
-   procedure Open   (File : in out File_Type;
-                     Mode : in File_Mode;
-                     Name : in Wide_String;
-                     Form : in Wide_String := "");
+   procedure Open (File : in out File_Type;
+                   Mode : in File_Mode;
+                   Name : in Wide_String;
+                   Form : in Wide_String := "");
 
-   function Name    (File : in File_Type) return Wide_String;
+   function Name (File : in File_Type) return Wide_String;
 
-   function Form    (File : in File_Type) return Wide_String;
+   function Form (File : in File_Type) return Wide_String;
 
 end Wide_File_Names;
 
@@ -254,29 +226,18 @@
                      Name : in Wide_Wide_String := "";
                      Form : in Wide_Wide_String := "");
 
-   procedure Open   (File : in out File_Type;
-                     Mode : in File_Mode;
-                     Name : in Wide_Wide_String;
-                     Form : in Wide_Wide_String := "");
+   procedure Open (File : in out File_Type;
+                   Mode : in File_Mode;
+                   Name : in Wide_Wide_String;
+                   Form : in Wide_Wide_String := "");
 
-   function Name    (File : in File_Type) return Wide_Wide_String;
+   function Name (File : in File_Type) return Wide_Wide_String;
 
-   function Form    (File : in File_Type) return Wide_Wide_String;
+   function Form (File : in File_Type) return Wide_Wide_String;
 
 end Wide_Wide_File_Names;
 
 
-Add after A.12.1(33):
-
-The nested package Wide_File_Names provides operations equivalent to those in
-regular Stream_IO except that Wide_String is used instead of String for the name
-and form of the external file.
-
-The nested package Wide_Wide_File_Names provides operations equivalent to those
-in regular Stream_IO except that Wide_Wide_String is used instead of String for
-the name and form of the external file.
-
-
 Add section A.15.1:
 
 A.15.1 The Packages Wide_Command_Line and Wide_Wide_Command_Line
@@ -426,10 +387,10 @@
 Ada.Directories, Ada.Command_Line and Ada.Environment_Variables.
 
 We do not try to add wide versions of exception messages. We want existing
-code to work unmodified. However, A wide exception would either make existing 
-syntax incompatible by making it ambiguous, or would make it painful to use 
-wide messages by not having syntax as an option. Having implementations use 
-multiple formats for exception messages would break techniques where the 
+code to work unmodified. However, a wide exception message would either make 
+existing syntax incompatible by making it ambiguous, or would make it painful 
+to use wide messages by not having syntax as an option. Having implementations 
+use multiple formats for exception messages would break techniques where the 
 values of objects are streamed as part of the message (a common work-around to
 attach values to a raised exception). Instead, we recommend that projects that
 require Wide_Wide_Character messages use UTF-8 encoding.
@@ -438,9 +399,317 @@
 if an implementation was to use UTF-8 encoding for messages, streamed values
 would possibly be destroyed (as upper-128 characters are expanded into two 
 octets).
+
+!corrigendum 11.4.1(19)
+
+@dinsa
+Exception_Message (by default) and Exception_Information should produce 
+information useful for debugging. Exception_Message should be short (about one 
+line), whereas Exception_Information can be long. Exception_Message should not 
+include the Exception_Name. Exception_Information should include both the 
+Exception_Name and the Exception_Message.
+@dinst
+@xindent<@s9<NOTES@hr
+3 UTF-8 encoding (see A.4.11) can be used to represent non-ASCII characters in
+exception messages.>>
+
+
+!corrigendum A.8.1(15)
+
+@dinsa
+@xcode<   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;>
+@dinss
+@xcode<   @b<package> Wide_File_Names @b<is>>
+
+@xcode<      -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create(File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode := Out_File;
+                       Name : @b<in> Wide_String := "";
+                       Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<procedure> Open  (File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode;
+                       Name : @b<in> Wide_String;
+                       Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<function> Name   (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<      @b<function> Form   (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<   @b<end> Wide_File_Names;>
+
+@xcode<   @b<package> Wide_Wide_File_Names @b<is>>
+
+@xcode<       -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create(File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode := Out_File;
+                       Name : @b<in> Wide_Wide_String := "";
+                       Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<procedure> Open  (File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode;
+                       Name : @b<in> Wide_Wide_String;
+                       Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<function> Name   (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<      @b<function> Form   (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<   @b<end> Wide_Wide_File_Names;>
+
+
+!corrigendum A.8.2(28.3/4)
+
+@dinsa
+@xindent<The exception Status_Error is propagated if the file is not open. 
+The exception Mode_Error is propagated if the mode of the file is In_File.>
+@dinss
+The nested package Wide_File_Names provides operations equivalent to the 
+operations of the same name of the outer package except that Wide_String is 
+used instead of String for the name and form of the external file.
+
+The nested package Wide_Wide_File_Names provides operations equivalent to the 
+operations of the same name of the outer package except that Wide_Wide_String 
+is used instead of String for the name and form of the external file.
+
+
+
+!corrigendum A.8.4(18)
+
+@dinsa
+@xcode<   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;>
+@dinss
+@xcode<   @b<package> Wide_File_Names @b<is>>
+
+@xcode<      -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create(File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode := Inout_File;
+                       Name : @b<in> Wide_String := "";
+                       Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<procedure> Open  (File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode;
+                       Name : @b<in> Wide_String;
+                       Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<function> Name   (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<      @b<function> Form   (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<   @b<end> Wide_File_Names;>
+
+@xcode<   @b<package> Wide_Wide_File_Names @b<is>>
+
+@xcode<       -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create(File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode := Inout_File;
+                       Name : @b<in> Wide_Wide_String := "";
+                       Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<procedure> Open  (File : @b<in out> File_Type;
+                       Mode : @b<in> File_Mode;
+                       Name : @b<in> Wide_Wide_String;
+                       Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<function> Name   (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<      @b<function> Form   (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<   @b<end> Wide_Wide_File_Names;>
+
+!corrigendum A.10.1(85)
+
+@drepl
+@xcode<   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;
+   Layout_Error : @b<exception renames> IO_Exceptions.Layout_Error;
+@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Text_IO;>
+@dby
+@xcode<   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;
+   Layout_Error : @b<exception renames> IO_Exceptions.Layout_Error;>
+
+@xcode<   @b<package> Wide_File_Names @b<is>>
+
+@xcode<      -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode := Out_File;
+                        Name : @b<in> Wide_String := "";
+                        Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<procedure> Open   (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode;
+                        Name : @b<in> Wide_String;
+                        Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<function> Name    (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<      @b<function> Form    (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<   @b<end> Wide_File_Names;>
+
+@xcode<   @b<package> Wide_Wide_File_Names @b<is>>
+
+@xcode<       -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode := Out_File;
+                        Name : @b<in> Wide_Wide_String := "";
+                        Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<procedure> Open   (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode;
+                        Name : @b<in> Wide_Wide_String;
+                        Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<function> Name    (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<      @b<function> Form    (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<   @b<end> Wide_Wide_File_Names;>
 
-ACATS test
+@xcode<@b<private>
+   ... -- @ft<@i<not specified by the language>>
+@b<end> Ada.Text_IO;>
 
+!corrigendum A.12.1(26)
+
+@dinsa
+@xcode<   Status_Error : @b<exception renames> IO_Exceptions.Status_Error;
+   Mode_Error   : @b<exception renames> IO_Exceptions.Mode_Error;
+   Name_Error   : @b<exception renames> IO_Exceptions.Name_Error;
+   Use_Error    : @b<exception renames> IO_Exceptions.Use_Error;
+   Device_Error : @b<exception renames> IO_Exceptions.Device_Error;
+   End_Error    : @b<exception renames> IO_Exceptions.End_Error;
+   Data_Error   : @b<exception renames> IO_Exceptions.Data_Error;>
+@dinss
+@xcode<   @b<package> Wide_File_Names @b<is>>
+
+@xcode<      -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode := Out_File;
+                        Name : @b<in> Wide_String := "";
+                        Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<procedure> Open (File : @b<in out> File_Type;
+                      Mode : @b<in> File_Mode;
+                      Name : @b<in> Wide_String;
+                      Form : @b<in> Wide_String := "");>
+
+@xcode<      @b<function> Name (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<      @b<function> Form (File : @b<in> File_Type) @b<return> Wide_String;>
+
+@xcode<   @b<end> Wide_File_Names;>
+
+@xcode<   @b<package> Wide_Wide_File_Names @b<is>>
+
+@xcode<       -- @ft<@i<File management>>>
+
+@xcode<      @b<procedure> Create (File : @b<in out> File_Type;
+                        Mode : @b<in> File_Mode := Out_File;
+                        Name : @b<in> Wide_Wide_String := "";
+                        Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<procedure> Open (File : @b<in out> File_Type;
+                      Mode : @b<in> File_Mode;
+                      Name : @b<in> Wide_Wide_String;
+                      Form : @b<in> Wide_Wide_String := "");>
+
+@xcode<      @b<function> Name (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<      @b<function> Form (File : @b<in> File_Type) @b<return> Wide_Wide_String;>
+
+@xcode<   @b<end> Wide_Wide_File_Names;>
+
+
+!corrigendum A.15.1(0)
+
+@dinsc
+
+The packages Wide_Command_Line and Wide_Wide_Command_Line allow a program to
+obtain the values of its arguments and to set the exit status code to be
+returned on normal termination.
+
+@s8<@i<Static Semantics>>
+
+The specification of package Wide_Command_Line is the same as for Command_Line,
+except that each occurrence of String is replaced by Wide_String.
+
+The specification of package Wide_Wide_Command_Line is the same as for
+Command_Line, except that each occurrence of String is replaced by
+Wide_Wide_String.
+
+
+!corrigendum A.16.2(0)
+
+@dinsc
+
+The packages Wide_Directories and Wide_Wide_Directories provide operations for
+manipulating files and directories, and their names.
+
+@s8<@i<Static Semantics>>
+
+The specification of package Wide_Directories is the same as for Directories
+(including its optional child packages Information and Hierarchical_File_Names),
+except that each occurrence of String is replaced by Wide_String.
+
+The specification of package Wide_Wide_Directories is the same as for
+Directories (including its optional child packages Information and 
+Hierarchical_File_Names), except that each occurrence of String is replaced by 
+Wide_Wide_String.
+
+
+!corrigendum A.17.1(0)
+
+@dinsc
+
+The packages Wide_Environment_Variables and Wide_Wide_Environment_Variables
+allow a program to read or modify environment variables.
+
+@s8<@i<Static Semantics>>
+
+The specification of package Wide_Environment_Variables is the same as for
+Environment_Variables, except that each occurrence of String is replaced by
+Wide_String.
+
+The specification of package Wide_Wide_Environment_Variables is the same as for
+Environment_Variables, except that each occurrence of String is replaced by
+Wide_Wide_String.
+
+
+!ACATS test
+
 ACATS C-Tests are needed for the new packages (nested and otherwise).
 
 !appendix
@@ -997,5 +1266,44 @@
 Anyway, I added it to your existing text by mentioning "optional child packages 
 Information and Hierarchical_File_Names". It's in the index, people can find 
 it if they have to.
+
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Wednesday, December 12, 2018  1:33 AM
+
+When I put these into the RM, I noticed a number of issues.
+
+(1) I dropped the change to A.8.2(1) because it isn't relevant: the wide and 
+    wide wide forms of text io are defined by equivalence, so they don't need
+    to be mentioned here (and it is bad precedent, we'd have to make a change
+    like that in other general places as well).
+
+(2) The A.8.2(28.3/4) addition read:
+
+  The nested package Wide_File_Names provides operations equivalent to those in
+  regular Sequential_IO except that Wide_String is used instead of String for the
+  name and form of the external file.
+
+  The nested package Wide_Wide_File_Names provides operations equivalent to those
+  in regular Sequential_IO except that Wide_Wide_String is used instead of String
+  for the name and form of the external file.
+
+But this subclause applies to all 4 of the IO packages: sequential io, direct io, 
+text io, and stream io. It's plain wrong to put some text that only applies to 
+sequential io into this clause (we have A.8.3 for that). Moreover, this rule is
+plenty generic to apply to all of the packages. So I replaced it by:
+
+  The nested package Wide_File_Names provides operations equivalent to the
+  operations of the same name of the outer package except that Wide_String is
+  used instead of String for the name and form of the external file.
+
+  The nested package Wide_Wide_File_Names provides operations equivalent to the
+  operations of the same name of the outer package except that Wide_Wide_String
+  is used instead of String for the name and form of the external file.
+
+(3) Now that there is a general description, we don't need to repeat it at 
+A.8.2(20), A.10.2(5), and A.12.1(33). So those changes were dropped as well.
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent