Skip to content

Commit

Permalink
Replace tabs with spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
kano4 committed Mar 12, 2013
1 parent f63cd33 commit 3bad785
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions tools/mruby/mruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ usage(const char *name)

printf("Usage: %s [switches] programfile\n", name);
while(*p)
printf(" %s\n", *p++);
printf(" %s\n", *p++);
}

static int
Expand Down Expand Up @@ -189,14 +189,14 @@ showcallinfo(mrb_state *mrb)
if (irep->filename != NULL)
filename = irep->filename;
if (irep->lines != NULL) {
mrb_code *pc;
mrb_code *pc;

if (i+1 <= ciidx) {
pc = mrb->cibase[i+1].pc;
}
else {
pc = (mrb_code*)mrb_voidp(mrb_obj_iv_get(mrb, mrb->exc, mrb_intern(mrb, "lastpc")));
}
if (i+1 <= ciidx) {
pc = mrb->cibase[i+1].pc;
}
else {
pc = (mrb_code*)mrb_voidp(mrb_obj_iv_get(mrb, mrb->exc, mrb_intern(mrb, "lastpc")));
}
if (irep->iseq <= pc && pc < irep->iseq + irep->ilen) {
line = irep->lines[pc - irep->iseq - 1];
}
Expand All @@ -211,19 +211,16 @@ showcallinfo(mrb_state *mrb)
method = mrb_sym2name(mrb, ci->mid);
if (method) {
const char *cn = mrb_class_name(mrb, ci->proc->target_class);

if (cn) {
printf("\t[%d] %s:%d:in %s%s%s\n",
i, filename, line, cn, sep, method);
printf("\t[%d] %s:%d:in %s%s%s\n", i, filename, line, cn, sep, method);
}
else {
printf("\t[%d] %s:%d:in %s\n",
i, filename, line, method);
printf("\t[%d] %s:%d:in %s\n", i, filename, line, method);
}
}
else {
printf("\t[%d] %s:%d\n",
i, filename, line);
printf("\t[%d] %s:%d\n", i, filename, line);
}
}
}
Expand Down

0 comments on commit 3bad785

Please sign in to comment.