Remove IN_COMPONENT() macro
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 15 May 2010 00:25:04 +0000 (20:25 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 15 May 2010 00:25:04 +0000 (20:25 -0400)
src/hb-buffer-private.hh
src/hb-ot-layout-gpos-private.hh
src/hb-ot-layout-gsub-private.hh

index 42d2476..8a6da2e 100644 (file)
@@ -164,7 +164,6 @@ struct _hb_buffer_t {
 #define IN_MASK(pos)           (BUFFER->in_string[(pos)].mask)
 #define IN_CLUSTER(pos)                (BUFFER->in_string[(pos)].cluster)
 #define IN_LIGID(pos)          (BUFFER->in_string[(pos)].lig_id)
-#define IN_COMPONENT(pos)      (BUFFER->in_string[(pos)].component)
 
 HB_END_DECLS
 
index d7f8427..5fb3fd3 100644 (file)
@@ -1203,9 +1203,9 @@ struct MarkLigPosFormat1
      * is identical to the ligature ID of the found ligature.  If yes, we
      * can directly use the component index.  If not, we attach the mark
      * glyph to the last component of the ligature. */
-    if (IN_LIGID (j) && IN_LIGID (j) == IN_LIGID (c->buffer->in_pos) && IN_COMPONENT (c->buffer->in_pos))
+    if (IN_LIGID (j) && IN_LIGID (j) == IN_LIGID (c->buffer->in_pos) && c->buffer->in_string[c->buffer->in_pos].component)
     {
-      comp_index = IN_COMPONENT (c->buffer->in_pos) - 1;
+      comp_index = c->buffer->in_string[c->buffer->in_pos].component - 1;
       if (comp_index >= comp_count)
        comp_index = comp_count - 1;
     }
@@ -1308,8 +1308,8 @@ struct MarkMarkPosFormat1
     /* Two marks match only if they belong to the same base, or same component
      * of the same ligature.  That is, the component numbers must match, and
      * if those are non-zero, the ligid number should also match. */
-    if ((IN_COMPONENT (j) != IN_COMPONENT (c->buffer->in_pos)) ||
-       (IN_COMPONENT (j) && IN_LIGID (j) != IN_LIGID (c->buffer->in_pos)))
+    if ((c->buffer->in_string[j].component != c->buffer->in_string[c->buffer->in_pos].component) ||
+       (c->buffer->in_string[j].component && IN_LIGID (j) != IN_LIGID (c->buffer->in_pos)))
       return false;
 
     unsigned int mark2_index = (this+mark2Coverage) (IN_GLYPH (j));
index 766bae9..2c86ecd 100644 (file)
@@ -403,7 +403,7 @@ struct Ligature
       c->buffer->add_output_glyphs_be16 (i,
                                               1, (const uint16_t *) &ligGlyph,
                                               0,
-                                              IN_LIGID (c->buffer->in_pos) && !IN_COMPONENT (c->buffer->in_pos) ?
+                                              IN_LIGID (c->buffer->in_pos) && !c->buffer->in_string[c->buffer->in_pos].component ?
                                               0xFFFF : c->buffer->allocate_lig_id ());
     else
     {