Fix for PR1654 - implement "movstrsi" pattern to copy simple blocks of memory.
[official-gcc.git] / libchill / fileio.h
blob38e233137ceb052ded61474f7c869df4205e8130
1 /* Implement Input/Output runtime actions for CHILL.
2 Copyright (C) 1992,1993 Free Software Foundation, Inc.
3 Author: Wilfried Moser, et al
5 This file is part of GNU CC.
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
21 /* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
28 #ifndef _fileio_h_
29 #define _fileio_h_
31 #include <stdio.h>
33 #include "auxtypes.h"
34 #include "ioerror.h"
35 #include "iomodes.h"
37 #define DIRSEP '/'
39 #define TEST_FLAG(Xloc,Flag) (((Xloc)->flags) & (Flag))
40 #define SET_FLAG(Xloc,Flag) (Xloc)->flags |= (Flag)
41 #define CLR_FLAG(Xloc,Flag) (Xloc)->flags = ((Xloc)->flags & ~(Flag))
43 Boolean
44 __isassociated( Association_Mode* the_assoc, char* file, int line );
46 Boolean
47 __existing( Association_Mode* the_assoc, char* file, int line );
49 Boolean
50 __readable( Association_Mode* the_assoc, char* file, int line );
52 Boolean
53 __writeable( Association_Mode* the_assoc, char* file, int line );
55 Boolean
56 __indexable( Association_Mode* the_assoc, char* file, int line );
58 Boolean
59 __sequencible( Association_Mode* the_assoc, char* file, int line );
61 Boolean
62 __variable( Association_Mode* the_assoc, char* file, int line );
64 typedef signed long int Index_t;
66 Association_Mode*
67 __associate( Association_Mode* the_assoc,
68 char* the_path,
69 int the_path_len,
70 char* the_mode,
71 int the_mode_len,
72 char* file,
73 int line );
75 void
76 __dissociate( Association_Mode* the_assoc, char* file, int line );
78 void
79 __create( Association_Mode* the_assoc, char* file, int line );
81 void
82 __delete( Association_Mode* the_assoc, char* file, int line );
84 void
85 __modify( Association_Mode* the_assoc,
86 char* the_path,
87 int the_path_len,
88 char* the_mode,
89 int the_mode_len,
90 char* file,
91 int line );
93 void
94 __connect( void* the_transfer,
95 Association_Mode* the_assoc,
96 Usage_Mode the_usage,
97 Where_Mode the_where,
98 Boolean with_index,
99 signed long the_index,
100 char* file,
101 int line );
103 void
104 __disconnect( void* the_transfer, char* file, int line );
106 Association_Mode*
107 __getassociation( void* the_transfer, char* file, int line );
109 Usage_Mode
110 __getusage( void* the_transfer, char* file, int line );
112 Boolean
113 __outoffile( void* the_transfer, char* file, int line );
115 void*
116 __readrecord( Access_Mode* the_access,
117 signed long the_index,
118 char* the_buf_addr,
119 char* file,
120 int line );
122 void
123 __writerecord( Access_Mode* the_access,
124 signed long the_index,
125 char* the_val_addr,
126 unsigned long the_val_len,
127 char* file,
128 int line );
130 VarString*
131 __gettextrecord( Text_Mode* the_text, char* file, int line );
133 unsigned long
134 __gettextindex( Text_Mode* the_text, char* file, int line );
136 Access_Mode*
137 __gettextaccess( Text_Mode* the_text, char* file, int line );
139 Boolean
140 __eoln( Text_Mode* the_text, char* file, int line );
142 void
143 __settextrecord( Text_Mode* the_text,
144 VarString* the_text_rec,
145 char* file,
146 int line );
148 void
149 __settextindex( Text_Mode* the_text,
150 signed long the_text_index,
151 char* file,
152 int line );
154 void
155 __settextaccess( Text_Mode* the_text,
156 Access_Mode* the_access,
157 char* file,
158 int line );
160 #endif