summaryrefslogtreecommitdiff
path: root/include/tinyff/common.h
diff options
context:
space:
mode:
authorTazyFoundSoup <gardendistrict0x0@outlook.com>2026-06-08 10:24:03 +1000
committerTazyFoundSoup <gardendistrict0x0@outlook.com>2026-06-08 10:24:03 +1000
commitc9f5da1d19e6ace5d6a7c650fe996f359e11d1a5 (patch)
treec5d61055549f1819d902e567f7227e0c3778300c /include/tinyff/common.h
parent62cbefa6a8fca583c6f600f1d7e24f0c61c91b1e (diff)
docs(headers): Clean up comments across public headers
Diffstat (limited to 'include/tinyff/common.h')
-rw-r--r--include/tinyff/common.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/include/tinyff/common.h b/include/tinyff/common.h
index d4215ed..2b17911 100644
--- a/include/tinyff/common.h
+++ b/include/tinyff/common.h
@@ -38,13 +38,12 @@
#endif
-// Flags
typedef bool ff_flag;
#define FF_ENABLE true
#define FF_DISABLE false
-// Functions
+// Byte-order conversion
static inline uint32_t ff_be32(const uint8_t *b) {
return ((uint32_t)b[0] << 24) |
@@ -76,7 +75,7 @@ static inline void ff_write_le32(uint8_t *out, uint32_t v)
out[3] = (v >> 24) & 0xFF;
}
-// Small stdlib helper functions
+// Freestanding stdlib replacements
static inline size_t ff_strlen(const char *str)
{
size_t len = 0;
@@ -113,8 +112,7 @@ static inline void *ff_memset(void *dest, int ch, size_t count) {
return dest;
}
-// Context bases
-// Default
+// Context and allocator
typedef struct {
void* (*ff_alloc)(size_t size);
@@ -123,11 +121,8 @@ typedef struct {
} ff_allocator;
typedef struct ff_ctx {
- // Debug settings
ff_stream ff_debug_stream;
ff_flag ff_debug_enabled;
-
- // Allocation
ff_allocator allocator;
#ifdef USE_BENCH