diff --git a/jh.h b/jh.h index 3d42a5a..9c62ed7 100644 --- a/jh.h +++ b/jh.h @@ -20,6 +20,7 @@ To use this library, do this in *one* C: #define JH_INCLUDED #include +#include typedef uint8_t byte; typedef uint8_t u8; @@ -86,8 +87,8 @@ static inline int int_compare_desc(const void* a, const void* b) { /* Sorts an integer array in ascending or descending order. - This function uses the `qsort` function to sort an array of integers either - in ascending or descending order, based on the provided `order` argument. + This function uses the `qsort` function to sort an array of integers either. + In ascending or descending order, based on the provided `order` argument. The comparison is done using the standard integer comparison logic. @param array Pointer to the integer array to be sorted. diff --git a/jh_mem.h b/jh_mem.h index a44dbf8..b74fe11 100644 --- a/jh_mem.h +++ b/jh_mem.h @@ -35,6 +35,7 @@ And will require jh.h as it uses the typedefs defined in that file. #include #include #include +#include "jh.h" typedef struct Arena Arena; struct Arena { @@ -87,6 +88,7 @@ void temp_arena_memory_end(Temp_Arena_Memory temp); // implementation Below // -------------------------------------- +#ifdef JH_MEM_IMPLEMENTATION // -------------------------------------- // Arena Functions Start @@ -220,4 +222,5 @@ Arena arena_new(usize arena_init_size) { // Arena Functions END // -------------------------------------- +#endif #endif