-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpf_fileio_f0.h
38 lines (31 loc) · 1.04 KB
/
pf_fileio_f0.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <storage/storage.h>
typedef File FileStream;
extern FileStream *PF_STDIN;
extern FileStream *PF_STDOUT;
#ifdef __cplusplus
extern "C" {
#endif
/* Prototypes for stubs. */
FileStream *sdOpenFile(const char *FileName, const char *Mode);
cell_t sdFlushFile(FileStream *Stream);
cell_t sdReadFile(void *ptr, cell_t Size, int32_t nItems, FileStream *Stream);
cell_t sdWriteFile( void *ptr, cell_t Size, int32_t nItems, FileStream *Stream);
cell_t sdSeekFile(FileStream *Stream, file_offset_t Position, int32_t Mode);
cell_t sdRenameFile(const char *OldName, const char *NewName);
cell_t sdDeleteFile(const char *FileName);
ThrowCode sdResizeFile(FileStream *, uint64_t Size);
file_offset_t sdTellFile(FileStream * Stream);
cell_t sdCloseFile(FileStream *Stream);
cell_t sdInputChar(FileStream *Stream);
#ifdef __cplusplus
}
#endif
#define PF_SEEK_SET (0)
#define PF_SEEK_CUR (1)
#define PF_SEEK_END (2)
/*
** printf() is only used for debugging purposes.
** It is not required for normal operation.
*/
#define PRT(x) /* No printf(). */