From 3c514f8e20ea8762025a12f9edbea27967e31d76 Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Wed, 23 Aug 2017 14:20:07 -0400 Subject: 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 --- apps/plugins/puzzles/rbcompat.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'apps/plugins/puzzles/rbcompat.h') 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 @@ #include +#undef STR + int sprintf_wrapper(char *str, const char *fmt, ...); char *getenv_wrapper(const char *c); int puts_wrapper(const char *s); @@ -15,7 +17,6 @@ double cos_wrapper(double rads); int vsprintf_wrapper(char *s, const char *fmt, va_list ap); float fabs_wrapper(float n); float floor_wrapper(float n); -int ftoa(char *buf, int len, float f); float atan_wrapper(float x); float atan2_wrapper(float y, float x); @@ -60,14 +61,20 @@ double acos_wrapper(double x); #define strchr rb->strchr #define strcmp rb->strcmp #define strcpy rb->strcpy -#define strcspn strcspn_wrapper #define strlen rb->strlen -#define strspn strspn_wrapper #define strtol strtol_wrapper #define strtoq strtoq_wrapper #define strtouq strtouq_wrapper #define vsprintf vsprintf_wrapper +#ifndef strcspn +#define strcspn strcspn_wrapper +#endif + +#ifndef strspn /* gcc has builtin */ +#define strspn strspn_wrapper +#endif + #define abs(x) ((x)<0?-(x):(x)) /* work around compilation error */ -- cgit v1.2.3