PR c++/54038
[official-gcc.git] / gcc / ada / a-suteio.ads
blob2b4840710b28622560cec85fa33eeceeebc49f65
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- A D A . S T R I N G S . U N B O U N D E D . T E X T _ I O --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1997-2009, Free Software Foundation, Inc. --
10 -- --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
29 -- --
30 ------------------------------------------------------------------------------
32 -- This child package of Ada.Strings.Unbounded provides some specialized
33 -- Text_IO routines that work directly with unbounded strings, avoiding the
34 -- inefficiencies of access via the standard interface, and also taking
35 -- direct advantage of the variable length semantics of these strings.
37 with Ada.Text_IO;
39 package Ada.Strings.Unbounded.Text_IO is
41 function Get_Line return Unbounded_String;
42 function Get_Line (File : Ada.Text_IO.File_Type) return Unbounded_String;
43 -- Reads up to the end of the current line, returning the result
44 -- as an unbounded string of appropriate length. If no File parameter
45 -- is present, input is from Current_Input.
47 procedure Get_Line
48 (File : Ada.Text_IO.File_Type;
49 Item : out Unbounded_String);
50 procedure Get_Line (Item : out Unbounded_String);
51 -- Similar to the above, but in procedure form with an out parameter
53 procedure Put (U : Unbounded_String);
54 procedure Put (File : Ada.Text_IO.File_Type; U : Unbounded_String);
55 procedure Put_Line (U : Unbounded_String);
56 procedure Put_Line (File : Ada.Text_IO.File_Type; U : Unbounded_String);
57 -- These are equivalent to the standard Text_IO routines passed the
58 -- value To_String (U), but operate more efficiently, because the extra
59 -- copy of the argument is avoided.
61 end Ada.Strings.Unbounded.Text_IO;