blob: bcd5b1a46f32c132c96be9d2b28c470ce02c1679 [file] [log] [blame]
swissChili8cfb7c42021-04-18 21:17:58 -07001#pragma once
2
swissChilif3e7f182021-04-20 13:57:22 -07003#include <dasm_proto.h>
swissChili53472e82021-05-08 16:06:32 -07004#include <stddef.h>
5#include <stdint.h>
swissChilif68671f2021-07-05 14:14:44 -07006#include <stdbool.h>
7#include <sys/types.h>
swissChili8cfb7c42021-04-18 21:17:58 -07008
9/* Platform specific definitions */
10
11// Must return an address aligned to 8 bytes
swissChili53472e82021-05-08 16:06:32 -070012void *malloc_aligned(size_t size);
13void *realloc_aligned(void *addr, size_t size);
14void free_aligned(void *addr);
swissChilif3e7f182021-04-20 13:57:22 -070015
swissChilif68671f2021-07-05 14:14:44 -070016void *link_program(dasm_State **Dst);
17
18extern ssize_t readlink(const char *pathname, char *buf, size_t buf_size);
19bool file_exists(const char *path);
swissChilie9fec8b2021-06-22 13:59:33 -070020
swissChili7e1393c2021-07-07 12:59:12 -070021char *read_input_line(char *prompt);
22void add_line_to_history(char *line);
23
swissChilie9fec8b2021-06-22 13:59:33 -070024#define THREAD_LOCAL