From 832bafccff577246dde2d11c23582f6a644c6c94 Mon Sep 17 00:00:00 2001 From: talha Date: Wed, 13 Mar 2024 23:18:29 +0500 Subject: Refactored Memory, Removed Strings --- strings/strings.h | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 strings/strings.h (limited to 'strings/strings.h') diff --git a/strings/strings.h b/strings/strings.h deleted file mode 100644 index dbaff7a..0000000 --- a/strings/strings.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef AMR_STR -#define AMR_STR - -#include -#include - -#define MemCopy memcpy - -// @todo: the function names have been changed a bit for the interest -// of speed. Some structs and functions share the same names, so -// I need to fix this but also make sure the functions have good names - -enum StrStatus {STR_OK=0, STR_FULL}; - -struct str8 { - u8 *buffer; - u64 size; -}; - -struct str8_node { - str8_node *next; - str8 string; -}; - -struct str8_list { - str8_node *first; - str8_node *last; - u64 count; - u64 capacity; -}; - -struct res_str8 { - str8 string; - u64 bytes_count; - enum StrStatus status; -}; - -struct str8 Str8(u8 *string, u64 size); -u64 CstrSize(const char* cstr); -struct res_str8 Str8InitCstr(struct arena *a, const char* cstr, u64 size); - -#endif -- cgit v1.2.3