23 lines
470 B
C
23 lines
470 B
C
#ifndef _IO_H
|
|
#define _IO_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
extern FILE* outfile;
|
|
extern FILE* infile;
|
|
|
|
void open_files(const char* infile_name, const char* outfile_name);
|
|
void close_files(void);
|
|
|
|
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);
|
|
|
|
#endif
|