diff options
author | Franklin Wei <git@fwei.tk> | 2017-08-23 14:20:07 -0400 |
---|---|---|
committer | Franklin Wei <git@fwei.tk> | 2017-08-23 14:22:09 -0400 |
commit | 3c514f8e20ea8762025a12f9edbea27967e31d76 (patch) | |
tree | ed44527b00a128ce85f507e1abda8dbbbf7de4cb /apps/plugins/puzzles/rbcompat.h | |
parent | 4dd300d9f0229269aa8f9a46b07a5aa65f882985 (diff) | |
download | rockbox-3c514f8e20ea8762025a12f9edbea27967e31d76.tar.gz rockbox-3c514f8e20ea8762025a12f9edbea27967e31d76.zip |
puzzles: misc. changes and sync with upstream
This brings puzzles up-to-date with Simon's tree, along with the
rockbox-specific changes I made. Note that I also got rid of some
of the ugly floating-point code in rbwrappers.c and replaced it
with wrappers for our fixed-point library.
Change-Id: Ibfb79acb15517116a26de1c3ea89e025146b9e2e
Diffstat (limited to 'apps/plugins/puzzles/rbcompat.h')
-rw-r--r-- | apps/plugins/puzzles/rbcompat.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/plugins/puzzles/rbcompat.h b/apps/plugins/puzzles/rbcompat.h index 66c86f1cf4..ed1ae87653 100644 --- a/apps/plugins/puzzles/rbcompat.h +++ b/apps/plugins/puzzles/rbcompat.h | |||
@@ -7,6 +7,8 @@ | |||
7 | 7 | ||
8 | #include <tlsf.h> | 8 | #include <tlsf.h> |
9 | 9 | ||
10 | #undef STR | ||
11 | |||
10 | int sprintf_wrapper(char *str, const char *fmt, ...); | 12 | int sprintf_wrapper(char *str, const char *fmt, ...); |
11 | char *getenv_wrapper(const char *c); | 13 | char *getenv_wrapper(const char *c); |
12 | int puts_wrapper(const char *s); | 14 | int puts_wrapper(const char *s); |
@@ -15,7 +17,6 @@ double cos_wrapper(double rads); | |||
15 | int vsprintf_wrapper(char *s, const char *fmt, va_list ap); | 17 | int vsprintf_wrapper(char *s, const char *fmt, va_list ap); |
16 | float fabs_wrapper(float n); | 18 | float fabs_wrapper(float n); |
17 | float floor_wrapper(float n); | 19 | float floor_wrapper(float n); |
18 | int ftoa(char *buf, int len, float f); | ||
19 | 20 | ||
20 | float atan_wrapper(float x); | 21 | float atan_wrapper(float x); |
21 | float atan2_wrapper(float y, float x); | 22 | float atan2_wrapper(float y, float x); |
@@ -60,14 +61,20 @@ double acos_wrapper(double x); | |||
60 | #define strchr rb->strchr | 61 | #define strchr rb->strchr |
61 | #define strcmp rb->strcmp | 62 | #define strcmp rb->strcmp |
62 | #define strcpy rb->strcpy | 63 | #define strcpy rb->strcpy |
63 | #define strcspn strcspn_wrapper | ||
64 | #define strlen rb->strlen | 64 | #define strlen rb->strlen |
65 | #define strspn strspn_wrapper | ||
66 | #define strtol strtol_wrapper | 65 | #define strtol strtol_wrapper |
67 | #define strtoq strtoq_wrapper | 66 | #define strtoq strtoq_wrapper |
68 | #define strtouq strtouq_wrapper | 67 | #define strtouq strtouq_wrapper |
69 | #define vsprintf vsprintf_wrapper | 68 | #define vsprintf vsprintf_wrapper |
70 | 69 | ||
70 | #ifndef strcspn | ||
71 | #define strcspn strcspn_wrapper | ||
72 | #endif | ||
73 | |||
74 | #ifndef strspn /* gcc has builtin */ | ||
75 | #define strspn strspn_wrapper | ||
76 | #endif | ||
77 | |||
71 | #define abs(x) ((x)<0?-(x):(x)) | 78 | #define abs(x) ((x)<0?-(x):(x)) |
72 | 79 | ||
73 | /* work around compilation error */ | 80 | /* work around compilation error */ |