[examples] starting notes in overrides example; start cleaning up overrides

This commit is contained in:
Allen Webster
2021-10-08 15:25:58 -07:00
parent 95731945d0
commit 204af74b31
3 changed files with 48 additions and 8 deletions
+6
View File
@@ -4,6 +4,11 @@
** Overrides & Options Macros
**
** Overridable
** "basic types" ** REQUIRED
** #define/typedef MD_i8, MD_i16, MD_i32, MD_i64
** #define/typedef MD_u8, MD_u16, MD_u32, MD_u64
** #define/typedef MD_f32, MD_f64
**
** "memset" ** REQUIRED
** #define MD_IMPL_Memset (void*, int, uint64) -> void*
** #define MD_IMPL_Memmove (void*, void*, uint64) -> void*
@@ -42,6 +47,7 @@
**
** Default Implementation Controls
** These controls default to '1' i.e. 'enabled'
** #define MD_DEFAULT_BASIC_TYPES -> construct "basic types" from stdint.h header
** #define MD_DEFAULT_MEMSET -> construct "memset" from CRT
** #define MD_DEFAULT_FILE_ITER -> construct "file iteration" from OS headers
** #define MD_DEFAULT_MEMORY -> construct "low level memory" from OS headers
+13 -5
View File
@@ -29,6 +29,9 @@
#define MD_VERSION_MIN 0
//~ Set default values for controls
#if !defined(MD_DEFAULT_BASIC_TYPES)
# define MD_DEFAULT_BASIC_TYPES 1
#endif
#if !defined(MD_DEFAULT_MEMSET)
# define MD_DEFAULT_MEMSET 1
#endif
@@ -374,9 +377,11 @@
//~ Basic Types
#include <stdint.h>
#include <stdarg.h>
#if defined(MD_DEFAULT_BASIC_TYPES)
#include <stdint.h>
typedef int8_t MD_i8;
typedef int16_t MD_i16;
typedef int32_t MD_i32;
@@ -385,13 +390,16 @@ typedef uint8_t MD_u8;
typedef uint16_t MD_u16;
typedef uint32_t MD_u32;
typedef uint64_t MD_u64;
typedef int8_t MD_b8;
typedef int16_t MD_b16;
typedef int32_t MD_b32;
typedef int64_t MD_b64;
typedef float MD_f32;
typedef double MD_f64;
#endif
typedef MD_i8 MD_b8;
typedef MD_i16 MD_b16;
typedef MD_i32 MD_b32;
typedef MD_i64 MD_b64;
//~ Default Arena
#if MD_DEFAULT_ARENA