1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . S T O R A G E _ I O --
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. --
15 ------------------------------------------------------------------------------
17 with Ada
.IO_Exceptions
;
18 with System
.Storage_Elements
;
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) /
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
);
46 Data_Error
: exception renames IO_Exceptions
.Data_Error
;