25 lines
510 B
C
25 lines
510 B
C
#ifndef IO_H
|
|
#define IO_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
void open_files(const char* infile_name, const char* outfile_name);
|
|
void close_files(void);
|
|
|
|
void reserve(size_t len);
|
|
void emit(const void* ptr, size_t count);
|
|
void emit_u8(uint8_t x);
|
|
void emit_u32(uint32_t x);
|
|
void emit_u64(uint64_t x);
|
|
|
|
void patch(size_t off, const void* ptr, size_t count);
|
|
void patch_u32(size_t off, uint32_t x);
|
|
void patch_i32(size_t off, int32_t x);
|
|
|
|
char nextc(void);
|
|
void unnextc(char c);
|
|
char peekc(void);
|
|
|
|
#endif
|