diff options
-rw-r--r-- | lib/base.c | 5 | ||||
-rw-r--r-- | lib/base.h | 2 | ||||
-rw-r--r-- | lib/inst.c | 4 | ||||
-rw-r--r-- | lib/inst.h | 6 |
4 files changed, 9 insertions, 8 deletions
@@ -10,11 +10,10 @@ * Description: Implementation of basic library functions */ -#include <endian.h> -#include <string.h> - #include "./base.h" +#include <string.h> + hword convert_bytes_to_hword(byte *bytes) { hword be_h = 0; @@ -13,6 +13,8 @@ #ifndef BASE_H #define BASE_H +#define _DEFAULT_SOURCE +#include <endian.h> #include <stdint.h> /* Basic macros for a variety of uses. Quite self explanatory. */ @@ -10,13 +10,13 @@ * Description: Implementation of bytecode for instructions */ +#include "./inst.h" + #include <assert.h> #include <stdbool.h> #include <stdio.h> #include <string.h> -#include "./inst.h" - const char *opcode_as_cstr(opcode_t code) { switch (code) @@ -13,12 +13,12 @@ #ifndef INST_H #define INST_H -#include <stdio.h> -#include <stdlib.h> - #include <lib/base.h> #include <lib/darr.h> +#include <stdio.h> +#include <stdlib.h> + typedef enum { OP_NOOP = 0, |