mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 04:40:27 +08:00
a-tiboio.adb, [...]: New files.
2006-02-13 Hristian Kirtchev <kirtchev@adacore.com> * a-tiboio.adb, a-tiboio.ads, a-wwboio.adb, a-wwboio.ads, a-zzboio.adb, a-zzboio.ads: New files. * impunit.adb, Makefile.rtl: Added new Ada 2005 units. From-SVN: r111041
This commit is contained in:
parent
31d7a8bd3d
commit
e1458816e1
@ -32,6 +32,7 @@ GNATRTL_TASKING_OBJS= \
|
||||
a-intnam$(objext) \
|
||||
a-reatim$(objext) \
|
||||
a-retide$(objext) \
|
||||
a-rttiev$(objext) \
|
||||
a-sytaco$(objext) \
|
||||
a-tasatt$(objext) \
|
||||
a-taside$(objext) \
|
||||
@ -108,6 +109,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-coormu$(objext) \
|
||||
a-coorse$(objext) \
|
||||
a-coprnu$(objext) \
|
||||
a-coteio$(objext) \
|
||||
a-crbltr$(objext) \
|
||||
a-crbtgk$(objext) \
|
||||
a-crbtgo$(objext) \
|
||||
@ -120,6 +122,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-dirval$(objext) \
|
||||
a-einuoc$(objext) \
|
||||
a-elchha$(objext) \
|
||||
a-envvar$(objext) \
|
||||
a-except$(objext) \
|
||||
a-exctra$(objext) \
|
||||
a-filico$(objext) \
|
||||
@ -129,7 +132,9 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-inteio$(objext) \
|
||||
a-ioexce$(objext) \
|
||||
a-iwteio$(objext) \
|
||||
a-lcteio$(objext) \
|
||||
a-lfteio$(objext) \
|
||||
a-llctio$(objext) \
|
||||
a-lfwtio$(objext) \
|
||||
a-lfztio$(objext) \
|
||||
a-liteio$(objext) \
|
||||
@ -161,6 +166,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-numaux$(objext) \
|
||||
a-numeri$(objext) \
|
||||
a-rbtgso$(objext) \
|
||||
a-scteio$(objext) \
|
||||
a-secain$(objext) \
|
||||
a-sequio$(objext) \
|
||||
a-sfteio$(objext) \
|
||||
@ -176,6 +182,8 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-ssitio$(objext) \
|
||||
a-ssiwti$(objext) \
|
||||
a-ssizti$(objext) \
|
||||
a-stboha$(objext) \
|
||||
a-stfiha$(objext) \
|
||||
a-stmaco$(objext) \
|
||||
a-storio$(objext) \
|
||||
a-strbou$(objext) \
|
||||
@ -205,10 +213,14 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-stzsup$(objext) \
|
||||
a-stzunb$(objext) \
|
||||
a-suteio$(objext) \
|
||||
a-swbwha$(objext) \
|
||||
a-swfwha$(objext) \
|
||||
a-swmwco$(objext) \
|
||||
a-swunau$(objext) \
|
||||
a-swuwha$(objext) \
|
||||
a-swuwti$(objext) \
|
||||
a-szbzha$(objext) \
|
||||
a-szfzha$(objext) \
|
||||
a-szmzco$(objext) \
|
||||
a-szunau$(objext) \
|
||||
a-szuzha$(objext) \
|
||||
@ -217,6 +229,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-tgdico$(objext) \
|
||||
a-teioed$(objext) \
|
||||
a-textio$(objext) \
|
||||
a-tiboio$(objext) \
|
||||
a-ticoau$(objext) \
|
||||
a-ticoio$(objext) \
|
||||
a-tideau$(objext) \
|
||||
@ -256,6 +269,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-wtmoau$(objext) \
|
||||
a-wtmoio$(objext) \
|
||||
a-wttest$(objext) \
|
||||
a-wwboio$(objext) \
|
||||
a-wwunio$(objext) \
|
||||
a-zchara$(objext) \
|
||||
a-zchuni$(objext) \
|
||||
@ -277,6 +291,7 @@ GNATRTL_NONTASKING_OBJS= \
|
||||
a-ztmoau$(objext) \
|
||||
a-ztmoio$(objext) \
|
||||
a-zttest$(objext) \
|
||||
a-zzboio$(objext) \
|
||||
a-zzunio$(objext) \
|
||||
ada$(objext) \
|
||||
calendar$(objext) \
|
||||
|
181
gcc/ada/a-tiboio.adb
Normal file
181
gcc/ada/a-tiboio.adb
Normal file
@ -0,0 +1,181 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- A D A . T E X T _ I O . B O U N D E D _ I O --
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
||||
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
||||
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
||||
-- for more details. You should have received a copy of the GNU General --
|
||||
-- Public License distributed with GNAT; see file COPYING. If not, write --
|
||||
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
||||
-- Boston, MA 02110-1301, USA. --
|
||||
-- --
|
||||
-- As a special exception, if other files instantiate generics from this --
|
||||
-- unit, or you link this unit with other files to produce an executable, --
|
||||
-- this unit does not by itself cause the resulting executable to be --
|
||||
-- covered by the GNU General Public License. This exception does not --
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- GNAT was originally developed by the GNAT team at New York University. --
|
||||
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Text_IO; use Ada.Text_IO;
|
||||
with Ada.Unchecked_Deallocation;
|
||||
|
||||
package body Ada.Text_IO.Bounded_IO is
|
||||
|
||||
type String_Access is access all String;
|
||||
|
||||
procedure Free (SA : in out String_Access);
|
||||
-- Perform an unchecked deallocation of a non-null string
|
||||
|
||||
----------
|
||||
-- Free --
|
||||
----------
|
||||
|
||||
procedure Free (SA : in out String_Access) is
|
||||
Null_String : constant String := "";
|
||||
|
||||
procedure Deallocate is
|
||||
new Ada.Unchecked_Deallocation (String, String_Access);
|
||||
|
||||
begin
|
||||
-- Do not try to free statically allocated null string
|
||||
|
||||
if SA.all /= Null_String then
|
||||
Deallocate (SA);
|
||||
end if;
|
||||
end Free;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line return Bounded.Bounded_String is
|
||||
begin
|
||||
return Bounded.To_Bounded_String (Get_Line);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Bounded.Bounded_String
|
||||
is
|
||||
begin
|
||||
return Bounded.To_Bounded_String (Get_Line (File));
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Bounded.Bounded_String)
|
||||
is
|
||||
Buffer : String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : String_Access;
|
||||
Str2 : String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (Buffer, Last);
|
||||
Str1 := new String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (Buffer, Last);
|
||||
Str2 := new String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Bounded.To_Bounded_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Bounded.Bounded_String)
|
||||
is
|
||||
Buffer : String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : String_Access;
|
||||
Str2 : String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str1 := new String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str2 := new String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Bounded.To_Bounded_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(Item : Bounded.Bounded_String)
|
||||
is
|
||||
begin
|
||||
Put (Bounded.To_String (Item));
|
||||
end Put;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Bounded.Bounded_String)
|
||||
is
|
||||
begin
|
||||
Put (File, Bounded.To_String (Item));
|
||||
end Put;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Bounded.Bounded_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (Bounded.To_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Bounded.Bounded_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (File, Bounded.To_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
end Ada.Text_IO.Bounded_IO;
|
52
gcc/ada/a-tiboio.ads
Normal file
52
gcc/ada/a-tiboio.ads
Normal file
@ -0,0 +1,52 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- A D A . T E X T _ I O . B O U N D E D _ I O --
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- This specification is adapted from the Ada Reference Manual for use with --
|
||||
-- GNAT. In accordance with the copyright of that document, you can freely --
|
||||
-- copy and modify this specification, provided that if you redistribute a --
|
||||
-- modified version, any changes that you have made are clearly indicated. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Strings.Bounded;
|
||||
|
||||
generic
|
||||
with package Bounded is
|
||||
new Ada.Strings.Bounded.Generic_Bounded_Length (<>);
|
||||
|
||||
package Ada.Text_IO.Bounded_IO is
|
||||
|
||||
function Get_Line return Bounded.Bounded_String;
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Bounded.Bounded_String;
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Bounded.Bounded_String);
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Bounded.Bounded_String);
|
||||
|
||||
procedure Put
|
||||
(Item : Bounded.Bounded_String);
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Bounded.Bounded_String);
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Bounded.Bounded_String);
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Bounded.Bounded_String);
|
||||
|
||||
end Ada.Text_IO.Bounded_IO;
|
181
gcc/ada/a-wwboio.adb
Normal file
181
gcc/ada/a-wwboio.adb
Normal file
@ -0,0 +1,181 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- A D A . W I D E _ T E X T _ I O . W I D E _ B O U N D E D _ I O --
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
||||
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
||||
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
||||
-- for more details. You should have received a copy of the GNU General --
|
||||
-- Public License distributed with GNAT; see file COPYING. If not, write --
|
||||
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
||||
-- Boston, MA 02110-1301, USA. --
|
||||
-- --
|
||||
-- As a special exception, if other files instantiate generics from this --
|
||||
-- unit, or you link this unit with other files to produce an executable, --
|
||||
-- this unit does not by itself cause the resulting executable to be --
|
||||
-- covered by the GNU General Public License. This exception does not --
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- GNAT was originally developed by the GNAT team at New York University. --
|
||||
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Wide_Text_IO; use Ada.Wide_Text_IO;
|
||||
with Ada.Unchecked_Deallocation;
|
||||
|
||||
package body Ada.Wide_Text_IO.Wide_Bounded_IO is
|
||||
|
||||
type Wide_String_Access is access all Wide_String;
|
||||
|
||||
procedure Free (WSA : in out Wide_String_Access);
|
||||
-- Perform an unchecked deallocation of a non-null string
|
||||
|
||||
----------
|
||||
-- Free --
|
||||
----------
|
||||
|
||||
procedure Free (WSA : in out Wide_String_Access) is
|
||||
Null_Wide_String : constant Wide_String := "";
|
||||
|
||||
procedure Deallocate is
|
||||
new Ada.Unchecked_Deallocation (Wide_String, Wide_String_Access);
|
||||
|
||||
begin
|
||||
-- Do not try to free statically allocated null string
|
||||
|
||||
if WSA.all /= Null_Wide_String then
|
||||
Deallocate (WSA);
|
||||
end if;
|
||||
end Free;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line return Wide_Bounded.Bounded_Wide_String is
|
||||
begin
|
||||
return Wide_Bounded.To_Bounded_Wide_String (Get_Line);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Wide_Bounded.Bounded_Wide_String
|
||||
is
|
||||
begin
|
||||
return Wide_Bounded.To_Bounded_Wide_String (Get_Line (File));
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
Buffer : Wide_String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : Wide_String_Access;
|
||||
Str2 : Wide_String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (Buffer, Last);
|
||||
Str1 := new Wide_String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (Buffer, Last);
|
||||
Str2 := new Wide_String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Wide_Bounded.To_Bounded_Wide_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
Buffer : Wide_String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : Wide_String_Access;
|
||||
Str2 : Wide_String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str1 := new Wide_String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str2 := new Wide_String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Wide_Bounded.To_Bounded_Wide_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(Item : Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put (Wide_Bounded.To_Wide_String (Item));
|
||||
end Put;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put (File, Wide_Bounded.To_Wide_String (Item));
|
||||
end Put;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (Wide_Bounded.To_Wide_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Wide_Bounded.Bounded_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (File, Wide_Bounded.To_Wide_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
end Ada.Wide_Text_IO.Wide_Bounded_IO;
|
52
gcc/ada/a-wwboio.ads
Normal file
52
gcc/ada/a-wwboio.ads
Normal file
@ -0,0 +1,52 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- A D A . W I D E _ T E X T _ I O . W I D E _ B O U N D E D _ I O --
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- This specification is adapted from the Ada Reference Manual for use with --
|
||||
-- GNAT. In accordance with the copyright of that document, you can freely --
|
||||
-- copy and modify this specification, provided that if you redistribute a --
|
||||
-- modified version, any changes that you have made are clearly indicated. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Strings.Wide_Bounded;
|
||||
|
||||
generic
|
||||
with package Wide_Bounded is
|
||||
new Ada.Strings.Wide_Bounded.Generic_Bounded_Length (<>);
|
||||
|
||||
package Ada.Wide_Text_IO.Wide_Bounded_IO is
|
||||
|
||||
function Get_Line return Wide_Bounded.Bounded_Wide_String;
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Wide_Bounded.Bounded_Wide_String;
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
procedure Put
|
||||
(Item : Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Wide_Bounded.Bounded_Wide_String);
|
||||
|
||||
end Ada.Wide_Text_IO.Wide_Bounded_IO;
|
182
gcc/ada/a-zzboio.adb
Normal file
182
gcc/ada/a-zzboio.adb
Normal file
@ -0,0 +1,182 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- ADA.WIDE_WIDE_TEXT_IO.WIDE_WIDE_BOUNDED_IO --
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
-- ware Foundation; either version 2, or (at your option) any later ver- --
|
||||
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
||||
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
||||
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
||||
-- for more details. You should have received a copy of the GNU General --
|
||||
-- Public License distributed with GNAT; see file COPYING. If not, write --
|
||||
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
|
||||
-- Boston, MA 02110-1301, USA. --
|
||||
-- --
|
||||
-- As a special exception, if other files instantiate generics from this --
|
||||
-- unit, or you link this unit with other files to produce an executable, --
|
||||
-- this unit does not by itself cause the resulting executable to be --
|
||||
-- covered by the GNU General Public License. This exception does not --
|
||||
-- however invalidate any other reasons why the executable file might be --
|
||||
-- covered by the GNU Public License. --
|
||||
-- --
|
||||
-- GNAT was originally developed by the GNAT team at New York University. --
|
||||
-- Extensive contributions were provided by Ada Core Technologies Inc. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO;
|
||||
with Ada.Unchecked_Deallocation;
|
||||
|
||||
package body Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO is
|
||||
|
||||
type Wide_Wide_String_Access is access all Wide_Wide_String;
|
||||
|
||||
procedure Free (WWSA : in out Wide_Wide_String_Access);
|
||||
-- Perform an unchecked deallocation of a non-null string
|
||||
|
||||
----------
|
||||
-- Free --
|
||||
----------
|
||||
|
||||
procedure Free (WWSA : in out Wide_Wide_String_Access) is
|
||||
Null_Wide_Wide_String : constant Wide_Wide_String := "";
|
||||
|
||||
procedure Deallocate is
|
||||
new Ada.Unchecked_Deallocation (
|
||||
Wide_Wide_String, Wide_Wide_String_Access);
|
||||
|
||||
begin
|
||||
-- Do not try to free statically allocated null string
|
||||
|
||||
if WWSA.all /= Null_Wide_Wide_String then
|
||||
Deallocate (WWSA);
|
||||
end if;
|
||||
end Free;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line return Wide_Wide_Bounded.Bounded_Wide_Wide_String is
|
||||
begin
|
||||
return Wide_Wide_Bounded.To_Bounded_Wide_Wide_String (Get_Line);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Wide_Wide_Bounded.Bounded_Wide_Wide_String
|
||||
is
|
||||
begin
|
||||
return Wide_Wide_Bounded.To_Bounded_Wide_Wide_String (Get_Line (File));
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
Buffer : Wide_Wide_String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : Wide_Wide_String_Access;
|
||||
Str2 : Wide_Wide_String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (Buffer, Last);
|
||||
Str1 := new Wide_Wide_String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (Buffer, Last);
|
||||
Str2 := new Wide_Wide_String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Wide_Wide_Bounded.To_Bounded_Wide_Wide_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
--------------
|
||||
-- Get_Line --
|
||||
--------------
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
Buffer : Wide_Wide_String (1 .. 1000);
|
||||
Last : Natural;
|
||||
Str1 : Wide_Wide_String_Access;
|
||||
Str2 : Wide_Wide_String_Access;
|
||||
|
||||
begin
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str1 := new Wide_Wide_String'(Buffer (1 .. Last));
|
||||
|
||||
while Last = Buffer'Last loop
|
||||
Get_Line (File, Buffer, Last);
|
||||
Str2 := new Wide_Wide_String'(Str1.all & Buffer (1 .. Last));
|
||||
Free (Str1);
|
||||
Str1 := Str2;
|
||||
end loop;
|
||||
|
||||
Item := Wide_Wide_Bounded.To_Bounded_Wide_Wide_String (Str1.all);
|
||||
end Get_Line;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put (Wide_Wide_Bounded.To_Wide_Wide_String (Item));
|
||||
end Put;
|
||||
|
||||
---------
|
||||
-- Put --
|
||||
---------
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put (File, Wide_Wide_Bounded.To_Wide_Wide_String (Item));
|
||||
end Put;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (Wide_Wide_Bounded.To_Wide_Wide_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
--------------
|
||||
-- Put_Line --
|
||||
--------------
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String)
|
||||
is
|
||||
begin
|
||||
Put_Line (File, Wide_Wide_Bounded.To_Wide_Wide_String (Item));
|
||||
end Put_Line;
|
||||
|
||||
end Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO;
|
52
gcc/ada/a-zzboio.ads
Normal file
52
gcc/ada/a-zzboio.ads
Normal file
@ -0,0 +1,52 @@
|
||||
------------------------------------------------------------------------------
|
||||
-- --
|
||||
-- GNAT RUN-TIME COMPONENTS --
|
||||
-- --
|
||||
-- ADA.WIDE_WIDE_TEXT_IO.WIDE_WIDE_BOUNDED_IO --
|
||||
-- --
|
||||
-- S p e c --
|
||||
-- --
|
||||
-- Copyright (C) 1997-2005, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- This specification is adapted from the Ada Reference Manual for use with --
|
||||
-- GNAT. In accordance with the copyright of that document, you can freely --
|
||||
-- copy and modify this specification, provided that if you redistribute a --
|
||||
-- modified version, any changes that you have made are clearly indicated. --
|
||||
-- --
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
with Ada.Strings.Wide_Wide_Bounded;
|
||||
|
||||
generic
|
||||
with package Wide_Wide_Bounded is
|
||||
new Ada.Strings.Wide_Wide_Bounded.Generic_Bounded_Length (<>);
|
||||
|
||||
package Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO is
|
||||
|
||||
function Get_Line return Wide_Wide_Bounded.Bounded_Wide_Wide_String;
|
||||
|
||||
function Get_Line
|
||||
(File : File_Type) return Wide_Wide_Bounded.Bounded_Wide_Wide_String;
|
||||
|
||||
procedure Get_Line
|
||||
(Item : out Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
procedure Get_Line
|
||||
(File : File_Type;
|
||||
Item : out Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
procedure Put
|
||||
(Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
procedure Put
|
||||
(File : File_Type;
|
||||
Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
procedure Put_Line
|
||||
(Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
procedure Put_Line
|
||||
(File : File_Type;
|
||||
Item : Wide_Wide_Bounded.Bounded_Wide_Wide_String);
|
||||
|
||||
end Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO;
|
@ -6,7 +6,7 @@
|
||||
-- --
|
||||
-- B o d y --
|
||||
-- --
|
||||
-- Copyright (C) 2000-2005, Free Software Foundation, Inc. --
|
||||
-- Copyright (C) 2000-2006, Free Software Foundation, Inc. --
|
||||
-- --
|
||||
-- GNAT is free software; you can redistribute it and/or modify it under --
|
||||
-- terms of the GNU General Public License as published by the Free Soft- --
|
||||
@ -351,10 +351,15 @@ package body Impunit is
|
||||
"a-convec", -- Ada.Containers.Vectors
|
||||
"a-coorma", -- Ada.Containers.Ordered_Maps
|
||||
"a-coorse", -- Ada.Containers.Ordered_Sets
|
||||
"a-coteio", -- Ada.Complex_Text_IO
|
||||
"a-direct", -- Ada.Directories
|
||||
"a-envvar", -- Ada.Environment_Variables
|
||||
"a-rttiev", -- Ada.Real_Time.Timing_Events
|
||||
"a-secain", -- Ada.Strings.Equal_Case_Insensitive
|
||||
"a-shcain", -- Ada.Strings.Hash_Case_Insensitive
|
||||
"a-slcain", -- Ada.Strings.Less_Case_Insensitive
|
||||
"a-stboha", -- Ada.Strings.Bounded.Hash
|
||||
"a-stfiha", -- Ada.Strings.Fixed.Hash
|
||||
"a-strhas", -- Ada.Strings.Hash
|
||||
"a-stunha", -- Ada.Strings.Unbounded.Hash
|
||||
"a-stwiha", -- Ada.Strings.Wide_Hash
|
||||
@ -363,27 +368,37 @@ package body Impunit is
|
||||
"a-stzhas", -- Ada.Strings.Wide_Wide_Hash
|
||||
"a-stzmap", -- Ada.Strings.Wide_Wide_Maps
|
||||
"a-stzunb", -- Ada.Strings.Wide_Wide_Unbounded
|
||||
"a-swbwha", -- Ada.Strings.Wide_Bounded.Wide_Hash
|
||||
"a-swfwha", -- Ada.Strings.Wide_Fixed.Wide_Hash
|
||||
"a-swuwha", -- Ada.Strings.Wide_Unbounded.Wide_Hash
|
||||
"a-szbzha", -- Ada.Strings.Wide_Wide_Bounded.Wide_Wide_Hash
|
||||
"a-szfzha", -- Ada.Strings.Wide_Wide_Fixed.Wide_Wide_Hash
|
||||
"a-szmzco", -- Ada.Strings.Wide_Wide_Maps.Wide_Wide_Constants
|
||||
"a-szuzha", -- Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Hash
|
||||
"a-taster", -- Ada.Task_Termination
|
||||
"a-tgdico", -- Ada.Tags.Generic_Dispatching_Constructor
|
||||
"a-tiboio", -- Ada.Text_IO.Bounded_IO
|
||||
"a-tiunio", -- Ada.Text_IO.Unbounded_IO
|
||||
"a-wichun", -- Ada.Wide_Characters.Unicode
|
||||
"a-wwboio", -- Ada.Wide_Text_IO.Wide_Bounded_IO
|
||||
"a-wwunio", -- Ada.Wide_Text_IO.Wide_Unbounded_IO
|
||||
"a-zchara", -- Ada.Wide_Wide_Characters
|
||||
"a-zttest", -- Ada.Wide_Wide_Text_IO.Text_Streams
|
||||
"a-ztexio", -- Ada.Wide_Wide_Text_IO
|
||||
"a-zzboio", -- Ada.Wide_Wide_Text_IO.Wide_Wide_Bounded_IO
|
||||
"a-zzunio", -- Ada.Wide_Wide_Text_IO.Wide_Wide_Unbounded_IO
|
||||
|
||||
------------------------------------------------------
|
||||
-- RM Required Additions to Ada 2005 for GNAT Types --
|
||||
------------------------------------------------------
|
||||
|
||||
"a-lcteio", -- Ada.Long_Complex_Text_IO
|
||||
"a-lfztio", -- Ada.Long_Float_Wide_Wide_Text_IO
|
||||
"a-liztio", -- Ada.Long_Integer_Wide_Wide_Text_IO
|
||||
"a-llctio", -- Ada.Long_Long_Complex_Text_IO
|
||||
"a-llfzti", -- Ada.Long_Long_Float_Wide_Wide_Text_IO
|
||||
"a-llizti", -- Ada.Long_Long_Integer_Wide_Wide_Text_IO
|
||||
"a-scteio", -- Ada.Short_Complex_Text_IO
|
||||
"a-sfztio", -- Ada.Short_Float_Wide_Wide_Text_IO
|
||||
"a-siztio", -- Ada.Short_Integer_Wide_Wide_Text_IO
|
||||
"a-ssizti", -- Ada.Short_Short_Integer_Wide_Wide_Text_IO
|
||||
|
Loading…
x
Reference in New Issue
Block a user