Fixed some minor compilation errors and indented the function names in the utilities further

This commit is contained in:
Eric-Paul Ickhorn 2023-11-28 21:28:57 +01:00
parent 20f1d2b5ac
commit 9fa1d70eb2
3 changed files with 23 additions and 17 deletions

View File

@ -34,36 +34,38 @@ typedef i64_t isz_t;
bool_t pac_rune_is_lower_letter (rune_t rune);
bool_t pac_rune_is_upper_letter (rune_t rune);
bool_t pac_rune_is_letter (rune_t rune);
bool_t pac_rune_is_digit (rune_t rune);
bool_t pac_rune_is_blank (rune_t rune);
bool_t pac_rune_is_sign (rune_t rune);
bool_t pac_rune_is_lower_letter (rune_t rune);
bool_t pac_rune_is_upper_letter (rune_t rune);
bool_t pac_rune_is_letter (rune_t rune);
bool_t pac_rune_is_digit (rune_t rune);
bool_t pac_rune_is_blank (rune_t rune);
bool_t pac_rune_is_sign (rune_t rune);
void pac_memory_copy (void *destination, void *source, usz_t length);
void pac_memory_fill (void *region, usz_t len_region, u8_t byte);
void pac_memory_zero (void *region, usz_t len_region);
void pac_memory_copy (void *destination, void *source, usz_t length);
void pac_memory_fill (void *region, usz_t len_region, u8_t byte);
void pac_memory_zero (void *region, usz_t len_region);
typedef struct pac_arena
typedef struct pac_arena pac_arena_s;
struct pac_arena
{
usz_t len_allocation;
usz_t offset;
void *allocation;
pac_arena_s *continuation;
} pac_arena_s;
};
pac_arena_s pac_create_arena (usz_t size);
void pac_delete_arena (pac_arena_s arena);
pac_arena_s pac_create_arena (usz_t size);
void pac_delete_arena (pac_arena_s arena);
void pac_free_arena (pac_arena_s *arena);
pac_arena_s * pac_new_arena (usz_t size);
void pac_free_arena (pac_arena_s *arena);
pac_arena_s * pac_new_arena (usz_t size);
void * pac_arena_alloc (pac_arena_s *arena, usz_t length);
void * pac_arena_alloc (pac_arena_s *arena, usz_t length);
#endif // Include Guard (TN_UTIL_TYPES_H)

View File

@ -1,5 +1,7 @@
#include <utility.h>
#include <stdlib.h>
pac_arena_s pac_create_arena(usz_t size)
{
pac_arena_s arena;

View File

@ -1,5 +1,7 @@
#include <logger.h>
#include <stdlib.h>
pac_logger_s pac_create_logger()
{
pac_logger_s logger;
@ -41,5 +43,5 @@ void pac_log_naming_error(pac_logger_s *logger, pac_naming_error_s error)
void * pac_log_alloc(pac_logger_s *logger, usz_t num_bytes)
{
return ac_arena_alloc(logger->string_arena, num_bytes);
return pac_arena_alloc(&logger->string_arena, num_bytes);
}