Commit 5d6a36054267353f6ba9432217aef5b13876c0c0

Werner Lemberg 2013-07-30T23:17:04

[autofit] Variable renaming. * src/autofit/aftypes.h (AF_ScriptMetricsRec): s/clazz/script_class/. Update all users.

diff --git a/ChangeLog b/ChangeLog
index f3dc662..f9e643b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-07-30  Werner Lemberg  <wl@gnu.org>
+
+	[autofit] Variable renaming.
+
+	* src/autofit/aftypes.h (AF_ScriptMetricsRec):
+	s/clazz/script_class/.
+	Update all users.
+
 2013-07-30  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	Ignore libpng-config under cross-building configuration,
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index f69a528..1dbf1c2 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -86,8 +86,9 @@
       AF_Scaler         scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index 3e41465..b89d10c 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -82,18 +82,20 @@
     /* scan each script in a Unicode charmap */
     for ( ss = 0; AF_SCRIPT_CLASSES_GET[ss]; ss++ )
     {
-      AF_ScriptClass      clazz = AF_SCRIPT_CLASSES_GET[ss];
+      AF_ScriptClass      script_class = AF_SCRIPT_CLASSES_GET[ss];
       AF_Script_UniRange  range;
 
 
-      if ( clazz->script_uni_ranges == NULL )
+      if ( script_class->script_uni_ranges == NULL )
         continue;
 
       /*
        *  Scan all Unicode points in the range and set the corresponding
        *  glyph script index.
        */
-      for ( range = clazz->script_uni_ranges; range->first != 0; range++ )
+      for ( range = script_class->script_uni_ranges;
+            range->first != 0;
+            range++ )
       {
         FT_ULong  charcode = range->first;
         FT_UInt   gindex;
@@ -204,13 +206,13 @@
       {
         if ( globals->metrics[nn] )
         {
-          AF_ScriptClass  clazz = AF_SCRIPT_CLASSES_GET[nn];
+          AF_ScriptClass  script_class = AF_SCRIPT_CLASSES_GET[nn];
 
 
-          FT_ASSERT( globals->metrics[nn]->clazz == clazz );
+          FT_ASSERT( globals->metrics[nn]->script_class == script_class );
 
-          if ( clazz->script_metrics_done )
-            clazz->script_metrics_done( globals->metrics[nn] );
+          if ( script_class->script_metrics_done )
+            script_class->script_metrics_done( globals->metrics[nn] );
 
           FT_FREE( globals->metrics[nn] );
         }
@@ -233,7 +235,7 @@
   {
     AF_ScriptMetrics  metrics = NULL;
     FT_UInt           gidx;
-    AF_ScriptClass    clazz;
+    AF_ScriptClass    script_class;
     FT_UInt           script     = options & 15;
     const FT_Offset   script_max = sizeof ( AF_SCRIPT_CLASSES_GET ) /
                                      sizeof ( AF_SCRIPT_CLASSES_GET[0] );
@@ -250,37 +252,37 @@
     if ( gidx == 0 || gidx + 1 >= script_max )
       gidx = globals->glyph_scripts[gindex] & AF_SCRIPT_NONE;
 
-    clazz = AF_SCRIPT_CLASSES_GET[gidx];
+    script_class = AF_SCRIPT_CLASSES_GET[gidx];
     if ( script == 0 )
-      script = clazz->script;
+      script = script_class->script;
 
-    metrics = globals->metrics[clazz->script];
+    metrics = globals->metrics[script_class->script];
     if ( metrics == NULL )
     {
       /* create the global metrics object if necessary */
       FT_Memory  memory = globals->face->memory;
 
 
-      if ( FT_ALLOC( metrics, clazz->script_metrics_size ) )
+      if ( FT_ALLOC( metrics, script_class->script_metrics_size ) )
         goto Exit;
 
-      metrics->clazz   = clazz;
-      metrics->globals = globals;
+      metrics->script_class = script_class;
+      metrics->globals      = globals;
 
-      if ( clazz->script_metrics_init )
+      if ( script_class->script_metrics_init )
       {
-        error = clazz->script_metrics_init( metrics, globals->face );
+        error = script_class->script_metrics_init( metrics, globals->face );
         if ( error )
         {
-          if ( clazz->script_metrics_done )
-            clazz->script_metrics_done( metrics );
+          if ( script_class->script_metrics_done )
+            script_class->script_metrics_done( metrics );
 
           FT_FREE( metrics );
           goto Exit;
         }
       }
 
-      globals->metrics[clazz->script] = metrics;
+      globals->metrics[script_class->script] = metrics;
     }
 
   Exit:
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index ec54b70..4488348 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -76,13 +76,14 @@
       AF_Scaler           scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
       FT_TRACE5(( "standard character: 0x%X (glyph index %d)\n",
-                  metrics->root.clazz->standard_char, glyph_index ));
+                  metrics->root.script_class->standard_char, glyph_index ));
 
       error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
       if ( error || face->glyph->outline.n_points <= 0 )
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index b1e9658..0544301 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -76,8 +76,9 @@
       AF_Scaler            scaler = &dummy->root.scaler;
 
 
-      glyph_index = FT_Get_Char_Index( face,
-                                       metrics->root.clazz->standard_char );
+      glyph_index = FT_Get_Char_Index(
+                      face,
+                      metrics->root.script_class->standard_char );
       if ( glyph_index == 0 )
         goto Exit;
 
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 17a6fb7..1ce5a98 100644
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -180,10 +180,10 @@
 
       /* now load the slot image into the auto-outline and run the */
       /* automatic hinting process                                 */
-      if ( metrics->clazz->script_hints_apply )
-        metrics->clazz->script_hints_apply( hints,
-                                            &gloader->current.outline,
-                                            metrics );
+      if ( metrics->script_class->script_hints_apply )
+        metrics->script_class->script_hints_apply( hints,
+                                                   &gloader->current.outline,
+                                                   metrics );
 
       /* we now need to adjust the metrics according to the change in */
       /* width/positioning that occurred during the hinting process   */
@@ -534,18 +534,18 @@
       {
         loader->metrics = metrics;
 
-        if ( metrics->clazz->script_metrics_scale )
-          metrics->clazz->script_metrics_scale( metrics, &scaler );
+        if ( metrics->script_class->script_metrics_scale )
+          metrics->script_class->script_metrics_scale( metrics, &scaler );
         else
           metrics->scaler = scaler;
 
         load_flags |=  FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
         load_flags &= ~FT_LOAD_RENDER;
 
-        if ( metrics->clazz->script_hints_init )
+        if ( metrics->script_class->script_hints_init )
         {
-          error = metrics->clazz->script_hints_init( &loader->hints,
-                                                     metrics );
+          error = metrics->script_class->script_hints_init( &loader->hints,
+                                                            metrics );
           if ( error )
             goto Exit;
         }
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index 9acd7ad..cc415ee 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -250,7 +250,7 @@ extern void*  _af_debug_hints;
 
   typedef struct  AF_ScriptMetricsRec_
   {
-    AF_ScriptClass  clazz;
+    AF_ScriptClass  script_class;
     AF_ScalerRec    scaler;
     FT_Bool         digits_have_same_width;