1 /* do not edit automatically generated by mc from mcStream. */
2 /* mcStream.def provides an interface to create a file from fragments.
4 Copyright (C) 2015-2024 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius@glam.ac.uk>.
7 This file is part of GNU Modula-2.
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU Modula-2; see the file COPYING3. If not see
21 <http://www.gnu.org/licenses/>. */
24 #if !defined (_mcStream_H)
33 # if !defined (PROC_D)
35 typedef void (*PROC_t
) (void);
36 typedef struct { PROC_t proc
; } PROC
;
41 # if defined (_mcStream_C)
44 # define EXTERN extern
49 openFrag - create and open fragment, id, and return the file.
50 The file should not be closed by the user.
53 EXTERN FIO_File
mcStream_openFrag (unsigned int id
);
56 setDest - informs the stream module and all fragments must be copied
60 EXTERN
void mcStream_setDest (FIO_File f
);
63 combine - closes all fragments and then writes them in
64 order to the destination file. The dest file
68 EXTERN FIO_File
mcStream_combine (void);
71 removeFiles - remove any fragment.
74 EXTERN
void mcStream_removeFiles (void);