Some cleanup.

This commit is contained in:
2025-02-15 08:44:47 +02:00
parent 76e06b86c7
commit 597e84da8e
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -20,6 +20,7 @@ To use this library, do this in *one* C:
#define JH_INCLUDED #define JH_INCLUDED
#include <stdio.h> #include <stdio.h>
#include <stdint.h>
typedef uint8_t byte; typedef uint8_t byte;
typedef uint8_t u8; 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. Sorts an integer array in ascending or descending order.
This function uses the `qsort` function to sort an array of integers either This function uses the `qsort` function to sort an array of integers either.
in ascending or descending order, based on the provided `order` argument. In ascending or descending order, based on the provided `order` argument.
The comparison is done using the standard integer comparison logic. The comparison is done using the standard integer comparison logic.
@param array Pointer to the integer array to be sorted. @param array Pointer to the integer array to be sorted.
+3
View File
@@ -35,6 +35,7 @@ And will require jh.h as it uses the typedefs defined in that file.
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include "jh.h"
typedef struct Arena Arena; typedef struct Arena Arena;
struct Arena { struct Arena {
@@ -87,6 +88,7 @@ void temp_arena_memory_end(Temp_Arena_Memory temp);
// implementation Below // implementation Below
// -------------------------------------- // --------------------------------------
#ifdef JH_MEM_IMPLEMENTATION
// -------------------------------------- // --------------------------------------
// Arena Functions Start // Arena Functions Start
@@ -221,3 +223,4 @@ Arena arena_new(usize arena_init_size) {
// -------------------------------------- // --------------------------------------
#endif #endif
#endif