aboutsummaryrefslogtreecommitdiff
path: root/src/util.hff
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.hff')
-rw-r--r--src/util.hff12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util.hff b/src/util.hff
new file mode 100644
index 0000000..5eb9c88
--- /dev/null
+++ b/src/util.hff
@@ -0,0 +1,12 @@
+// util.cff
+extern fn xmalloc(n usize) *void;
+extern fn xcalloc(n usize, m usize) *void;
+extern fn xrealloc(p *void, n usize) *void;
+extern fn xstrdup(str *const u8) *u8;
+def FNV1A_INI u32 = 0x811c9dc5;
+extern fn fnv1a(h u32, [#]const u8) u32;
+extern fn fnv1a_s(h u32, *const u8) u32;
+extern fn fnv1a_i(h u32, i64) u32;
+extern fn addfilepath(*const u8) int;
+// extern fn fatal(*Parser, Loc, fmt *const u8, ...) void;
+extern fn internstr(*const u8) *const u8;