about summary refs log tree commit diff
path: root/boot/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/common.c')
-rw-r--r--boot/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/boot/common.c b/boot/common.c
index 095aaa6..79f5d63 100644
--- a/boot/common.c
+++ b/boot/common.c
@@ -48,6 +48,13 @@
 
 #define NORETURN _Noreturn
 
+// macro used as target for embedding binary files during build into a byte array.
+// usage: `const byte test_data[] = CATSKILL_EMBED(./files/test_data.txt);`
+// the array will be filled with hexadecimal values of the file contents,
+// with a nil byte appended at the end.
+// the size of the array can be retrieved through `strlen(array)`, or `ARRAY_SIZE(array)-1`.
+#define CATSKILL_EMBED(...) {0}
+
 // ansi escape codes for terminal color and style
 #define ANSI(code) "\33[" code "m"