diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,11 +1,12 @@ #include <stdio.h> #include <stdlib.h> +#include <inttypes.h> #include "fvm.h" -static void printnum(struct fvm *vm) { +static void print_num(struct fvm *vm) { int64_t n = fvm_pop(vm); - printf("%lld\n", n); + printf("%" PRId64 "\n", n); } int main(int argc, char **argv) { @@ -15,7 +16,7 @@ int main(int argc, char **argv) { return -1; } vm.syscall_table = malloc(256 * sizeof(fvm_syscall_fn_t)); - vm.syscall_table[1] = &printnum; + vm.syscall_table[1] = &print_num; FILE* fp = fopen(argv[1], "rb"); if (fp == NULL) { fprintf(stderr, "Failed to open file.\n"); |
