OXYGENHUB
◆ rrdc-perf enhanced-x16-emulator / src / files.h
769 B · Objective-C · last changed chore(): initial commit 25 days ago source blame history raw
1
#include <stdbool.h>
2
#include <stdint.h>
3
4
struct x16file;
5
6
#define XSEEK_SET	0
7
#define XSEEK_END	1
8
#define XSEEK_CUR	2
9
10
bool file_is_compressed_type(char const *path);
11
const char *file_find_extension(const char *path, const char *mark);
12
13
void files_shutdown();
14
15
struct x16file *x16open(const char *path, const char *attribs);
16
void x16close(struct x16file *f);
17
18
int64_t x16size(struct x16file *f);
19
int x16seek(struct x16file *f, int64_t pos, int origin);
20
int64_t x16tell(struct x16file *f);
21
22
23
int x16write8(struct x16file *f, uint8_t val);
24
uint8_t x16read8(struct x16file *f);
25
26
uint64_t x16write(struct x16file *f, const uint8_t *data, uint64_t data_size, uint64_t data_count);
27
uint64_t x16read(struct x16file *f, uint8_t *data, uint64_t data_size, uint64_t data_count);