gcc/
[official-gcc.git] / gcc / ada / a-storio.ads
blobdb0a70bbe4fdece473ff3b29f30439a3e9a2fa32
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 -- This specification is derived from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
13 -- --
14 ------------------------------------------------------------------------------
16 with Ada.IO_Exceptions;
17 with System.Storage_Elements;
19 generic
20 type Element_Type is private;
22 package Ada.Storage_IO is
23 pragma Preelaborate;
25 Buffer_Size : constant System.Storage_Elements.Storage_Count :=
26 System.Storage_Elements.Storage_Count
27 ((Element_Type'Size + System.Storage_Unit - 1) /
28 System.Storage_Unit);
30 subtype Buffer_Type is
31 System.Storage_Elements.Storage_Array (1 .. Buffer_Size);
33 ---------------------------------
34 -- Input and Output Operations --
35 ---------------------------------
37 procedure Read (Buffer : Buffer_Type; Item : out Element_Type);
39 procedure Write (Buffer : out Buffer_Type; Item : Element_Type);
41 ----------------
42 -- Exceptions --
43 ----------------
45 Data_Error : exception renames IO_Exceptions.Data_Error;
47 end Ada.Storage_IO;