Lua interpreter now running inside companion!

This commit is contained in:
Bertrand Songis
2014-02-10 10:31:14 +01:00
parent 8f08a61d12
commit 330234df01
4 changed files with 46 additions and 8 deletions
+7 -5
View File
@@ -12,7 +12,9 @@
#include <stddef.h>
// #define LUA_LIB
#define USE_FATFS
#if !defined(SIMU)
#define USE_FATFS
#endif
/*
** ==================================================================
@@ -443,14 +445,14 @@
*/
/* the following operations need the math library */
#if defined(lobject_c) || defined(lvm_c)
//#if defined(lobject_c) || defined(lvm_c)
#include <math.h>
#define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b))
#define luai_numpow(L,a,b) (l_mathop(pow)(a,b))
#endif
//#endif
/* these are quite standard operations */
#if defined(LUA_CORE)
// #if defined(LUA_CORE)
#define luai_numadd(L,a,b) ((a)+(b))
#define luai_numsub(L,a,b) ((a)-(b))
#define luai_nummul(L,a,b) ((a)*(b))
@@ -460,7 +462,7 @@
#define luai_numlt(L,a,b) ((a)<(b))
#define luai_numle(L,a,b) ((a)<=(b))
#define luai_numisnan(L,a) (!luai_numeq((a), (a)))
#endif
// #endif