Fixing function colorization

This commit is contained in:
Anton Kochkov 2013-06-21 22:13:43 +04:00
parent d2af5ae7ab
commit 3be06f30c0

View File

@ -473,14 +473,19 @@ toro:
r_cons_printf ("|- %s (%d)\n| ", f->name, f->size);
} else {
const char *fmt = show_color?
"/ %s: %s"Color_RESET" (%d)\n| ":
"/ %s%s: %s"Color_RESET" (%d)\n| ":
"/ %s: %s (%d)\n| ";
if (show_color)
r_cons_printf(color_fname);
r_cons_printf (fmt,
(f->type==R_ANAL_FCN_TYPE_FCN||f->type==R_ANAL_FCN_TYPE_SYM)?"function":
(f->type==R_ANAL_FCN_TYPE_IMP)?"import":"loc",
f->name, f->size);
r_cons_printf (fmt, color_fname,
(f->type==R_ANAL_FCN_TYPE_FCN||f->type==R_ANAL_FCN_TYPE_SYM)?"function":
(f->type==R_ANAL_FCN_TYPE_IMP)?"import":"loc",
f->name, f->size);
else
r_cons_printf (fmt,
(f->type==R_ANAL_FCN_TYPE_FCN||f->type==R_ANAL_FCN_TYPE_SYM)?"function":
(f->type==R_ANAL_FCN_TYPE_IMP)?"import":"loc",
f->name, f->size);
}
if (sign) r_cons_printf ("// %s\n", sign);
free (sign);