Commit 6e0d4cdf0e25d6ac328a51cbd3fa28a14ab05491

Werner Lemberg 2011-11-27T09:21:03

[bdf] Improve tracing. * src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros. (_bdf_parse_glyphs): Use them.

diff --git a/ChangeLog b/ChangeLog
index a1c2fd5..c5c7ace 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-27  Werner Lemberg  <wl@gnu.org>
+
+	[bdf] Improve tracing.
+
+	* src/bdf/bdflib.c (DBGMSG1, DBGMSG2): New macros.
+	(_bdf_parse_glyphs): Use them.
+
 2011-11-26  Werner Lemberg  <wl@gnu.org>
 
 	Improve tracing.
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index 8311a79..f132e08 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -200,6 +200,10 @@
 #define ERRMSG8  "[line %ld] Invalid `%s' value.\n"
 #define ERRMSG9  "[line %ld] Invalid keyword.\n"
 
+  /* Debug messages. */
+#define DBGMSG1  "  [%6ld] %s" /* no \n */
+#define DBGMSG2  " (0x%lX)\n"
+
 
   /*************************************************************************/
   /*                                                                       */
@@ -1577,6 +1581,8 @@
 
       p->flags |= _BDF_GLYPH;
 
+      FT_TRACE4(( DBGMSG1, lineno, s ));
+
       goto Exit;
     }
 
@@ -1597,6 +1603,8 @@
 
       p->glyph_enc = _bdf_atol( p->list.field[1], 0, 10 );
 
+      FT_TRACE4(( DBGMSG2, p->glyph_enc ));
+
       /* Check that the encoding is in the range [0,65536] because */
       /* otherwise p->have (a bitmap with static size) overflows.  */
       if ( p->glyph_enc > 0                               &&