[HarfBuzz] harfbuzz: Branch 'master'

Simon Hausmann hausmann at kemper.freedesktop.org
Tue Oct 30 06:39:45 PDT 2007


 src/harfbuzz-indic.cpp  |    8 +++++---
 src/harfbuzz-shaper.cpp |    5 +++--
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 15bbf31ca31b2e668686fd37fb6f2e72e80d03e1
Author: Simon Hausmann <shausman at trolltech.com>
Date:   Tue Oct 30 14:39:36 2007 +0100

    Fix compilation for compilers with broken for scoping.

diff --git a/src/harfbuzz-indic.cpp b/src/harfbuzz-indic.cpp
index eb0ea33..ea84fad 100644
--- a/src/harfbuzz-indic.cpp
+++ b/src/harfbuzz-indic.cpp
@@ -1793,10 +1793,12 @@ HB_Bool HB_IndicShape(HB_ShaperItem *item)
         }
         // fix logcluster array
         IDEBUG("syllable:");
-        for (hb_uint32 i = first_glyph; i < first_glyph + syllable.num_glyphs; ++i)
-            IDEBUG("        %d -> glyph %x", i, item->glyphs[i]);
+        hb_uint32 g;
+        for (g = first_glyph; g < first_glyph + syllable.num_glyphs; ++g)
+            IDEBUG("        %d -> glyph %x", g, item->glyphs[g]);
         IDEBUG("    logclusters:");
-        for (int i = sstart; i < send; ++i) {
+        int i;
+        for (i = sstart; i < send; ++i) {
             IDEBUG("        %d -> glyph %d", i, first_glyph);
             logClusters[i-item->item.pos] = first_glyph;
         }
diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index 91dc312..6dfa65d 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -428,7 +428,8 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
     unsigned short *logClusters = item->log_clusters;
 
     hb_uint32 glyph_pos = 0;
-    for (hb_uint32 i = 0; i < length; i++) {
+    hb_uint32 i;
+    for (i = 0; i < length; i++) {
         if (HB_IsHighSurrogate(uc[i]) && i < length - 1
             && HB_IsLowSurrogate(uc[i + 1])) {
             logClusters[i] = glyph_pos;
@@ -451,7 +452,7 @@ void HB_HeuristicSetGlyphAttributes(HB_ShaperItem *item)
     HB_CharCategory lastCat;
     int dummy;
     HB_GetUnicodeCharProperties(uc[0], &lastCat, &dummy);
-    for (hb_uint32 i = 1; i < length; ++i) {
+    for (i = 1; i < length; ++i) {
         if (logClusters[i] == pos)
             // same glyph
             continue;



More information about the HarfBuzz mailing list