diff options
Diffstat (limited to 'apps/plugins/lua/rockconf.h')
-rw-r--r-- | apps/plugins/lua/rockconf.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/plugins/lua/rockconf.h b/apps/plugins/lua/rockconf.h index a13146d7e9..eda1e05084 100644 --- a/apps/plugins/lua/rockconf.h +++ b/apps/plugins/lua/rockconf.h | |||
@@ -25,10 +25,6 @@ | |||
25 | #include "plugin.h" | 25 | #include "plugin.h" |
26 | #include <tlsf.h> | 26 | #include <tlsf.h> |
27 | 27 | ||
28 | #undef LUAI_THROW | ||
29 | #undef LUAI_TRY | ||
30 | #undef luai_jmpbuf | ||
31 | |||
32 | #undef LUA_PATH_DEFAULT | 28 | #undef LUA_PATH_DEFAULT |
33 | #define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" | 29 | #define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" |
34 | 30 | ||
@@ -36,20 +32,11 @@ | |||
36 | 32 | ||
37 | #include "lib/pluginlib_exit.h" | 33 | #include "lib/pluginlib_exit.h" |
38 | 34 | ||
39 | #define LUAI_THROW(L,c) longjmp((c)->b, 1) | ||
40 | #define LUAI_TRY(L,c,a) if (setjmp((c)->b) == 0) { a } | ||
41 | #define luai_jmpbuf jmp_buf | ||
42 | |||
43 | extern char curpath[MAX_PATH]; | 35 | extern char curpath[MAX_PATH]; |
44 | struct tm *gmtime(const time_t *timep); | 36 | struct tm *gmtime(const time_t *timep); |
45 | long strtol(const char *nptr, char **endptr, int base); | 37 | long strtol(const char *nptr, char **endptr, int base); |
46 | unsigned long strtoul(const char *str, char **endptr, int base); | 38 | unsigned long strtoul(const char *str, char **endptr, int base); |
47 | size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); | 39 | size_t strftime(char* dst, size_t max, const char* format, const struct tm* tm); |
48 | long lfloor(long x); | ||
49 | long lpow(long x, long y); | ||
50 | |||
51 | #define floor lfloor | ||
52 | #define pow lpow | ||
53 | 40 | ||
54 | /* Simple substitutions */ | 41 | /* Simple substitutions */ |
55 | #define malloc tlsf_malloc | 42 | #define malloc tlsf_malloc |
@@ -63,5 +50,17 @@ long lpow(long x, long y); | |||
63 | #define strcpy rb->strcpy | 50 | #define strcpy rb->strcpy |
64 | #define strlen rb->strlen | 51 | #define strlen rb->strlen |
65 | 52 | ||
53 | #define getlocaledecpoint() '.' | ||
54 | #define abort() exit(EXIT_FAILURE) | ||
55 | #define difftime(t1,t0) ((t1) - (t0)) | ||
56 | #define localtime gmtime | ||
57 | #if CONFIG_RTC | ||
58 | #define time(x) mktime(rb->get_time()) | ||
59 | #define mktime rb->mktime | ||
60 | #else | ||
61 | #define time(x) (0) | ||
62 | #define mktime(x) (0) | ||
63 | #endif | ||
64 | |||
66 | #endif /* _ROCKCONF_H_ */ | 65 | #endif /* _ROCKCONF_H_ */ |
67 | 66 | ||