FSF GCC merge 02/23/03
[official-gcc.git] / gcc / ada / a-storio.ads
blobf63b2b323a0017a50d860e363080cb4795765f8d
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- A D A . S T O R A G E _ I O --
6 -- --
7 -- S p e c --
8 -- --
9 -- --
10 -- This specification is adapted from the Ada Reference Manual for use with --
11 -- GNAT. In accordance with the copyright of that document, you can freely --
12 -- copy and modify this specification, provided that if you redistribute a --
13 -- modified version, any changes that you have made are clearly indicated. --
14 -- --
15 ------------------------------------------------------------------------------
17 with Ada.IO_Exceptions;
18 with System.Storage_Elements;
20 generic
21 type Element_Type is private;
23 package Ada.Storage_IO is
24 pragma Preelaborate (Storage_IO);
26 Buffer_Size : constant System.Storage_Elements.Storage_Count :=
27 System.Storage_Elements.Storage_Count
28 ((Element_Type'Size + System.Storage_Unit - 1) /
29 System.Storage_Unit);
31 subtype Buffer_Type is
32 System.Storage_Elements.Storage_Array (1 .. Buffer_Size);
34 ---------------------------------
35 -- Input and Output Operations --
36 ---------------------------------
38 procedure Read (Buffer : in Buffer_Type; Item : out Element_Type);
40 procedure Write (Buffer : out Buffer_Type; Item : in Element_Type);
42 ----------------
43 -- Exceptions --
44 ----------------
46 Data_Error : exception renames IO_Exceptions.Data_Error;
48 end Ada.Storage_IO;