mirror of https://github.com/mgba-emu/mgba.git
Fix some signatures
This commit is contained in:
parent
42484bbcc3
commit
6519fad652
|
@ -18,10 +18,10 @@ struct VFileFD {
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool _vfdClose(struct VFile* vf);
|
static bool _vfdClose(struct VFile* vf);
|
||||||
static size_t _vfdSeek(struct VFile* vf, off_t offset, int whence);
|
static off_t _vfdSeek(struct VFile* vf, off_t offset, int whence);
|
||||||
static size_t _vfdRead(struct VFile* vf, void* buffer, size_t size);
|
static ssize_t _vfdRead(struct VFile* vf, void* buffer, size_t size);
|
||||||
static size_t _vfdReadline(struct VFile* vf, char* buffer, size_t size);
|
static ssize_t _vfdReadline(struct VFile* vf, char* buffer, size_t size);
|
||||||
static size_t _vfdWrite(struct VFile* vf, void* buffer, size_t size);
|
static ssize_t _vfdWrite(struct VFile* vf, void* buffer, size_t size);
|
||||||
static void* _vfdMap(struct VFile* vf, size_t size, int flags);
|
static void* _vfdMap(struct VFile* vf, size_t size, int flags);
|
||||||
static void _vfdUnmap(struct VFile* vf, void* memory, size_t size);
|
static void _vfdUnmap(struct VFile* vf, void* memory, size_t size);
|
||||||
static void _vfdTruncate(struct VFile* vf, size_t size);
|
static void _vfdTruncate(struct VFile* vf, size_t size);
|
||||||
|
@ -63,17 +63,17 @@ bool _vfdClose(struct VFile* vf) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t _vfdSeek(struct VFile* vf, off_t offset, int whence) {
|
off_t _vfdSeek(struct VFile* vf, off_t offset, int whence) {
|
||||||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||||
return lseek(vfd->fd, offset, whence);
|
return lseek(vfd->fd, offset, whence);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t _vfdRead(struct VFile* vf, void* buffer, size_t size) {
|
ssize_t _vfdRead(struct VFile* vf, void* buffer, size_t size) {
|
||||||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||||
return read(vfd->fd, buffer, size);
|
return read(vfd->fd, buffer, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t _vfdReadline(struct VFile* vf, char* buffer, size_t size) {
|
ssize_t _vfdReadline(struct VFile* vf, char* buffer, size_t size) {
|
||||||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||||
size_t bytesRead = 0;
|
size_t bytesRead = 0;
|
||||||
while (bytesRead < size - 1) {
|
while (bytesRead < size - 1) {
|
||||||
|
@ -86,7 +86,7 @@ size_t _vfdReadline(struct VFile* vf, char* buffer, size_t size) {
|
||||||
return buffer[bytesRead] = '\0';
|
return buffer[bytesRead] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t _vfdWrite(struct VFile* vf, void* buffer, size_t size) {
|
ssize_t _vfdWrite(struct VFile* vf, void* buffer, size_t size) {
|
||||||
struct VFileFD* vfd = (struct VFileFD*) vf;
|
struct VFileFD* vfd = (struct VFileFD*) vf;
|
||||||
return write(vfd->fd, buffer, size);
|
return write(vfd->fd, buffer, size);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
struct VFile {
|
struct VFile {
|
||||||
bool (*close)(struct VFile* vf);
|
bool (*close)(struct VFile* vf);
|
||||||
size_t (*seek)(struct VFile* vf, off_t offset, int whence);
|
off_t (*seek)(struct VFile* vf, off_t offset, int whence);
|
||||||
size_t (*read)(struct VFile* vf, void* buffer, size_t size);
|
ssize_t (*read)(struct VFile* vf, void* buffer, size_t size);
|
||||||
size_t (*readline)(struct VFile* vf, char* buffer, size_t size);
|
ssize_t (*readline)(struct VFile* vf, char* buffer, size_t size);
|
||||||
size_t (*write)(struct VFile* vf, void* buffer, size_t size);
|
ssize_t (*write)(struct VFile* vf, void* buffer, size_t size);
|
||||||
void* (*map)(struct VFile* vf, size_t size, int flags);
|
void* (*map)(struct VFile* vf, size_t size, int flags);
|
||||||
void (*unmap)(struct VFile* vf, void* memory, size_t size);
|
void (*unmap)(struct VFile* vf, void* memory, size_t size);
|
||||||
void (*truncate)(struct VFile* vf, size_t size);
|
void (*truncate)(struct VFile* vf, size_t size);
|
||||||
|
|
Loading…
Reference in New Issue