aboutsummaryrefslogtreecommitdiff
path: root/backendC/CleanCompilerSources/backendsupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'backendC/CleanCompilerSources/backendsupport.h')
-rw-r--r--backendC/CleanCompilerSources/backendsupport.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/backendC/CleanCompilerSources/backendsupport.h b/backendC/CleanCompilerSources/backendsupport.h
new file mode 100644
index 0000000..a4ce716
--- /dev/null
+++ b/backendC/CleanCompilerSources/backendsupport.h
@@ -0,0 +1,22 @@
+/*
+ Clean string
+ ============
+*/
+typedef struct clean_string {int length; char chars [1]; } *CleanString;
+
+/*
+ Debugging
+ =========
+*/
+
+extern void AssertionFailed (char *conditionString, char *file, int line);
+# define Assert(condition) {if (!(condition)) AssertionFailed ("!(" #condition ")", __FILE__, __LINE__);}
+
+/*
+ Memory management
+ =================
+*/
+extern void FreeConvertBuffers (void);
+extern void *ConvertAlloc (SizeT size);
+# define ConvertAllocType(t) ((t*) ConvertAlloc (SizeOf (t)))
+# define ArraySize(array) ((unsigned) (sizeof (array) / sizeof (array[0]))) \ No newline at end of file