aboutsummaryrefslogtreecommitdiff
path: root/assembler.h
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-12-19 08:45:47 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-12-19 08:45:47 +0000
commit7686c1043c8fd24acf5bc588a71cbcf8c820a282 (patch)
treeb036885906f61ba224a7eda314622da261b25819 /assembler.h
parentffc8068a74cca75a66296e8bec06d1ef47d7c830 (diff)
downloadobf-7686c1043c8fd24acf5bc588a71cbcf8c820a282.tar.gz
obf-7686c1043c8fd24acf5bc588a71cbcf8c820a282.tar.bz2
obf-7686c1043c8fd24acf5bc588a71cbcf8c820a282.zip
Refactor assembler to use vec_t instead of buffer
Clearer, precise and no double pointers.
Diffstat (limited to 'assembler.h')
-rw-r--r--assembler.h9
1 files changed, 4 insertions, 5 deletions
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