aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-03-23 17:12:03 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-03-23 17:12:23 +0100
commit1e5f6cbb08e449c6367a63f6c1bf1cad5e10b5ed (patch)
tree45551d8a043b36602a631ffab2ca21c2eb3bc000 /README.md
parent34f55e80f4a58d624e85a814c8809318c3af2e9e (diff)
fixing the assert dilema
fix
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index 9b6ff24..17df1cf 100644
--- a/README.md
+++ b/README.md
@@ -8,11 +8,24 @@ is not yet production tested but fully working.
* Example
+#include <stdarg.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "cheesemap.h"
+_Noreturn void panic_impl(const char* file, uint32_t line, const char* fmt,
+ ...) {
+ fprintf(stderr, "Panic at %s:%u: ", file, line);
+ va_list args;
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+ fprintf(stderr, "\n");
+ abort();
+}
+
// Convenience macro for array length
#define countof(arr) (sizeof(arr) / sizeof(*(arr)))
@@ -79,6 +92,7 @@ int main(void) {
cm_drop(&map);
return 0;
}
-```
Copyright © 2026 Fabrice
+```
+