From 52c18e60929b64285d4bb333f87482d954c9b2e0 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 26 Nov 2023 22:43:30 +0100 Subject: First commit --- src/op/call.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/op/call.c (limited to 'src/op/call.c') diff --git a/src/op/call.c b/src/op/call.c new file mode 100644 index 0000000..62ff5c9 --- /dev/null +++ b/src/op/call.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include +#include + +static int op(FILE *const f, struct interp *const i) +{ + varuint32 function_index; + + if (varuint32_read(f, &function_index)) + { + fprintf(stderr, "%s: varuint32_read failed\n", __func__); + return 1; + } + + return 0; +} + +int op_call(struct interp *const i) +{ + return op(i->cfg.f, i); +} + +int check_call(FILE *const f) +{ + return op(f, NULL); +} -- cgit v1.2.3