diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-28 13:31:51 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-10-28 13:31:51 +0000 |
commit | c4853f2e3cc64aad591da8e9c5609e60279290b9 (patch) | |
tree | 148343d7b85f6796a501d41f02588446c25abfd8 /gcc/ada/a-textio.ads | |
parent | 119147d12d323bafa652a1dff5962c9a1b800bd7 (diff) | |
download | gcc-c4853f2e3cc64aad591da8e9c5609e60279290b9.tar.gz |
2009-10-28 Robert Dewar <dewar@adacore.com>
* a-ztexio.adb, a-ztexio.ads, a-witeio.ads, a-witeio.adb,
a-textio.ads, a-textio.adb: Reorganize (moving specs from private part
to body).
(Initialize_Standard_Files): New procedure.
* a-tienau.adb: Minor change to make EOF directly visible
* a-tirsfi.ads, a-wrstfi.adb, a-wrstfi.ads, a-zrstfi.adb,
a-zrstfi.ads, a-tirsfi.adb: New unit, initial version.
* gnat_rm.texi: Add documentation for
Ada.[Wide_[Wide_]]Text_IO.Reset_Standard_Files.
* Makefile.rtl: Add entries for
Ada.[Wide_[Wide_]]Text_IO.Reset_Standard_Files
2009-10-28 Thomas Quinot <quinot@adacore.com>
* exp_ch9.ads: Minor reformatting
* sem_ch3.adb: Minor reformatting
* sem_aggr.adb: Minor reformatting.
* sem_attr.adb: Minor reformatting
* tbuild.adb, tbuild.ads, par-ch4.adb, exp_ch4.adb (Tbuild.New_Op_Node):
New subprogram.
Minor code reorganization/factoring.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153656 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-textio.ads')
-rw-r--r-- | gcc/ada/a-textio.ads | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/gcc/ada/a-textio.ads b/gcc/ada/a-textio.ads index 9277ccbbae5..44fe496db18 100644 --- a/gcc/ada/a-textio.ads +++ b/gcc/ada/a-textio.ads @@ -41,6 +41,7 @@ with Ada.IO_Exceptions; with Ada.Streams; + with System; with System.File_Control_Block; with System.WCh_Con; @@ -443,9 +444,6 @@ private -- The Standard Files -- ------------------------ - Null_Str : aliased constant String := ""; - -- Used as name and form of standard files - Standard_In_AFCB : aliased Text_AFCB; Standard_Out_AFCB : aliased Text_AFCB; Standard_Err_AFCB : aliased Text_AFCB; @@ -460,47 +458,9 @@ private Current_Err : aliased File_Type := Standard_Err; -- Current files - ----------------------- - -- Local Subprograms -- - ----------------------- - - -- These subprograms are in the private part of the spec so that they can - -- be shared by the routines in the body of Ada.Text_IO.Wide_Text_IO. - - -- Note: we use Integer in these declarations instead of the more accurate - -- Interfaces.C_Streams.int, because we do not want to drag in the spec of - -- this interfaces package with the spec of Ada.Text_IO, and we know that - -- in fact these types are identical - - function EOF_Char return Integer; - -- Returns the system-specific character indicating the end of a text file. - -- This is exported for use by child packages such as Enumeration_Aux to - -- eliminate their needing to depend directly on Interfaces.C_Streams. - - function Getc (File : File_Type) return Integer; - -- Gets next character from file, which has already been checked for - -- being in read status, and returns the character read if no error - -- occurs. The result is EOF if the end of file was read. - - function Nextc (File : File_Type) return Integer; - -- Returns next character from file without skipping past it (i.e. it - -- is a combination of Getc followed by an Ungetc). - - procedure Putc (ch : Integer; File : File_Type); - -- Outputs the given character to the file, which has already been - -- checked for being in output status. Device_Error is raised if the - -- character cannot be written. - - procedure Terminate_Line (File : File_Type); - -- If the file is in Write_File or Append_File mode, and the current - -- line is not terminated, then a line terminator is written using - -- New_Line. Note that there is no Terminate_Page routine, because - -- the page mark at the end of the file is implied if necessary. - - procedure Ungetc (ch : Integer; File : File_Type); - -- Pushes back character into stream, using ungetc. The caller has - -- checked that the file is in read status. Device_Error is raised - -- if the character cannot be pushed back. An attempt to push back - -- and end of file character (EOF) is ignored. + procedure Initialize_Standard_Files; + -- Initializes the file control blocks for the standard files. Called from + -- the elaboration routine for this package, and from Reset_Standard_Files + -- in package Ada.Text_IO.Reset_Standard_Files. end Ada.Text_IO; |