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/f64_const.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/op/f64_const.c (limited to 'src/op/f64_const.c') diff --git a/src/op/f64_const.c b/src/op/f64_const.c new file mode 100644 index 0000000..01c3401 --- /dev/null +++ b/src/op/f64_const.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include +#include +#include + +static int op(FILE *const f, struct interp *const i) +{ + varuint64 value; + + if (varuint64_read(f, &value)) + { + fprintf(stderr, "%s: varuint64_read failed\n", __func__); + return -1; + } + + return 0; +} + +int op_f64_const(struct interp *const i) +{ + return op(i->cfg.f, i); +} + +int check_f64_const(FILE *const f) +{ + return op(f, NULL); +} -- cgit v1.2.3