mirror of
https://github.com/mmozeiko/pkg2zip.git
synced 2026-09-03 03:29:59 +03:00
21 lines
593 B
C
21 lines
593 B
C
#pragma once
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
typedef void* sys_file;
|
|
|
|
void sys_mkdir(const char* path);
|
|
|
|
sys_file sys_open(const char* fname, uint64_t* size);
|
|
sys_file sys_create(const char* fname);
|
|
void sys_close(sys_file file);
|
|
void sys_read(sys_file file, uint64_t offset, void* buffer, uint32_t size);
|
|
void sys_write(sys_file file, uint64_t offset, const void* buffer, uint32_t size);
|
|
|
|
// if !ptr && size => malloc
|
|
// if ptr && !size => free
|
|
// if ptr && size => realloc
|
|
void* sys_realloc(void* ptr, size_t size);
|
|
|
|
void sys_vstrncat(char* dst, size_t n, const char* format, ...); |