From 1248e2ba8afca860656891c98ac8e79f1fdef797 Mon Sep 17 00:00:00 2001 From: murase_syuka Date: Thu, 27 Nov 2014 01:12:01 +0900 Subject: adhoc fix for pass build --- mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c index 9764d4e07..066293912 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c @@ -60,7 +60,8 @@ print_api_common_error(int32_t error) #undef STRTOUL #define STRTOUL(ul,s) \ ul = 0; \ - for(int i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0'); + int i = 0; \ + for(i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0'); static int32_t parse_breakpoint_no(char* args) -- cgit v1.2.3 From 39b4caea81164b9a224e6abf715769c59f20c891 Mon Sep 17 00:00:00 2001 From: murase_syuka Date: Sat, 29 Nov 2014 01:02:40 +0900 Subject: closing to Local Scope --- mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c index 066293912..9759badfe 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/cmdbreak.c @@ -58,10 +58,11 @@ print_api_common_error(int32_t error) } #undef STRTOUL -#define STRTOUL(ul,s) \ +#define STRTOUL(ul,s) { \ + int i; \ ul = 0; \ - int i = 0; \ - for(i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0'); + for(i=0; ISDIGIT(s[i]); i++) ul = 10*ul + (s[i] -'0'); \ +} static int32_t parse_breakpoint_no(char* args) -- cgit v1.2.3 From f6d15cfc38b7995c6b1e5c1505b46075a46842b2 Mon Sep 17 00:00:00 2001 From: cremno Date: Tue, 2 Dec 2014 00:32:27 +0100 Subject: fix ISBLANK() for Visual Studio < 2013 (ref #2658) Visual Studio versions older than 2013 lack C99's isblank(). Since only ASCII characters are passed to it, implement it directly without calling the locale-specific isblank(). --- include/mruby.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mruby.h b/include/mruby.h index 5b8d08b5b..68b0c5b79 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -359,7 +359,7 @@ MRB_API mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self); #define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c))) #define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c))) #define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c))) -#define ISBLANK(c) (ISASCII(c) && isblank((int)(unsigned char)(c))) +#define ISBLANK(c) (ISASCII(c) && ((c) == ' ' || (c) == '\t')) #define ISCNTRL(c) (ISASCII(c) && iscntrl((int)(unsigned char)(c))) #define TOUPPER(c) (ISASCII(c) ? toupper((int)(unsigned char)(c)) : (c)) #define TOLOWER(c) (ISASCII(c) ? tolower((int)(unsigned char)(c)) : (c)) -- cgit v1.2.3