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------------------------------------------------------------------------------
15
16with Ada.IO_Exceptions;
17with System.Storage_Elements;
18
19generic
20   type Element_Type is private;
21
22package Ada.Storage_IO is
23   pragma Preelaborate;
24
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);
29
30   subtype Buffer_Type is
31     System.Storage_Elements.Storage_Array (1 .. Buffer_Size);
32
33   ---------------------------------
34   -- Input and Output Operations --
35   ---------------------------------
36
37   procedure Read (Buffer : Buffer_Type; Item : out Element_Type);
38
39   procedure Write (Buffer : out Buffer_Type; Item : Element_Type);
40
41   ----------------
42   -- Exceptions --
43   ----------------
44
45   Data_Error : exception renames IO_Exceptions.Data_Error;
46
47end Ada.Storage_IO;
48