about summary refs log tree commit diff
path: root/boot/runtime/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/runtime/core.c')
-rw-r--r--boot/runtime/core.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/boot/runtime/core.c b/boot/runtime/core.c
index f6c4ef8..e377e0a 100644
--- a/boot/runtime/core.c
+++ b/boot/runtime/core.c
@@ -71,6 +71,22 @@ panic(const ascii* message, ...)
     exit(EXIT_FAILURE);
 }
 
+// minimal print helpers for plain c-strings.
+// TODO: de-c-stringify catboot, no c-strings should be exposed anywhere.
+void
+print(const ascii* s)
+{
+    fputs(s, stdout);
+}
+
+void
+println(const ascii* s)
+{
+    puts(s);
+}
+
+// `printf` is already linked in via <stdio.h>.
+
 void*
 allocate(size_t size)
 {
@@ -360,7 +376,7 @@ array_append(struct _Array* a, struct _Array* b)
     }
 
 #define ARRAY_FREE_ELEMENTS(type, array, free_action) \
-    FOR_EACH_ARRAY(type, array, { free_action(element); })
+    FOR_EACH_ARRAY (type, array, { free_action(element); })
 
 // a macro for iterating over a range of elements in an array.
 #define FOR_EACH_IN_RANGE(type, array, start, end, action)          \