[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Aug 16 00:31:19 UTC 2017


 util/hb-shape.cc |   12 ++++++------
 util/options.cc  |    4 ++--
 util/options.hh  |    1 +
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit a9e52a1af4c039bc53090a9c1e4c1136fc542605
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue Aug 15 17:30:18 2017 -0700

    [util] Prefix trace lines with "trace:", and error lines with "error:"

diff --git a/util/hb-shape.cc b/util/hb-shape.cc
index cab0eb21..84931daf 100644
--- a/util/hb-shape.cc
+++ b/util/hb-shape.cc
@@ -97,7 +97,7 @@ struct output_buffer_t
   void error (const char *message)
   {
     g_string_set_size (gs, 0);
-    format.serialize_message (line_no, message, gs);
+    format.serialize_message (line_no, "error", message, gs);
     fprintf (options.fp, "%s", gs->str);
   }
   void consume_glyphs (hb_buffer_t  *buffer,
@@ -126,18 +126,18 @@ struct output_buffer_t
 		void *user_data)
   {
     output_buffer_t *that = (output_buffer_t *) user_data;
-    that->message (buffer, font, message);
+    that->trace (buffer, font, message);
     return true;
   }
 
   void
-  message (hb_buffer_t *buffer,
-	   hb_font_t *font,
-	   const char *message)
+  trace (hb_buffer_t *buffer,
+	 hb_font_t *font,
+	 const char *message)
   {
     g_string_set_size (gs, 0);
     format.serialize_line_no (line_no, gs);
-    g_string_append_printf (gs, "HB: %s	buffer: ", message);
+    g_string_append_printf (gs, "trace: %s	buffer: ", message);
     format.serialize_glyphs (buffer, font, output_format, format_flags, gs);
     g_string_append_c (gs, '\n');
     fprintf (options.fp, "%s", gs->str);
diff --git a/util/options.cc b/util/options.cc
index 1269ba65..b1a83edc 100644
--- a/util/options.cc
+++ b/util/options.cc
@@ -871,12 +871,12 @@ format_options_t::serialize_buffer_of_text (hb_buffer_t  *buffer,
 }
 void
 format_options_t::serialize_message (unsigned int  line_no,
+				     const char   *type,
 				     const char   *msg,
 				     GString      *gs)
 {
   serialize_line_no (line_no, gs);
-  g_string_append_printf (gs, "message: ");
-  g_string_append_printf (gs, "%s", msg);
+  g_string_append_printf (gs, "%s: %s", type, msg);
   g_string_append_c (gs, '\n');
 }
 void
diff --git a/util/options.hh b/util/options.hh
index 17a852c4..dbc4eaf9 100644
--- a/util/options.hh
+++ b/util/options.hh
@@ -640,6 +640,7 @@ struct format_options_t : option_group_t
 				 hb_font_t    *font,
 				 GString      *gs);
   void serialize_message (unsigned int  line_no,
+			  const char   *type,
 			  const char   *msg,
 			  GString      *gs);
   void serialize_buffer_of_glyphs (hb_buffer_t  *buffer,


More information about the HarfBuzz mailing list