backendsupport.h 619 Bytes
Newer Older
clean's avatar
clean committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/*
	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__);}

15
16
extern void fatal_backend_error (char *s);

clean's avatar
clean committed
17
18
19
20
/*
	Memory management
	=================
*/
21
22
# define FreeConvertBuffers()
# define ConvertAlloc(size) CompAlloc (size)
clean's avatar
clean committed
23
# define ConvertAllocType(t) ((t*) ConvertAlloc (SizeOf (t)))
24
# define ArraySize(array)	((unsigned) (sizeof (array) / sizeof (array[0])))