From bfd0179042b0b02fb88748d54e56e7e208bb117f Mon Sep 17 00:00:00 2001 From: Marcin Bukat Date: Wed, 2 Apr 2014 20:46:06 +0200 Subject: Revert "Update lua plugin to 5.2.3" FILE typedef to *void needs more work to not break sim and application builds. I checked only a few random native builds unfortunately. Sorry for inconvenience. --- apps/plugins/lua/rockconf.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'apps/plugins/lua/rockconf.h') diff --git a/apps/plugins/lua/rockconf.h b/apps/plugins/lua/rockconf.h index eda1e05..a13146d 100644 --- a/apps/plugins/lua/rockconf.h +++ b/apps/plugins/lua/rockconf.h @@ -25,6 +25,10 @@ #include "plugin.h" #include +#undef LUAI_THROW +#undef LUAI_TRY +#undef luai_jmpbuf + #undef LUA_PATH_DEFAULT #define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" @@ -32,11 +36,20 @@ #include "lib/pluginlib_exit.h" +#define LUAI_THROW(L,c) longjmp((c)->b, 1) +#define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } +#define luai_jmpbuf jmp_buf + extern char curpath[MAX_PATH]; struct tm *gmtime(const time_t *timep); long strtol(const char *nptr, char **endptr, int base); unsigned long strtoul(const char *str, char **endptr, int base); size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); +long lfloor(long x); +long lpow(long x, long y); + +#define floor lfloor +#define pow lpow /* Simple substitutions */ #define malloc tlsf_malloc @@ -50,17 +63,5 @@ size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); #define strcpy rb->strcpy #define strlen rb->strlen -#define getlocaledecpoint() '.' -#define abort() exit(EXIT_FAILURE) -#define difftime(t1,t0) ((t1) - (t0)) -#define localtime gmtime -#if CONFIG_RTC -#define time(x) mktime(rb->get_time()) -#define mktime rb->mktime -#else -#define time(x) (0) -#define mktime(x) (0) -#endif - #endif /* _ROCKCONF_H_ */ -- cgit v1.1