1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . S E Q U E N T I A L _ I O --
9 -- Copyright (C) 1992-2023, Free Software Foundation, Inc. --
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. --
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. --
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/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package contains the declaration of the control block used for
33 -- Sequential_IO. This must be declared at the outer library level. It also
34 -- contains code that is shared between instances of Sequential_IO.
36 with System
.File_Control_Block
;
39 package System
.Sequential_IO
is
41 package FCB
renames System
.File_Control_Block
;
43 type Sequential_AFCB
is new FCB
.AFCB
with null record;
44 -- No additional fields required for Sequential_IO
46 function AFCB_Allocate
47 (Control_Block
: Sequential_AFCB
) return FCB
.AFCB_Ptr
;
49 procedure AFCB_Close
(File
: not null access Sequential_AFCB
);
50 procedure AFCB_Free
(File
: not null access Sequential_AFCB
);
53 (File
: in out Sequential_AFCB
;
54 Item
: out Ada
.Streams
.Stream_Element_Array
;
55 Last
: out Ada
.Streams
.Stream_Element_Offset
);
56 -- Required overriding of Read, not actually used for Sequential_IO
59 (File
: in out Sequential_AFCB
;
60 Item
: Ada
.Streams
.Stream_Element_Array
);
61 -- Required overriding of Write, not actually used for Sequential_IO
63 type File_Type
is access all Sequential_AFCB
;
64 -- File_Type in individual instantiations is derived from this type
67 (File
: in out File_Type
;
68 Mode
: FCB
.File_Mode
:= FCB
.Out_File
;
73 (File
: in out File_Type
;
78 end System
.Sequential_IO
;