add a space between for and (

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-05-21 22:55:32 +09:00
parent f1a3cfbd3b
commit 6a6c0869dc
4 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ inspect_ary(mrb_state *mrb, mrb_value ary, mrb_value list)
char tail[] = { ']' };
/* check recursive */
for(i=0; i<RARRAY_LEN(list); i++) {
for (i=0; i<RARRAY_LEN(list); i++) {
if (mrb_obj_equal(mrb, ary, RARRAY_PTR(list)[i])) {
return mrb_str_new(mrb, "[...]", 5);
}
@@ -117,7 +117,7 @@ inspect_ary(mrb_state *mrb, mrb_value ary, mrb_value list)
arystr = mrb_str_new_capa(mrb, 64);
mrb_str_cat(mrb, arystr, head, sizeof(head));
for(i=0; i<RARRAY_LEN(ary); i++) {
for (i=0; i<RARRAY_LEN(ary); i++) {
int ai = mrb_gc_arena_save(mrb);
if (i > 0) {
@@ -68,7 +68,7 @@ get_break_index(mrb_debug_context *dbg, uint32_t bpno)
int32_t index;
char hit = FALSE;
for(i = 0 ; i < dbg->bpnum; i++) {
for (i = 0 ; i < dbg->bpnum; i++) {
if (dbg->bp[i].bpno == bpno) {
hit = TRUE;
index = i;
@@ -341,7 +341,7 @@ mrb_debug_delete_break(mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno)
free_breakpoint(mrb, &dbg->bp[index]);
for(i = index ; i < dbg->bpnum; i++) {
for (i = index ; i < dbg->bpnum; i++) {
if ((i + 1) == dbg->bpnum) {
dbg->bp[i] = (mrb_debug_breakpoint){0};
}
@@ -364,7 +364,7 @@ mrb_debug_delete_break_all(mrb_state *mrb, mrb_debug_context *dbg)
return MRB_DEBUG_INVALID_ARGUMENT;
}
for(i = 0 ; i < dbg->bpnum ; i++) {
for (i = 0 ; i < dbg->bpnum ; i++) {
free_breakpoint(mrb, &dbg->bp[i]);
}
@@ -401,7 +401,7 @@ mrb_debug_enable_break_all(mrb_state *mrb, mrb_debug_context *dbg)
return MRB_DEBUG_INVALID_ARGUMENT;
}
for(i = 0 ; i < dbg->bpnum; i++) {
for (i = 0 ; i < dbg->bpnum; i++) {
dbg->bp[i].enable = TRUE;
}
@@ -436,7 +436,7 @@ mrb_debug_disable_break_all(mrb_state *mrb, mrb_debug_context *dbg)
return MRB_DEBUG_INVALID_ARGUMENT;
}
for(i = 0 ; i < dbg->bpnum; i++) {
for (i = 0 ; i < dbg->bpnum; i++) {
dbg->bp[i].enable = FALSE;
}
@@ -470,7 +470,7 @@ mrb_debug_check_breakpoint_line(mrb_state *mrb, mrb_debug_context *dbg, const ch
}
bp = dbg->bp;
for(i=0; i<dbg->bpnum; i++) {
for (i=0; i<dbg->bpnum; i++) {
switch (bp->type) {
case MRB_DEBUG_BPTYPE_LINE:
if (bp->enable == TRUE) {
@@ -504,7 +504,7 @@ mrb_debug_check_breakpoint_method(mrb_state *mrb, mrb_debug_context *dbg, struct
}
bp = dbg->bp;
for(i=0; i<dbg->bpnum; i++) {
for (i=0; i<dbg->bpnum; i++) {
if (bp->type == MRB_DEBUG_BPTYPE_METHOD) {
if (bp->enable == TRUE) {
bpno = compare_break_method(mrb, bp, class_obj, method_sym, isCfunc);
@@ -61,7 +61,7 @@ print_api_common_error(int32_t error)
#define STRTOUL(ul,s) { \
int i; \
ul = 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
@@ -106,7 +106,7 @@ exe_set_command_select(mrb_state *mrb, mrdb_state *mrdb, select_command_func fun
int32_t bpno = 0;
int32_t i;
for(i=1; i<mrdb->wcnt; i++) {
for (i=1; i<mrdb->wcnt; i++) {
ps = mrdb->words[i];
bpno = parse_breakpoint_no(ps);
if (bpno == 0) {
@@ -199,7 +199,7 @@ info_break_all(mrb_state *mrb, mrdb_state *mrdb)
return;
}
puts(BREAK_INFO_MSG_HEADER);
for(i = 0 ; i < bpnum ; i++) {
for (i = 0 ; i < bpnum ; i++) {
print_breakpoint(&bp_list[i]);
}
@@ -216,7 +216,7 @@ info_break_select(mrb_state *mrb, mrdb_state *mrdb)
mrb_bool isFirst = TRUE;
int32_t i;
for(i=2; i<mrdb->wcnt; i++) {
for (i=2; i<mrdb->wcnt; i++) {
ps = mrdb->words[i];
bpno = parse_breakpoint_no(ps);
if (bpno == 0) {
+1 -1
View File
@@ -22,7 +22,7 @@ os_memsize_of_irep(mrb_state* state, const struct mrb_irep *irep)
(irep->plen * sizeof(mrb_code)) +
(irep->ilen * sizeof(mrb_code));
for(i = 0; i < irep->rlen; i++) {
for (i = 0; i < irep->rlen; i++) {
size += os_memsize_of_irep(state, irep->reps[i]);
}
return size;