Use octal-escaped UTF-8 characters instead of plain text
https://bugs.freedesktop.org/show_bug.cgi?id=50970
This commit is contained in:
parent
8c0ea7bcb4
commit
6932a41fb6
|
@ -557,13 +557,20 @@ _hb_debug_msg_va (const char *what,
|
||||||
fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), "");
|
fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), "");
|
||||||
|
|
||||||
if (indented) {
|
if (indented) {
|
||||||
static const char bars[] = "││││││││││││││││││││││││││││││││││││││││";
|
/* One may want to add ASCII version of these. See:
|
||||||
fprintf (stderr, "%2d %s├%s",
|
* https://bugs.freedesktop.org/show_bug.cgi?id=50970 */
|
||||||
|
#define VBAR "\342\224\202" /* U+2502 BOX DRAWINGS LIGHT VERTICAL */
|
||||||
|
#define VRBAR "\342\224\234" /* U+251C BOX DRAWINGS LIGHT VERTICAL AND RIGHT */
|
||||||
|
#define DLBAR "\342\225\256" /* U+256E BOX DRAWINGS LIGHT ARC DOWN AND LEFT */
|
||||||
|
#define ULBAR "\342\225\257" /* U+256F BOX DRAWINGS LIGHT ARC UP AND LEFT */
|
||||||
|
#define LBAR "\342\225\264" /* U+2574 BOX DRAWINGS LIGHT LEFT */
|
||||||
|
static const char bars[] = VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR VBAR;
|
||||||
|
fprintf (stderr, "%2d %s" VRBAR "%s",
|
||||||
level,
|
level,
|
||||||
bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), 3 * level),
|
bars + sizeof (bars) - 1 - MIN ((unsigned int) sizeof (bars), (unsigned int) (sizeof (VBAR) - 1) * level),
|
||||||
level_dir ? (level_dir > 0 ? "╮" : "╯") : "╴");
|
level_dir ? (level_dir > 0 ? DLBAR : ULBAR) : LBAR);
|
||||||
} else
|
} else
|
||||||
fprintf (stderr, " ├╴");
|
fprintf (stderr, " " VRBAR LBAR);
|
||||||
|
|
||||||
if (func) {
|
if (func) {
|
||||||
/* If there's a class name, just write that. */
|
/* If there's a class name, just write that. */
|
||||||
|
|
Loading…
Reference in New Issue