Commit | Line | Data |
---|---|---|
196ba1fc PH |
1 | /* sim_fio.h: simulator file I/O library headers\r |
2 | \r | |
3 | Copyright (c) 1993-2006, Robert M Supnik\r | |
4 | \r | |
5 | Permission is hereby granted, free of charge, to any person obtaining a\r | |
6 | copy of this software and associated documentation files (the "Software"),\r | |
7 | to deal in the Software without restriction, including without limitation\r | |
8 | the rights to use, copy, modify, merge, publish, distribute, sublicense,\r | |
9 | and/or sell copies of the Software, and to permit persons to whom the\r | |
10 | Software is furnished to do so, subject to the following conditions:\r | |
11 | \r | |
12 | The above copyright notice and this permission notice shall be included in\r | |
13 | all copies or substantial portions of the Software.\r | |
14 | \r | |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r | |
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r | |
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r | |
18 | ROBERT M SUPNIK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r | |
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r | |
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r | |
21 | \r | |
22 | Except as contained in this notice, the name of Robert M Supnik shall not be\r | |
23 | be used in advertising or otherwise to promote the sale, use or other dealings\r | |
24 | in this Software without prior written authorization from Robert M Supnik.\r | |
25 | \r | |
26 | 15-May-06 RMS Added sim_fsize_name\r | |
27 | 16-Aug-05 RMS Fixed C++ declaration and cast problems\r | |
28 | 02-Jan-04 RMS Split out from SCP\r | |
29 | */\r | |
30 | \r | |
31 | #ifndef _SIM_FIO_H_\r | |
32 | #define _SIM_FIO_H_ 0\r | |
33 | \r | |
34 | #define FLIP_SIZE (1 << 16) /* flip buf size */\r | |
35 | #define fxread(a,b,c,d) sim_fread (a, b, c, d)\r | |
36 | #define fxwrite(a,b,c,d) sim_fwrite (a, b, c, d)\r | |
37 | \r | |
38 | int32 sim_finit (void);\r | |
39 | FILE *sim_fopen (const char *file, const char *mode);\r | |
40 | int sim_fseek (FILE *st, t_addr offset, int whence);\r | |
41 | size_t sim_fread (void *bptr, size_t size, size_t count, FILE *fptr);\r | |
42 | size_t sim_fwrite (void *bptr, size_t size, size_t count, FILE *fptr);\r | |
43 | uint32 sim_fsize (FILE *fptr);\r | |
44 | uint32 sim_fsize_name (char *fname);\r | |
45 | \r | |
46 | #endif\r |