Code reshuffling
This commit is contained in:
parent
1e08830b4f
commit
6eec6f406d
|
@ -511,19 +511,33 @@ _hb_debug_msg_va (const char *what,
|
||||||
const char *message,
|
const char *message,
|
||||||
va_list ap)
|
va_list ap)
|
||||||
{
|
{
|
||||||
|
if (!_hb_debug (level, max_level))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
static const char bars[] = "││││││││││││││││││││││││││││││││││││││││";
|
static const char bars[] = "││││││││││││││││││││││││││││││││││││││││";
|
||||||
|
|
||||||
(void) (_hb_debug (level, max_level) &&
|
fprintf (stderr, "%-10s", what ? what : "");
|
||||||
(fprintf (stderr, "%-10s", what ? what : ""), TRUE) &&
|
|
||||||
((obj && fprintf (stderr, "(%p) ", obj), TRUE) || fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), ""), TRUE) &&
|
if (obj)
|
||||||
(indented && fprintf (stderr, "%2d %s├%s",
|
fprintf (stderr, "(%p) ", obj);
|
||||||
|
else
|
||||||
|
fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), "");
|
||||||
|
|
||||||
|
if (indented)
|
||||||
|
fprintf (stderr, "%2d %s├%s",
|
||||||
level,
|
level,
|
||||||
bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), 3 * level),
|
bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), 3 * level),
|
||||||
level_dir ? (level_dir > 0 ? "╮" : "╯") : "╴"), TRUE) &&
|
level_dir ? (level_dir > 0 ? "╮" : "╯") : "╴");
|
||||||
(!indented && fprintf (stderr, " ├╴"), TRUE) &&
|
else
|
||||||
(func && fprintf (stderr, "%s: ", func), TRUE) &&
|
fprintf (stderr, " ├╴");
|
||||||
(vfprintf (stderr, message, ap), TRUE) &&
|
|
||||||
fprintf (stderr, "\n"));
|
if (func)
|
||||||
|
fprintf (stderr, "%s: ", func);
|
||||||
|
|
||||||
|
if (message)
|
||||||
|
vfprintf (stderr, message, ap);
|
||||||
|
|
||||||
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue