projects
/
platform
/
upstream
/
libHarfBuzzSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98619ce
)
Only printout class name in tracing, if one is available
author
Behdad Esfahbod
<behdad@behdad.org>
Fri, 11 May 2012 00:40:42 +0000
(
02:40
+0200)
committer
Behdad Esfahbod
<behdad@behdad.org>
Fri, 11 May 2012 00:40:42 +0000
(
02:40
+0200)
Makes debug output much more pleasant.
src/hb-private.hh
patch
|
blob
|
history
diff --git
a/src/hb-private.hh
b/src/hb-private.hh
index
dd2c465
..
1f7ba11
100644
(file)
--- a/
src/hb-private.hh
+++ b/
src/hb-private.hh
@@
-531,8
+531,12
@@
_hb_debug_msg_va (const char *what,
else
fprintf (stderr, " ├╴");
- if (func)
- fprintf (stderr, "%s: ", func);
+ if (func) {
+ /* If there's a class name, just write that. */
+ const char *dotdot = strstr (func, "::");
+ unsigned int func_len = dotdot ? dotdot - func : strlen (func);
+ fprintf (stderr, "%*s: ", func_len, func);
+ }
if (message)
vfprintf (stderr, message, ap);