28 lines
426 B
C
28 lines
426 B
C
#include <log.h>
|
|
#include <ops.h>
|
|
#include <nanowasm/nw.h>
|
|
#include <wasm_types.h>
|
|
|
|
static int op(struct nw_interp *const i, FILE *const f)
|
|
{
|
|
varint7 sig;
|
|
|
|
if (varint7_read(f, &sig))
|
|
{
|
|
LOG("%s: varint7_read failed\n", __func__);
|
|
return -1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
int op_if(struct nw_interp *const i, FILE *const f)
|
|
{
|
|
return op(i, f);
|
|
}
|
|
|
|
int check_if(FILE *const f)
|
|
{
|
|
return op(NULL, f);
|
|
}
|