pass-lang/src/io.h

26 lines
524 B
C

#ifndef _IO_H
#define _IO_H
#include <stdint.h>
#include <stdio.h>
extern uint32_t here;
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* peek(size_t* len);
void skip(size_t off);
#endif