#include "c4d_memory.h"
#include "c4d_general.h"
#include "c4d_coffee.h"


Coffee* GeCoffeeAlloc()
{
	return C4DOS.Co->GeCoffeeAlloc();
}

void GeCoffeeFree(Coffee* &cof)
{
	C4DOS.Co->GeCoffeeFree(cof);
}

Bool GeCoffeeCompileString(Coffee* cof, const String& src)
{
	return C4DOS.Co->GeCoffeeCompileString(cof,src);
}

Bool GeCoffeeCompileFile(Coffee* cof, const Filename& file)
{
	return C4DOS.Co->GeCoffeeCompileFile(cof,file);
}

VALUE* GeCoffeeAddGlobalSymbol(Coffee* cof, const String& name)
{
	return C4DOS.Co->GeCoffeeAddGlobalSymbol(cof,name);
}

VALUE* GeCoffeeFindGlobalSymbol(Coffee* cof, const String& name)
{
	return C4DOS.Co->GeCoffeeFindGlobalSymbol(cof,name);
}

Bool GeCoffeeExecute(Coffee* cof, VALUE* func, GeData* retval, GeData* arg1, GeData* arg2, GeData* arg3)
{
	return C4DOS.Co->GeCoffeeExecute(cof,func,retval,arg1,arg2,arg3);
}

Bool GeCoffeeGeData2Value(Coffee* cof, const GeData& src, VALUE* dest)
{
	return C4DOS.Co->GeCoffeeGeData2Value(cof,src,dest);
}

Bool GeCoffeeValue2GeData(Coffee* cof, VALUE *src, GeData* dest)
{
	return C4DOS.Co->GeCoffeeValue2GeData(cof,src,dest);
}

Bool GeCoffeeGetLastError(Coffee* cof, String *err_string, LONG *err_line, LONG *err_pos)
{
	return C4DOS.Co->GeCoffeeGetLastError(cof,err_string,err_line,err_pos);
}

Bool CoffeeEditor_Open(BaseList2D *obj,CoffeeEditorCallback *callback)
{
	return C4DOS.Co->CoffeeEditor_Open(obj,callback);
}
