From 7686c1043c8fd24acf5bc588a71cbcf8c820a282 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 19 Dec 2024 08:45:47 +0000 Subject: Refactor assembler to use vec_t instead of buffer Clearer, precise and no double pointers. --- assembler.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'assembler.h') diff --git a/assembler.h b/assembler.h index f311a96..e6b2eb2 100644 --- a/assembler.h +++ b/assembler.h @@ -4,14 +4,13 @@ #include "./lib.h" #include "./parser.h" -void asm_setup_buffer(buffer_t **asm_buffer, const char *outname); -void asm_translate_nodes(buffer_t **asm_buffer, struct PResult nodes, +void asm_translate_nodes(vec_t *asm_buffer, struct PResult nodes, const char *src_name); -void asm_write(buffer_t **asm_buffer); -int asm_assemble(const char *srcname, const char *objname); +void asm_write(const char *asm_name, vec_t *asm_buffer); +int asm_assemble(const char *asm_name, const char *objname); int asm_link(const char *objname, const char *outname); -int asm_compile(buffer_t **asm_buffer, const char *objname, +int asm_compile(vec_t *asm_buffer, const char *asm_name, const char *objname, const char *outname); #endif -- cgit v1.2.3-13-gbd6f