shithub: freetype+ttf2subf

Download patch

ref: 9bd1e558502ebbcb8ccd1d9b765fd9d97d1da759
parent: 51abdf6ffa8f59810078a2c207d70f705bbcf9b5
author: suzuki toshiya <[email protected]>
date: Tue Dec 9 09:51:52 EST 2014

[gxvalid] Fix a naming convention conflicting with ftvalid.

See previous changeset for otvalid.

* src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
`valid' by `gxvalid'.
* src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
it is typed as GXV_Validator.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,20 @@
 2014-12-09  suzuki toshiya  <[email protected]>
 
+	[gxvalid] Fix a naming convention conflicting with ftvalid.
+
+	See previous changeset for otvalid.
+
+	* src/gxvalid/{gxvcommn.h, gxvmort.h, gxvmorx.h}: Replace
+	`valid' by `gxvalid'.
+	* src/gxvalid/{gxvbsln.c, gxvcommn.c, gxvfeat.c, gxvjust.c,
+	gxvkern.c, gxvlcar.c, gxvmort.c, gxvmort0.c, gxvmort1.c,
+	gxvmort2.c, gxvmort4.c, gxvmort5.c, gxvmorx.c, gxvmorx0.c,
+	gxvmorx1.c, gxvmorx2.c, gxvmorx4.c, gxvmorx5.c, gxvopbd.c,
+	gxvprop.c, gxvtrak.c}: Replace `valid' by `gxvalid' if
+	it is typed as GXV_Validator.
+
+2014-12-09  suzuki toshiya  <[email protected]>
+
 	[otvalid] Fix a naming convention conflicting with ftvalid.
 
 	Some prototypes in ftvalid.h use `valid' for the variables
--- a/src/gxvalid/gxvbsln.c
+++ b/src/gxvalid/gxvbsln.c
@@ -72,10 +72,10 @@
   static void
   gxv_bsln_LookupValue_validate( FT_UShort            glyph,
                                  GXV_LookupValueCPtr  value_p,
-                                 GXV_Validator        valid )
+                                 GXV_Validator        gxvalid )
   {
-    FT_UShort   v = value_p->u;
-    FT_UShort*  ctlPoints;
+    FT_UShort     v = value_p->u;
+    FT_UShort*    ctlPoints;
 
     FT_UNUSED( glyph );
 
@@ -124,7 +124,7 @@
   gxv_bsln_LookupFmt4_transit( FT_UShort            relative_gindex,
                                GXV_LookupValueCPtr  base_value_p,
                                FT_Bytes             lookuptbl_limit,
-                               GXV_Validator        valid )
+                               GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -135,7 +135,7 @@
     offset = (FT_UShort)( base_value_p->u +
                           ( relative_gindex * sizeof ( FT_UShort ) ) );
 
-    p     = valid->lookuptbl_head + offset;
+    p     = gxvalid->lookuptbl_head + offset;
     limit = lookuptbl_limit;
     GXV_LIMIT_CHECK( 2 );
 
@@ -148,7 +148,7 @@
   static void
   gxv_bsln_parts_fmt0_validate( FT_Bytes       tables,
                                 FT_Bytes       limit,
-                                GXV_Validator  valid )
+                                GXV_Validator  gxvalid )
   {
     FT_Bytes  p = tables;
 
@@ -158,7 +158,7 @@
     /* deltas */
     GXV_LIMIT_CHECK( 2 * GXV_BSLN_VALUE_COUNT );
 
-    valid->table_data = NULL;      /* No ctlPoints here. */
+    gxvalid->table_data = NULL;      /* No ctlPoints here. */
 
     GXV_EXIT;
   }
@@ -167,7 +167,7 @@
   static void
   gxv_bsln_parts_fmt1_validate( FT_Bytes       tables,
                                 FT_Bytes       limit,
-                                GXV_Validator  valid )
+                                GXV_Validator  gxvalid )
   {
     FT_Bytes  p = tables;
 
@@ -175,15 +175,15 @@
     GXV_NAME_ENTER( "parts format 1" );
 
     /* deltas */
-    gxv_bsln_parts_fmt0_validate( p, limit, valid );
+    gxv_bsln_parts_fmt0_validate( p, limit, gxvalid );
 
     /* mappingData */
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_bsln_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_bsln_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
     gxv_LookupTable_validate( p + 2 * GXV_BSLN_VALUE_COUNT,
                               limit,
-                              valid );
+                              gxvalid );
 
     GXV_EXIT;
   }
@@ -192,7 +192,7 @@
   static void
   gxv_bsln_parts_fmt2_validate( FT_Bytes       tables,
                                 FT_Bytes       limit,
-                                GXV_Validator  valid )
+                                GXV_Validator  gxvalid )
   {
     FT_Bytes   p = tables;
 
@@ -211,7 +211,7 @@
     stdGlyph = FT_NEXT_USHORT( p );
     GXV_TRACE(( " (stdGlyph = %u)\n", stdGlyph ));
 
-    gxv_glyphid_validate( stdGlyph, valid );
+    gxv_glyphid_validate( stdGlyph, gxvalid );
 
     /* Record the position of ctlPoints */
     GXV_BSLN_DATA( ctlPoints_p ) = p;
@@ -226,7 +226,7 @@
           FT_INVALID_DATA;
       }
       else
-        gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, valid );
+        gxv_ctlPoint_validate( stdGlyph, (FT_Short)ctlPoint, gxvalid );
     }
 
     GXV_EXIT;
@@ -236,7 +236,7 @@
   static void
   gxv_bsln_parts_fmt3_validate( FT_Bytes       tables,
                                 FT_Bytes       limit,
-                                GXV_Validator  valid)
+                                GXV_Validator  gxvalid)
   {
     FT_Bytes  p = tables;
 
@@ -244,15 +244,15 @@
     GXV_NAME_ENTER( "parts format 3" );
 
     /* stdGlyph + ctlPoints */
-    gxv_bsln_parts_fmt2_validate( p, limit, valid );
+    gxv_bsln_parts_fmt2_validate( p, limit, gxvalid );
 
     /* mappingData */
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_bsln_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_bsln_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_bsln_LookupFmt4_transit;
     gxv_LookupTable_validate( p + ( 2 + 2 * GXV_BSLN_VALUE_COUNT ),
                               limit,
-                              valid );
+                              gxvalid );
 
     GXV_EXIT;
   }
@@ -271,8 +271,8 @@
                      FT_Face       face,
                      FT_Validator  ftvalid )
   {
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
 
     GXV_bsln_DataRec  bslnrec;
     GXV_bsln_Data     bsln = &bslnrec;
@@ -293,9 +293,9 @@
     };
 
 
-    valid->root       = ftvalid;
-    valid->table_data = bsln;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = bsln;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `bsln' table\n" ));
     GXV_INIT;
@@ -320,7 +320,7 @@
 
     bsln->defaultBaseline = defaultBaseline;
 
-    fmt_funcs_table[format]( p, limit, valid );
+    fmt_funcs_table[format]( p, limit, gxvalid );
 
     FT_TRACE4(( "\n" ));
   }
--- a/src/gxvalid/gxvcommn.c
+++ b/src/gxvalid/gxvcommn.c
@@ -65,7 +65,7 @@
                                    FT_UShort*     buff,
                                    FT_UInt        nmemb,
                                    FT_UShort      limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     FT_UInt  i;
 
@@ -130,7 +130,7 @@
                                   FT_ULong*      buff,
                                   FT_UInt        nmemb,
                                   FT_ULong       limit,
-                                  GXV_Validator  valid)
+                                  GXV_Validator  gxvalid)
   {
     FT_UInt  i;
 
@@ -182,7 +182,7 @@
                             FT_Bytes       limit,
                             FT_Byte*       min,
                             FT_Byte*       max,
-                            GXV_Validator  valid )
+                            GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -202,7 +202,7 @@
       *max = (FT_Byte)FT_MAX( *max, val );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -211,7 +211,7 @@
                               FT_Bytes       limit,
                               FT_UShort*     min,
                               FT_UShort*     max,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -231,7 +231,7 @@
       *max = (FT_Byte)FT_MAX( *max, val );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -256,7 +256,7 @@
 
   static void
   gxv_BinSrchHeader_check_consistency( GXV_BinSrchHeader*  binSrchHeader,
-                                       GXV_Validator       valid )
+                                       GXV_Validator       gxvalid )
   {
     FT_UShort  searchRange;
     FT_UShort  entrySelector;
@@ -329,7 +329,7 @@
                               FT_Bytes       limit,
                               FT_UShort*     unitSize_p,
                               FT_UShort*     nUnits_p,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     FT_Bytes           p = table;
     GXV_BinSrchHeader  binSrchHeader;
@@ -359,7 +359,7 @@
     binSrchHeader.rangeShift    = FT_NEXT_USHORT( p );
     GXV_TRACE(( "nUnits %d\n", binSrchHeader.nUnits ));
 
-    gxv_BinSrchHeader_check_consistency( &binSrchHeader, valid );
+    gxv_BinSrchHeader_check_consistency( &binSrchHeader, gxvalid );
 
     if ( *unitSize_p == 0 )
       *unitSize_p = binSrchHeader.unitSize;
@@ -367,7 +367,7 @@
     if ( *nUnits_p == 0 )
       *nUnits_p = binSrchHeader.nUnits;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -422,7 +422,7 @@
   static void
   gxv_LookupTable_fmt0_validate( FT_Bytes       table,
                                  FT_Bytes       limit,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  i;
@@ -432,24 +432,24 @@
 
     GXV_NAME_ENTER( "LookupTable format 0" );
 
-    GXV_LIMIT_CHECK( 2 * valid->face->num_glyphs );
+    GXV_LIMIT_CHECK( 2 * gxvalid->face->num_glyphs );
 
-    for ( i = 0; i < valid->face->num_glyphs; i++ )
+    for ( i = 0; i < gxvalid->face->num_glyphs; i++ )
     {
       GXV_LIMIT_CHECK( 2 );
       if ( p + 2 >= limit )     /* some fonts have too-short fmt0 array */
       {
         GXV_TRACE(( "too short, glyphs %d - %d are missing\n",
-                    i, valid->face->num_glyphs ));
+                    i, gxvalid->face->num_glyphs ));
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
         break;
       }
 
-      value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
-      valid->lookupval_func( i, &value, valid );
+      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
+      gxvalid->lookupval_func( i, &value, gxvalid );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -473,12 +473,12 @@
   static void
   gxv_LookupTable_fmt2_skip_endmarkers( FT_Bytes       table,
                                         FT_UShort      unitSize,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
 
-    while ( ( p + 4 ) < valid->root->limit )
+    while ( ( p + 4 ) < gxvalid->root->limit )
     {
       if ( p[0] != 0xFF || p[1] != 0xFF || /* lastGlyph */
            p[2] != 0xFF || p[3] != 0xFF )  /* firstGlyph */
@@ -486,7 +486,7 @@
       p += unitSize;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -493,7 +493,7 @@
   static void
   gxv_LookupTable_fmt2_validate( FT_Bytes       table,
                                  FT_Bytes       limit,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_Bytes             p = table;
     FT_UShort            gid;
@@ -509,8 +509,8 @@
     GXV_NAME_ENTER( "LookupTable format 2" );
 
     unitSize = nUnits = 0;
-    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
-    p += valid->subtable_length;
+    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+    p += gxvalid->subtable_length;
 
     GXV_UNITSIZE_VALIDATE( "format2", unitSize, nUnits, 6 );
 
@@ -519,10 +519,10 @@
       GXV_LIMIT_CHECK( 2 + 2 + 2 );
       lastGlyph  = FT_NEXT_USHORT( p );
       firstGlyph = FT_NEXT_USHORT( p );
-      value      = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
+      value      = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
 
-      gxv_glyphid_validate( firstGlyph, valid );
-      gxv_glyphid_validate( lastGlyph, valid );
+      gxv_glyphid_validate( firstGlyph, gxvalid );
+      gxv_glyphid_validate( lastGlyph, gxvalid );
 
       if ( lastGlyph < gid )
       {
@@ -539,7 +539,7 @@
                     unit, lastGlyph, firstGlyph ));
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
 
-        if ( valid->root->level == FT_VALIDATE_TIGHT )
+        if ( gxvalid->root->level == FT_VALIDATE_TIGHT )
           continue;     /* ftxvalidator silently skips such an entry */
 
         FT_TRACE4(( "continuing with exchanged values\n" ));
@@ -549,13 +549,13 @@
       }
 
       for ( gid = firstGlyph; gid <= lastGlyph; gid++ )
-        valid->lookupval_func( gid, &value, valid );
+        gxvalid->lookupval_func( gid, &value, gxvalid );
     }
 
-    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid );
-    p += valid->subtable_length;
+    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );
+    p += gxvalid->subtable_length;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -564,7 +564,7 @@
   static void
   gxv_LookupTable_fmt4_validate( FT_Bytes       table,
                                  FT_Bytes       limit,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_Bytes             p = table;
     FT_UShort            unit;
@@ -581,8 +581,8 @@
     GXV_NAME_ENTER( "LookupTable format 4" );
 
     unitSize = nUnits = 0;
-    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
-    p += valid->subtable_length;
+    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+    p += gxvalid->subtable_length;
 
     GXV_UNITSIZE_VALIDATE( "format4", unitSize, nUnits, 6 );
 
@@ -592,8 +592,8 @@
       lastGlyph  = FT_NEXT_USHORT( p );
       firstGlyph = FT_NEXT_USHORT( p );
 
-      gxv_glyphid_validate( firstGlyph, valid );
-      gxv_glyphid_validate( lastGlyph, valid );
+      gxv_glyphid_validate( firstGlyph, gxvalid );
+      gxv_glyphid_validate( lastGlyph, gxvalid );
 
       if ( lastGlyph < gid )
       {
@@ -610,7 +610,7 @@
                     unit, lastGlyph, firstGlyph ));
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
 
-        if ( valid->root->level == FT_VALIDATE_TIGHT )
+        if ( gxvalid->root->level == FT_VALIDATE_TIGHT )
           continue; /* ftxvalidator silently skips such an entry */
 
         FT_TRACE4(( "continuing with exchanged values\n" ));
@@ -624,19 +624,19 @@
 
       for ( gid = firstGlyph; gid <= lastGlyph; gid++ )
       {
-        value = valid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ),
+        value = gxvalid->lookupfmt4_trans( (FT_UShort)( gid - firstGlyph ),
                                          &base_value,
                                          limit,
-                                         valid );
+                                         gxvalid );
 
-        valid->lookupval_func( gid, &value, valid );
+        gxvalid->lookupval_func( gid, &value, gxvalid );
       }
     }
 
-    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, valid );
-    p += valid->subtable_length;
+    gxv_LookupTable_fmt2_skip_endmarkers( p, unitSize, gxvalid );
+    p += gxvalid->subtable_length;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -645,12 +645,12 @@
   static void
   gxv_LookupTable_fmt6_skip_endmarkers( FT_Bytes       table,
                                         FT_UShort      unitSize,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
 
-    while ( p < valid->root->limit )
+    while ( p < gxvalid->root->limit )
     {
       if ( p[0] != 0xFF || p[1] != 0xFF )
         break;
@@ -657,7 +657,7 @@
       p += unitSize;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -664,7 +664,7 @@
   static void
   gxv_LookupTable_fmt6_validate( FT_Bytes       table,
                                  FT_Bytes       limit,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_Bytes             p = table;
     FT_UShort            unit;
@@ -679,8 +679,8 @@
     GXV_NAME_ENTER( "LookupTable format 6" );
 
     unitSize = nUnits = 0;
-    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, valid );
-    p += valid->subtable_length;
+    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nUnits, gxvalid );
+    p += gxvalid->subtable_length;
 
     GXV_UNITSIZE_VALIDATE( "format6", unitSize, nUnits, 4 );
 
@@ -688,9 +688,9 @@
     {
       GXV_LIMIT_CHECK( 2 + 2 );
       glyph = FT_NEXT_USHORT( p );
-      value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
+      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
 
-      if ( gxv_glyphid_validate( glyph, valid ) )
+      if ( gxv_glyphid_validate( glyph, gxvalid ) )
         GXV_TRACE(( " endmarker found within defined range"
                     " (entry %d < nUnits=%d)\n",
                     unit, nUnits ));
@@ -703,13 +703,13 @@
       }
       prev_glyph = glyph;
 
-      valid->lookupval_func( glyph, &value, valid );
+      gxvalid->lookupval_func( glyph, &value, gxvalid );
     }
 
-    gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, valid );
-    p += valid->subtable_length;
+    gxv_LookupTable_fmt6_skip_endmarkers( p, unitSize, gxvalid );
+    p += gxvalid->subtable_length;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -718,7 +718,7 @@
   static void
   gxv_LookupTable_fmt8_validate( FT_Bytes       table,
                                  FT_Bytes       limit,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_Bytes              p = table;
     FT_UShort             i;
@@ -735,18 +735,18 @@
     firstGlyph = FT_NEXT_USHORT( p );
     glyphCount = FT_NEXT_USHORT( p );
 
-    gxv_glyphid_validate( firstGlyph, valid );
-    gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), valid );
+    gxv_glyphid_validate( firstGlyph, gxvalid );
+    gxv_glyphid_validate( (FT_UShort)( firstGlyph + glyphCount ), gxvalid );
 
     /* valueArray */
     for ( i = 0; i < glyphCount; i++ )
     {
       GXV_LIMIT_CHECK( 2 );
-      value = GXV_LOOKUP_VALUE_LOAD( p, valid->lookupval_sign );
-      valid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, valid );
+      value = GXV_LOOKUP_VALUE_LOAD( p, gxvalid->lookupval_sign );
+      gxvalid->lookupval_func( (FT_UShort)( firstGlyph + i ), &value, gxvalid );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -754,7 +754,7 @@
   FT_LOCAL_DEF( void )
   gxv_LookupTable_validate( FT_Bytes       table,
                             FT_Bytes       limit,
-                            GXV_Validator  valid )
+                            GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  format;
@@ -778,7 +778,7 @@
     GXV_NAME_ENTER( "LookupTable" );
 
     /* lookuptbl_head may be used in fmt4 transit function. */
-    valid->lookuptbl_head = table;
+    gxvalid->lookuptbl_head = table;
 
     /* format */
     GXV_LIMIT_CHECK( 2 );
@@ -792,10 +792,10 @@
     if ( func == NULL )
       FT_INVALID_FORMAT;
 
-    func( p, limit, valid );
-    p += valid->subtable_length;
+    func( p, limit, gxvalid );
+    p += gxvalid->subtable_length;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -811,7 +811,7 @@
 
   FT_LOCAL_DEF( FT_Int )
   gxv_glyphid_validate( FT_UShort      gid,
-                        GXV_Validator  valid )
+                        GXV_Validator  gxvalid )
   {
     FT_Face  face;
 
@@ -822,7 +822,7 @@
       return 1;
     }
 
-    face = valid->face;
+    face = gxvalid->face;
     if ( face->num_glyphs < gid )
     {
       GXV_TRACE(( " gxv_glyphid_check() gid overflow: num_glyphs %d < %d\n",
@@ -845,7 +845,7 @@
   FT_LOCAL_DEF( void )
   gxv_ctlPoint_validate( FT_UShort      gid,
                          FT_Short       ctl_point,
-                         GXV_Validator  valid )
+                         GXV_Validator  gxvalid )
   {
     FT_Face       face;
     FT_Error      error;
@@ -855,7 +855,7 @@
     short         n_points;
 
 
-    face = valid->face;
+    face = gxvalid->face;
 
     error = FT_Load_Glyph( face,
                            gid,
@@ -885,7 +885,7 @@
   gxv_sfntName_validate( FT_UShort      name_index,
                          FT_UShort      min_index,
                          FT_UShort      max_index,
-                         GXV_Validator  valid )
+                         GXV_Validator  gxvalid )
   {
     FT_SfntName  name;
     FT_UInt      i;
@@ -897,10 +897,10 @@
     if ( name_index < min_index || max_index < name_index )
       FT_INVALID_FORMAT;
 
-    nnames = FT_Get_Sfnt_Name_Count( valid->face );
+    nnames = FT_Get_Sfnt_Name_Count( gxvalid->face );
     for ( i = 0; i < nnames; i++ )
     {
-      if ( FT_Get_Sfnt_Name( valid->face, i, &name ) != FT_Err_Ok )
+      if ( FT_Get_Sfnt_Name( gxvalid->face, i, &name ) != FT_Err_Ok )
         continue ;
 
       if ( name.name_id == name_index )
@@ -944,7 +944,7 @@
                            FT_UShort*     length_p,
                            FT_UShort      stateSize,
                            FT_Byte*       maxClassID_p,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
     FT_Bytes   p     = table;
     FT_Bytes   limit = table + *length_p;
@@ -965,7 +965,7 @@
     if ( !nGlyphs )
       goto Out;
 
-    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), valid );
+    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs ), gxvalid );
 
     {
       FT_Byte    nGlyphInClass[256];
@@ -1022,9 +1022,9 @@
                            FT_UShort      stateSize,
                            FT_Byte*       maxState_p,
                            FT_Byte*       maxEntry_p,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
-    FT_Bytes  p = table;
+    FT_Bytes  p     = table;
     FT_Bytes  limit = table + *length_p;
     FT_Byte   clazz;
     FT_Byte   entry;
@@ -1076,7 +1076,7 @@
                            FT_Byte        maxClassID,
                            FT_Bytes       statetable_table,
                            FT_Bytes       statetable_limit,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
     FT_Bytes  p     = table;
     FT_Bytes  limit = table + *length_p;
@@ -1166,13 +1166,13 @@
         goto Exit;
       }
 
-      if ( NULL != valid->statetable.entry_validate_func )
-        valid->statetable.entry_validate_func( state,
-                                               flags,
-                                               &glyphOffset,
-                                               statetable_table,
-                                               statetable_limit,
-                                               valid );
+      if ( NULL != gxvalid->statetable.entry_validate_func )
+        gxvalid->statetable.entry_validate_func( state,
+                                                 flags,
+                                                 &glyphOffset,
+                                                 statetable_table,
+                                                 statetable_limit,
+                                                 gxvalid );
     }
 
   Exit:
@@ -1192,7 +1192,7 @@
                                  FT_UShort*     classTable_length_p,
                                  FT_UShort*     stateArray_length_p,
                                  FT_UShort*     entryTable_length_p,
-                                 GXV_Validator  valid )
+                                 GXV_Validator  gxvalid )
   {
     FT_UShort   o[3];
     FT_UShort*  l[3];
@@ -1206,7 +1206,7 @@
     l[1] = stateArray_length_p;
     l[2] = entryTable_length_p;
 
-    gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, valid );
+    gxv_set_length_by_ushort_offset( o, l, buff, 3, table_size, gxvalid );
   }
 
 
@@ -1213,7 +1213,7 @@
   FT_LOCAL_DEF( void )
   gxv_StateTable_validate( FT_Bytes       table,
                            FT_Bytes       limit,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
     FT_UShort   stateSize;
     FT_UShort   classTable;     /* offset to Class(Sub)Table */
@@ -1250,11 +1250,11 @@
     if ( stateSize > 0xFF )
       FT_INVALID_DATA;
 
-    if ( valid->statetable.optdata_load_func != NULL )
-      valid->statetable.optdata_load_func( p, limit, valid );
+    if ( gxvalid->statetable.optdata_load_func != NULL )
+      gxvalid->statetable.optdata_load_func( p, limit, gxvalid );
 
-    if ( valid->statetable.subtable_setup_func != NULL)
-      setup_func = valid->statetable.subtable_setup_func;
+    if ( gxvalid->statetable.subtable_setup_func != NULL)
+      setup_func = gxvalid->statetable.subtable_setup_func;
     else
       setup_func = gxv_StateTable_subtable_setup;
 
@@ -1265,7 +1265,7 @@
                 &classTable_length,
                 &stateArray_length,
                 &entryTable_length,
-                valid );
+                gxvalid );
 
     GXV_TRACE(( "StateTable Subtables\n" ));
 
@@ -1274,7 +1274,7 @@
                                &classTable_length,
                                stateSize,
                                &maxClassID,
-                               valid );
+                               gxvalid );
     else
       maxClassID = (FT_Byte)( stateSize - 1 );
 
@@ -1285,7 +1285,7 @@
                                stateSize,
                                &maxState,
                                &maxEntry,
-                               valid );
+                               gxvalid );
     else
     {
 #if 0
@@ -1306,7 +1306,7 @@
                                maxClassID,
                                table,
                                limit,
-                               valid );
+                               gxvalid );
 
     GXV_EXIT;
   }
@@ -1322,7 +1322,7 @@
                                   FT_ULong*      classTable_length_p,
                                   FT_ULong*      stateArray_length_p,
                                   FT_ULong*      entryTable_length_p,
-                                  GXV_Validator  valid )
+                                  GXV_Validator  gxvalid )
   {
     FT_ULong   o[3];
     FT_ULong*  l[3];
@@ -1336,7 +1336,7 @@
     l[1] = stateArray_length_p;
     l[2] = entryTable_length_p;
 
-    gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, valid );
+    gxv_set_length_by_ulong_offset( o, l, buff, 3, table_size, gxvalid );
   }
 
 
@@ -1343,14 +1343,14 @@
   static void
   gxv_XClassTable_lookupval_validate( FT_UShort            glyph,
                                       GXV_LookupValueCPtr  value_p,
-                                      GXV_Validator        valid )
+                                      GXV_Validator        gxvalid )
   {
     FT_UNUSED( glyph );
 
-    if ( value_p->u >= valid->xstatetable.nClasses )
+    if ( value_p->u >= gxvalid->xstatetable.nClasses )
       FT_INVALID_DATA;
-    if ( value_p->u > valid->xstatetable.maxClassID )
-      valid->xstatetable.maxClassID = value_p->u;
+    if ( value_p->u > gxvalid->xstatetable.maxClassID )
+      gxvalid->xstatetable.maxClassID = value_p->u;
   }
 
 
@@ -1384,7 +1384,7 @@
   gxv_XClassTable_lookupfmt4_transit( FT_UShort            relative_gindex,
                                       GXV_LookupValueCPtr  base_value_p,
                                       FT_Bytes             lookuptbl_limit,
-                                      GXV_Validator        valid )
+                                      GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -1395,7 +1395,7 @@
     offset = (FT_UShort)( base_value_p->u +
                           relative_gindex * sizeof ( FT_UShort ) );
 
-    p     = valid->lookuptbl_head + offset;
+    p     = gxvalid->lookuptbl_head + offset;
     limit = lookuptbl_limit;
 
     GXV_LIMIT_CHECK ( 2 );
@@ -1412,7 +1412,7 @@
                             FT_ULong       stateSize,
                             FT_UShort*     maxState_p,
                             FT_UShort*     maxEntry_p,
-                            GXV_Validator  valid )
+                            GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_Bytes   limit = table + *length_p;
@@ -1463,7 +1463,7 @@
                             FT_UShort      maxClassID,
                             FT_Bytes       xstatetable_table,
                             FT_Bytes       xstatetable_limit,
-                            GXV_Validator  valid )
+                            GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_Bytes   limit = table + *length_p;
@@ -1540,13 +1540,13 @@
         goto Exit;
       }
 
-      if ( NULL != valid->xstatetable.entry_validate_func )
-        valid->xstatetable.entry_validate_func( state,
-                                                flags,
-                                                &glyphOffset,
-                                                xstatetable_table,
-                                                xstatetable_limit,
-                                                valid );
+      if ( NULL != gxvalid->xstatetable.entry_validate_func )
+        gxvalid->xstatetable.entry_validate_func( state,
+                                                  flags,
+                                                  &glyphOffset,
+                                                  xstatetable_table,
+                                                  xstatetable_limit,
+                                                  gxvalid );
     }
 
   Exit:
@@ -1559,7 +1559,7 @@
   FT_LOCAL_DEF( void )
   gxv_XStateTable_validate( FT_Bytes       table,
                             FT_Bytes       limit,
-                            GXV_Validator  valid )
+                            GXV_Validator  gxvalid )
   {
     /* StateHeader members */
     FT_ULong   classTable;      /* offset to Class(Sub)Table */
@@ -1582,26 +1582,26 @@
     GXV_TRACE(( "XStateTable header\n" ));
 
     GXV_LIMIT_CHECK( 4 + 4 + 4 + 4 );
-    valid->xstatetable.nClasses = FT_NEXT_ULONG( p );
+    gxvalid->xstatetable.nClasses = FT_NEXT_ULONG( p );
     classTable = FT_NEXT_ULONG( p );
     stateArray = FT_NEXT_ULONG( p );
     entryTable = FT_NEXT_ULONG( p );
 
-    GXV_TRACE(( "nClasses =0x%08x\n", valid->xstatetable.nClasses ));
+    GXV_TRACE(( "nClasses =0x%08x\n", gxvalid->xstatetable.nClasses ));
     GXV_TRACE(( "offset to classTable=0x%08x\n", classTable ));
     GXV_TRACE(( "offset to stateArray=0x%08x\n", stateArray ));
     GXV_TRACE(( "offset to entryTable=0x%08x\n", entryTable ));
 
-    if ( valid->xstatetable.nClasses > 0xFFFFU )
+    if ( gxvalid->xstatetable.nClasses > 0xFFFFU )
       FT_INVALID_DATA;
 
     GXV_TRACE(( "StateTable Subtables\n" ));
 
-    if ( valid->xstatetable.optdata_load_func != NULL )
-      valid->xstatetable.optdata_load_func( p, limit, valid );
+    if ( gxvalid->xstatetable.optdata_load_func != NULL )
+      gxvalid->xstatetable.optdata_load_func( p, limit, gxvalid );
 
-    if ( valid->xstatetable.subtable_setup_func != NULL )
-      setup_func = valid->xstatetable.subtable_setup_func;
+    if ( gxvalid->xstatetable.subtable_setup_func != NULL )
+      setup_func = gxvalid->xstatetable.subtable_setup_func;
     else
       setup_func = gxv_XStateTable_subtable_setup;
 
@@ -1612,37 +1612,37 @@
                 &classTable_length,
                 &stateArray_length,
                 &entryTable_length,
-                valid );
+                gxvalid );
 
     if ( classTable != 0 )
     {
-      valid->xstatetable.maxClassID = 0;
-      valid->lookupval_sign         = GXV_LOOKUPVALUE_UNSIGNED;
-      valid->lookupval_func         = gxv_XClassTable_lookupval_validate;
-      valid->lookupfmt4_trans       = gxv_XClassTable_lookupfmt4_transit;
+      gxvalid->xstatetable.maxClassID = 0;
+      gxvalid->lookupval_sign         = GXV_LOOKUPVALUE_UNSIGNED;
+      gxvalid->lookupval_func         = gxv_XClassTable_lookupval_validate;
+      gxvalid->lookupfmt4_trans       = gxv_XClassTable_lookupfmt4_transit;
       gxv_LookupTable_validate( table + classTable,
                                 table + classTable + classTable_length,
-                                valid );
+                                gxvalid );
 #if 0
-      if ( valid->subtable_length < classTable_length )
-        classTable_length = valid->subtable_length;
+      if ( gxvalid->subtable_length < classTable_length )
+        classTable_length = gxvalid->subtable_length;
 #endif
     }
     else
     {
       /* XXX: check range? */
-      valid->xstatetable.maxClassID =
-        (FT_UShort)( valid->xstatetable.nClasses - 1 );
+      gxvalid->xstatetable.maxClassID =
+        (FT_UShort)( gxvalid->xstatetable.nClasses - 1 );
     }
 
     if ( stateArray != 0 )
       gxv_XStateArray_validate( table + stateArray,
                                 &stateArray_length,
-                                valid->xstatetable.maxClassID,
-                                valid->xstatetable.nClasses,
+                                gxvalid->xstatetable.maxClassID,
+                                gxvalid->xstatetable.nClasses,
                                 &maxState,
                                 &maxEntry,
-                                valid );
+                                gxvalid );
     else
     {
 #if 0
@@ -1659,10 +1659,10 @@
                                 &entryTable_length,
                                 maxEntry,
                                 stateArray_length,
-                                valid->xstatetable.maxClassID,
+                                gxvalid->xstatetable.maxClassID,
                                 table,
                                 limit,
-                                valid );
+                                gxvalid );
 
     GXV_EXIT;
   }
@@ -1719,7 +1719,7 @@
 
   FT_LOCAL_DEF( void )
   gxv_odtect_validate( GXV_odtect_Range  odtect,
-                       GXV_Validator     valid )
+                       GXV_Validator     gxvalid )
   {
     FT_UInt  i, j;
 
--- a/src/gxvalid/gxvcommn.h
+++ b/src/gxvalid/gxvcommn.h
@@ -62,7 +62,7 @@
 
 #undef GXV_LOAD_UNUSED_VARS /* debug purpose */
 
-#define IS_PARANOID_VALIDATION          ( valid->root->level >= FT_VALIDATE_PARANOID )
+#define IS_PARANOID_VALIDATION          ( gxvalid->root->level >= FT_VALIDATE_PARANOID )
 #define GXV_SET_ERR_IF_PARANOID( err )  { if ( IS_PARANOID_VALIDATION ) ( err ); }
 
   /*************************************************************************/
@@ -81,7 +81,7 @@
   typedef void
   (*GXV_Validate_Func)( FT_Bytes       table,
                         FT_Bytes       limit,
-                        GXV_Validator  valid );
+                        GXV_Validator  gxvalid );
 
 
   /* ====================== LookupTable Validator ======================== */
@@ -106,13 +106,13 @@
   typedef void
   (*GXV_Lookup_Value_Validate_Func)( FT_UShort            glyph,
                                      GXV_LookupValueCPtr  value_p,
-                                     GXV_Validator        valid );
+                                     GXV_Validator        gxvalid );
 
   typedef GXV_LookupValueDesc
   (*GXV_Lookup_Fmt4_Transit_Func)( FT_UShort            relative_gindex,
                                    GXV_LookupValueCPtr  base_value_p,
                                    FT_Bytes             lookuptbl_limit,
-                                   GXV_Validator        valid );
+                                   GXV_Validator        gxvalid );
 
 
   /* ====================== StateTable Validator ========================= */
@@ -131,10 +131,10 @@
 
 
 #define GXV_GLYPHOFFSET_FMT( table )           \
-        ( valid->table.entry_glyphoffset_fmt )
+        ( gxvalid->table.entry_glyphoffset_fmt )
 
 #define GXV_GLYPHOFFSET_SIZE( table )              \
-        ( valid->table.entry_glyphoffset_fmt / 2 )
+        ( gxvalid->table.entry_glyphoffset_fmt / 2 )
 
 
   /* ----------------------- 16bit StateTable ---------------------------- */
@@ -160,7 +160,7 @@
                                          FT_UShort*     classTable_length_p,
                                          FT_UShort*     stateArray_length_p,
                                          FT_UShort*     entryTable_length_p,
-                                         GXV_Validator  valid );
+                                         GXV_Validator  gxvalid );
 
   typedef void
   (*GXV_StateTable_Entry_Validate_Func)(
@@ -169,12 +169,12 @@
      GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
      FT_Bytes                        statetable_table,
      FT_Bytes                        statetable_limit,
-     GXV_Validator                   valid );
+     GXV_Validator                   gxvalid );
 
   typedef void
   (*GXV_StateTable_OptData_Load_Func)( FT_Bytes       table,
                                        FT_Bytes       limit,
-                                       GXV_Validator  valid );
+                                       GXV_Validator  gxvalid );
 
   typedef struct  GXV_StateTable_ValidatorRec_
   {
@@ -202,7 +202,7 @@
                                           FT_ULong*      classTable_length_p,
                                           FT_ULong*      stateArray_length_p,
                                           FT_ULong*      entryTable_length_p,
-                                          GXV_Validator  valid );
+                                          GXV_Validator  gxvalid );
 
   typedef void
   (*GXV_XStateTable_Entry_Validate_Func)(
@@ -211,7 +211,7 @@
      GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
      FT_Bytes                        xstatetable_table,
      FT_Bytes                        xstatetable_limit,
-     GXV_Validator                   valid );
+     GXV_Validator                   gxvalid );
 
 
   typedef GXV_StateTable_OptData_Load_Func  GXV_XStateTable_OptData_Load_Func;
@@ -263,15 +263,15 @@
 
 
 #define GXV_TABLE_DATA( tag, field )                           \
-        ( ( (GXV_ ## tag ## _Data)valid->table_data )->field )
+        ( ( (GXV_ ## tag ## _Data)gxvalid->table_data )->field )
 
 #undef  FT_INVALID_
 #define FT_INVALID_( _error ) \
-          ft_validator_error( valid->root, FT_THROW( _error ) )
+          ft_validator_error( gxvalid->root, FT_THROW( _error ) )
 
 #define GXV_LIMIT_CHECK( _count )                                     \
           FT_BEGIN_STMNT                                              \
-            if ( p + _count > ( limit? limit : valid->root->limit ) ) \
+            if ( p + _count > ( limit? limit : gxvalid->root->limit ) ) \
               FT_INVALID_TOO_SHORT;                                   \
           FT_END_STMNT
 
@@ -278,20 +278,20 @@
 
 #ifdef FT_DEBUG_LEVEL_TRACE
 
-#define GXV_INIT  valid->debug_indent = 0
+#define GXV_INIT  gxvalid->debug_indent = 0
 
 #define GXV_NAME_ENTER( name )                             \
           FT_BEGIN_STMNT                                   \
-            valid->debug_indent += 2;                      \
-            FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
+            gxvalid->debug_indent += 2;                      \
+            FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \
             FT_TRACE4(( "%s table\n", name ));             \
           FT_END_STMNT
 
-#define GXV_EXIT  valid->debug_indent -= 2
+#define GXV_EXIT  gxvalid->debug_indent -= 2
 
 #define GXV_TRACE( s )                                     \
           FT_BEGIN_STMNT                                   \
-            FT_TRACE4(( "%*.s", valid->debug_indent, 0 )); \
+            FT_TRACE4(( "%*.s", gxvalid->debug_indent, 0 )); \
             FT_TRACE4( s );                                \
           FT_END_STMNT
 
@@ -373,12 +373,12 @@
                               FT_Bytes       limit,
                               FT_UShort*     unitSize_p,
                               FT_UShort*     nUnits_p,
-                              GXV_Validator  valid );
+                              GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_LookupTable_validate( FT_Bytes       table,
                             FT_Bytes       limit,
-                            GXV_Validator  valid );
+                            GXV_Validator  gxvalid );
 
 
   /*************************************************************************/
@@ -391,7 +391,7 @@
 
   FT_LOCAL( FT_Int )
   gxv_glyphid_validate( FT_UShort      gid,
-                        GXV_Validator  valid );
+                        GXV_Validator  gxvalid );
 
 
   /*************************************************************************/
@@ -405,7 +405,7 @@
   FT_LOCAL( void )
   gxv_ctlPoint_validate( FT_UShort      gid,
                          FT_Short       ctl_point,
-                         GXV_Validator  valid );
+                         GXV_Validator  gxvalid );
 
 
   /*************************************************************************/
@@ -420,7 +420,7 @@
   gxv_sfntName_validate( FT_UShort      name_index,
                          FT_UShort      min_index,
                          FT_UShort      max_index,
-                         GXV_Validator  valid );
+                         GXV_Validator  gxvalid );
 
 
   /*************************************************************************/
@@ -439,7 +439,7 @@
                                  FT_UShort*     classTable_length_p,
                                  FT_UShort*     stateArray_length_p,
                                  FT_UShort*     entryTable_length_p,
-                                 GXV_Validator  valid );
+                                 GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_XStateTable_subtable_setup( FT_ULong       table_size,
@@ -449,17 +449,17 @@
                                   FT_ULong*      classTable_length_p,
                                   FT_ULong*      stateArray_length_p,
                                   FT_ULong*      entryTable_length_p,
-                                  GXV_Validator  valid );
+                                  GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_StateTable_validate( FT_Bytes       table,
                            FT_Bytes       limit,
-                           GXV_Validator  valid );
+                           GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_XStateTable_validate( FT_Bytes       table,
                             FT_Bytes       limit,
-                            GXV_Validator  valid );
+                            GXV_Validator  gxvalid );
 
 
   /*************************************************************************/
@@ -475,7 +475,7 @@
                             FT_Bytes       limit,
                             FT_Byte*       min,
                             FT_Byte*       max,
-                            GXV_Validator  valid );
+                            GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_array_getlimits_ushort( FT_Bytes       table,
@@ -482,7 +482,7 @@
                               FT_Bytes       limit,
                               FT_UShort*     min,
                               FT_UShort*     max,
-                              GXV_Validator  valid );
+                              GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_set_length_by_ushort_offset( FT_UShort*     offset,
@@ -490,7 +490,7 @@
                                    FT_UShort*     buff,
                                    FT_UInt        nmemb,
                                    FT_UShort      limit,
-                                   GXV_Validator  valid );
+                                   GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_set_length_by_ulong_offset( FT_ULong*      offset,
@@ -498,19 +498,19 @@
                                   FT_ULong*      buff,
                                   FT_UInt        nmemb,
                                   FT_ULong       limit,
-                                  GXV_Validator  valid);
+                                  GXV_Validator  gxvalid);
 
 
 #define GXV_SUBTABLE_OFFSET_CHECK( _offset )          \
           FT_BEGIN_STMNT                              \
-            if ( (_offset) > valid->subtable_length ) \
+            if ( (_offset) > gxvalid->subtable_length ) \
               FT_INVALID_OFFSET;                      \
           FT_END_STMNT
 
 #define GXV_SUBTABLE_LIMIT_CHECK( _count )                  \
           FT_BEGIN_STMNT                                    \
-            if ( ( p + (_count) - valid->subtable_start ) > \
-                   valid->subtable_length )                 \
+            if ( ( p + (_count) - gxvalid->subtable_start ) > \
+                   gxvalid->subtable_length )                 \
               FT_INVALID_TOO_SHORT;                         \
           FT_END_STMNT
 
@@ -556,7 +556,7 @@
 
   FT_LOCAL( void )
   gxv_odtect_validate( GXV_odtect_Range  odtect,
-                       GXV_Validator     valid );
+                       GXV_Validator     gxvalid );
 
 
 #define GXV_ODTECT( n, odtect )                              \
--- a/src/gxvalid/gxvfeat.c
+++ b/src/gxvalid/gxvfeat.c
@@ -82,7 +82,7 @@
   gxv_feat_registry_validate( FT_UShort      feature,
                               FT_UShort      nSettings,
                               FT_Bool        exclusive,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     GXV_NAME_ENTER( "feature in registry" );
 
@@ -108,7 +108,7 @@
     {
       /* Don't use here. Apple is reserved. */
       GXV_TRACE(( "feature number %d is reserved by Apple\n", feature ));
-      if ( valid->root->level >= FT_VALIDATE_TIGHT )
+      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
         FT_INVALID_DATA;
     }
 
@@ -117,7 +117,7 @@
       GXV_TRACE(( "feature %d: nSettings %d != defined nSettings %d\n",
                   feature, nSettings,
                   gxv_feat_registry[feature].nSettings ));
-      if ( valid->root->level >= FT_VALIDATE_TIGHT )
+      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
         FT_INVALID_DATA;
     }
 
@@ -125,7 +125,7 @@
     {
       GXV_TRACE(( "exclusive flag %d differs from predefined value\n",
                   exclusive ));
-      if ( valid->root->level >= FT_VALIDATE_TIGHT )
+      if ( gxvalid->root->level >= FT_VALIDATE_TIGHT )
         FT_INVALID_DATA;
     }
 
@@ -137,7 +137,7 @@
   static void
   gxv_feat_name_index_validate( FT_Bytes       table,
                                 FT_Bytes       limit,
-                                GXV_Validator  valid )
+                                GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -153,7 +153,7 @@
     gxv_sfntName_validate( (FT_UShort)nameIndex,
                            255,
                            32768U,
-                           valid );
+                           gxvalid );
 
     GXV_EXIT;
   }
@@ -163,7 +163,7 @@
   gxv_feat_setting_validate( FT_Bytes       table,
                              FT_Bytes       limit,
                              FT_Bool        exclusive,
-                             GXV_Validator  valid )
+                             GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  setting;
@@ -179,7 +179,7 @@
     if ( exclusive && ( setting & 1 ) == 0 )
       FT_INVALID_DATA;
 
-    gxv_feat_name_index_validate( p, limit, valid );
+    gxv_feat_name_index_validate( p, limit, gxvalid );
 
     GXV_FEAT_DATA( setting ) = setting;
 
@@ -190,7 +190,7 @@
   static void
   gxv_feat_name_validate( FT_Bytes       table,
                           FT_Bytes       limit,
-                          GXV_Validator  valid )
+                          GXV_Validator  gxvalid )
   {
     FT_Bytes   p             = table;
     FT_UInt    reserved_size = GXV_FEAT_DATA( reserved_size );
@@ -240,14 +240,14 @@
         FT_INVALID_FORMAT;
     }
 
-    gxv_feat_registry_validate( feature, nSettings, exclusive, valid );
+    gxv_feat_registry_validate( feature, nSettings, exclusive, gxvalid );
 
-    gxv_feat_name_index_validate( p, limit, valid );
+    gxv_feat_name_index_validate( p, limit, gxvalid );
 
-    p = valid->root->base + settingTable;
+    p = gxvalid->root->base + settingTable;
     for ( last_setting = -1, i = 0; i < nSettings; i++ )
     {
-      gxv_feat_setting_validate( p, limit, exclusive, valid );
+      gxv_feat_setting_validate( p, limit, exclusive, gxvalid );
 
       if ( (FT_Int)GXV_FEAT_DATA( setting ) <= last_setting )
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
@@ -274,8 +274,8 @@
                      FT_Face       face,
                      FT_Validator  ftvalid )
   {
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
 
     GXV_feat_DataRec  featrec;
     GXV_feat_Data     feat = &featrec;
@@ -289,9 +289,9 @@
     FT_Int            last_feature;
 
 
-    valid->root       = ftvalid;
-    valid->table_data = feat;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = feat;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `feat' table\n" ));
     GXV_INIT;
@@ -323,7 +323,7 @@
 
     for ( last_feature = -1, i = 0; i < featureNameCount; i++ )
     {
-      gxv_feat_name_validate( p, limit, valid );
+      gxv_feat_name_validate( p, limit, gxvalid );
 
       if ( (FT_Int)GXV_FEAT_DATA( feature ) <= last_feature )
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_FORMAT );
--- a/src/gxvalid/gxvjust.c
+++ b/src/gxvalid/gxvjust.c
@@ -69,14 +69,14 @@
   static void
   gxv_just_check_max_gid( FT_UShort         gid,
                           const FT_String*  msg_tag,
-                          GXV_Validator     valid )
+                          GXV_Validator     gxvalid )
   {
-    if ( gid < valid->face->num_glyphs )
+    if ( gid < gxvalid->face->num_glyphs )
       return;
 
     GXV_TRACE(( "just table includes too large %s"
                 " GID=%d > %d (in maxp)\n",
-                msg_tag, gid, valid->face->num_glyphs ));
+                msg_tag, gid, gxvalid->face->num_glyphs ));
     GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
   }
 
@@ -84,7 +84,7 @@
   static void
   gxv_just_wdp_entry_validate( FT_Bytes       table,
                                FT_Bytes       limit,
-                               GXV_Validator  valid )
+                               GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_ULong   justClass;
@@ -120,7 +120,7 @@
       GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -127,7 +127,7 @@
   static void
   gxv_just_wdc_entry_validate( FT_Bytes       table,
                                FT_Bytes       limit,
-                               GXV_Validator  valid )
+                               GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
     FT_ULong  count, i;
@@ -138,11 +138,11 @@
     for ( i = 0; i < count; i++ )
     {
       GXV_TRACE(( "validating wdc pair %d/%d\n", i + 1, count ));
-      gxv_just_wdp_entry_validate( p, limit, valid );
-      p += valid->subtable_length;
+      gxv_just_wdp_entry_validate( p, limit, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -149,7 +149,7 @@
   static void
   gxv_just_widthDeltaClusters_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes  p         = table ;
     FT_Bytes  wdc_end   = table + GXV_JUST_DATA( wdc_offset_max );
@@ -163,11 +163,11 @@
 
     for ( i = 0; p <= wdc_end; i++ )
     {
-      gxv_just_wdc_entry_validate( p, limit, valid );
-      p += valid->subtable_length;
+      gxv_just_wdc_entry_validate( p, limit, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -176,7 +176,7 @@
   static void
   gxv_just_actSubrecord_type0_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
 
@@ -214,10 +214,10 @@
 
       GXV_LIMIT_CHECK( 2 );
       glyphs = FT_NEXT_USHORT( p );
-      gxv_just_check_max_gid( glyphs, "type0:glyphs", valid );
+      gxv_just_check_max_gid( glyphs, "type0:glyphs", gxvalid );
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -224,7 +224,7 @@
   static void
   gxv_just_actSubrecord_type1_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  addGlyph;
@@ -233,9 +233,9 @@
     GXV_LIMIT_CHECK( 2 );
     addGlyph = FT_NEXT_USHORT( p );
 
-    gxv_just_check_max_gid( addGlyph, "type1:addGlyph", valid );
+    gxv_just_check_max_gid( addGlyph, "type1:addGlyph", gxvalid );
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -242,11 +242,11 @@
   static void
   gxv_just_actSubrecord_type2_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
 #ifdef GXV_LOAD_UNUSED_VARS
-    FT_Fixed   substThreshhold; /* Apple misspelled "Threshhold" */
+    FT_Fixed      substThreshhold; /* Apple misspelled "Threshhold" */
 #endif
     FT_UShort  addGlyph;
     FT_UShort  substGlyph;
@@ -262,11 +262,11 @@
     substGlyph      = FT_NEXT_USHORT( p );
 
     if ( addGlyph != 0xFFFF )
-      gxv_just_check_max_gid( addGlyph, "type2:addGlyph", valid );
+      gxv_just_check_max_gid( addGlyph, "type2:addGlyph", gxvalid );
 
-    gxv_just_check_max_gid( substGlyph, "type2:substGlyph", valid );
+    gxv_just_check_max_gid( substGlyph, "type2:substGlyph", gxvalid );
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -273,7 +273,7 @@
   static void
   gxv_just_actSubrecord_type4_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
     FT_ULong  variantsAxis;
@@ -288,7 +288,7 @@
     noStretchValue = FT_NEXT_ULONG( p );
     maximumLimit   = FT_NEXT_ULONG( p );
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     if ( variantsAxis != 0x64756374L ) /* 'duct' */
       GXV_TRACE(( "variantsAxis 0x%08x is non default value",
@@ -310,7 +310,7 @@
   static void
   gxv_just_actSubrecord_type5_validate( FT_Bytes       table,
                                         FT_Bytes       limit,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  flags;
@@ -324,9 +324,9 @@
     if ( flags )
       GXV_TRACE(( "type5: nonzero value 0x%04x in unused flags\n",
                    flags ));
-    gxv_just_check_max_gid( glyph, "type5:glyph", valid );
+    gxv_just_check_max_gid( glyph, "type5:glyph", gxvalid );
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
   }
 
 
@@ -334,7 +334,7 @@
   static void
   gxv_just_actSubrecord_validate( FT_Bytes       table,
                                   FT_Bytes       limit,
-                                  GXV_Validator  valid )
+                                  GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  actionClass;
@@ -354,21 +354,21 @@
       GXV_SET_ERR_IF_PARANOID( FT_INVALID_DATA );
 
     if ( actionType == 0 )
-      gxv_just_actSubrecord_type0_validate( p, limit, valid );
+      gxv_just_actSubrecord_type0_validate( p, limit, gxvalid );
     else if ( actionType == 1 )
-      gxv_just_actSubrecord_type1_validate( p, limit, valid );
+      gxv_just_actSubrecord_type1_validate( p, limit, gxvalid );
     else if ( actionType == 2 )
-      gxv_just_actSubrecord_type2_validate( p, limit, valid );
+      gxv_just_actSubrecord_type2_validate( p, limit, gxvalid );
     else if ( actionType == 3 )
       ;                         /* Stretch glyph action: no actionData */
     else if ( actionType == 4 )
-      gxv_just_actSubrecord_type4_validate( p, limit, valid );
+      gxv_just_actSubrecord_type4_validate( p, limit, gxvalid );
     else if ( actionType == 5 )
-      gxv_just_actSubrecord_type5_validate( p, limit, valid );
+      gxv_just_actSubrecord_type5_validate( p, limit, gxvalid );
     else
       FT_INVALID_DATA;
 
-    valid->subtable_length = actionLength;
+    gxvalid->subtable_length = actionLength;
 
     GXV_EXIT;
   }
@@ -377,7 +377,7 @@
   static void
   gxv_just_pcActionRecord_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
     FT_ULong  actionCount;
@@ -390,11 +390,11 @@
 
     for ( i = 0; i < actionCount; i++ )
     {
-      gxv_just_actSubrecord_validate( p, limit, valid );
-      p += valid->subtable_length;
+      gxv_just_actSubrecord_validate( p, limit, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -403,7 +403,7 @@
   static void
   gxv_just_pcTable_LookupValue_entry_validate( FT_UShort            glyph,
                                                GXV_LookupValueCPtr  value_p,
-                                               GXV_Validator        valid )
+                                               GXV_Validator        gxvalid )
   {
     FT_UNUSED( glyph );
 
@@ -417,9 +417,9 @@
   static void
   gxv_just_pcLookupTable_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
-    FT_Bytes p = table;
+    FT_Bytes  p = table;
 
 
     GXV_NAME_ENTER( "just pcLookupTable" );
@@ -426,10 +426,10 @@
     GXV_JUST_DATA( pc_offset_max ) = 0x0000;
     GXV_JUST_DATA( pc_offset_min ) = 0xFFFFU;
 
-    valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
+    gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func = gxv_just_pcTable_LookupValue_entry_validate;
 
-    gxv_LookupTable_validate( p, limit, valid );
+    gxv_LookupTable_validate( p, limit, gxvalid );
 
     /* subtable_length is set by gxv_LookupTable_validate() */
 
@@ -440,7 +440,7 @@
   static void
   gxv_just_postcompTable_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -447,13 +447,13 @@
 
     GXV_NAME_ENTER( "just postcompTable" );
 
-    gxv_just_pcLookupTable_validate( p, limit, valid );
-    p += valid->subtable_length;
+    gxv_just_pcLookupTable_validate( p, limit, gxvalid );
+    p += gxvalid->subtable_length;
 
-    gxv_just_pcActionRecord_validate( p, limit, valid );
-    p += valid->subtable_length;
+    gxv_just_pcActionRecord_validate( p, limit, gxvalid );
+    p += gxvalid->subtable_length;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -466,7 +466,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     /* TODO: validate markClass & currentClass */
@@ -480,7 +480,7 @@
     FT_UNUSED( glyphOffset_p );
     FT_UNUSED( table );
     FT_UNUSED( limit );
-    FT_UNUSED( valid );
+    FT_UNUSED( gxvalid );
 
 #ifndef GXV_LOAD_UNUSED_VARS
     FT_UNUSED( flags );
@@ -496,7 +496,7 @@
   static void
   gxv_just_justClassTable_validate ( FT_Bytes       table,
                                      FT_Bytes       limit,
-                                     GXV_Validator  valid )
+                                     GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  length;
@@ -521,14 +521,14 @@
       GXV_TRACE(( "  justClassTable: nonzero value (0x%08x)"
                   " in unused subFeatureFlags\n", subFeatureFlags ));
 
-    valid->statetable.optdata               = NULL;
-    valid->statetable.optdata_load_func     = NULL;
-    valid->statetable.subtable_setup_func   = NULL;
-    valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
-    valid->statetable.entry_validate_func   =
+    gxvalid->statetable.optdata               = NULL;
+    gxvalid->statetable.optdata_load_func     = NULL;
+    gxvalid->statetable.subtable_setup_func   = NULL;
+    gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+    gxvalid->statetable.entry_validate_func   =
       gxv_just_classTable_entry_validate;
 
-    gxv_StateTable_validate( p, table + length, valid );
+    gxv_StateTable_validate( p, table + length, gxvalid );
 
     /* subtable_length is set by gxv_LookupTable_validate() */
 
@@ -539,7 +539,7 @@
   static void
   gxv_just_wdcTable_LookupValue_validate( FT_UShort            glyph,
                                           GXV_LookupValueCPtr  value_p,
-                                          GXV_Validator        valid )
+                                          GXV_Validator        gxvalid )
   {
     FT_UNUSED( glyph );
 
@@ -553,7 +553,7 @@
   static void
   gxv_just_justData_lookuptable_validate( FT_Bytes       table,
                                           FT_Bytes       limit,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -561,10 +561,10 @@
     GXV_JUST_DATA( wdc_offset_max ) = 0x0000;
     GXV_JUST_DATA( wdc_offset_min ) = 0xFFFFU;
 
-    valid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;
+    gxvalid->lookupval_sign = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func = gxv_just_wdcTable_LookupValue_validate;
 
-    gxv_LookupTable_validate( p, limit, valid );
+    gxv_LookupTable_validate( p, limit, gxvalid );
 
     /* subtable_length is set by gxv_LookupTable_validate() */
 
@@ -578,7 +578,7 @@
   static void
   gxv_just_justData_validate( FT_Bytes       table,
                               FT_Bytes       limit,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     /*
      * following 3 offsets are measured from the start of `just'
@@ -604,36 +604,36 @@
     GXV_TRACE(( " (wdcTableOffset = 0x%04x)\n", wdcTableOffset ));
     GXV_TRACE(( " (pcTableOffset = 0x%04x)\n", pcTableOffset ));
 
-    gxv_just_justData_lookuptable_validate( p, limit, valid );
-    gxv_odtect_add_range( p, valid->subtable_length,
+    gxv_just_justData_lookuptable_validate( p, limit, gxvalid );
+    gxv_odtect_add_range( p, gxvalid->subtable_length,
                           "just_LookupTable", odtect );
 
     if ( wdcTableOffset )
     {
       gxv_just_widthDeltaClusters_validate(
-        valid->root->base + wdcTableOffset, limit, valid );
-      gxv_odtect_add_range( valid->root->base + wdcTableOffset,
-                            valid->subtable_length, "just_wdcTable", odtect );
+        gxvalid->root->base + wdcTableOffset, limit, gxvalid );
+      gxv_odtect_add_range( gxvalid->root->base + wdcTableOffset,
+                            gxvalid->subtable_length, "just_wdcTable", odtect );
     }
 
     if ( pcTableOffset )
     {
-      gxv_just_postcompTable_validate( valid->root->base + pcTableOffset,
-                                       limit, valid );
-      gxv_odtect_add_range( valid->root->base + pcTableOffset,
-                            valid->subtable_length, "just_pcTable", odtect );
+      gxv_just_postcompTable_validate( gxvalid->root->base + pcTableOffset,
+                                       limit, gxvalid );
+      gxv_odtect_add_range( gxvalid->root->base + pcTableOffset,
+                            gxvalid->subtable_length, "just_pcTable", odtect );
     }
 
     if ( justClassTableOffset )
     {
       gxv_just_justClassTable_validate(
-        valid->root->base + justClassTableOffset, limit, valid );
-      gxv_odtect_add_range( valid->root->base + justClassTableOffset,
-                            valid->subtable_length, "just_justClassTable",
+        gxvalid->root->base + justClassTableOffset, limit, gxvalid );
+      gxv_odtect_add_range( gxvalid->root->base + justClassTableOffset,
+                            gxvalid->subtable_length, "just_justClassTable",
                             odtect );
     }
 
-    gxv_odtect_validate( odtect, valid );
+    gxv_odtect_validate( odtect, gxvalid );
 
     GXV_EXIT;
   }
@@ -647,8 +647,8 @@
     FT_Bytes           p     = table;
     FT_Bytes           limit = 0;
 
-    GXV_ValidatorRec   validrec;
-    GXV_Validator      valid = &validrec;
+    GXV_ValidatorRec   gxvalidrec;
+    GXV_Validator      gxvalid = &gxvalidrec;
     GXV_just_DataRec   justrec;
     GXV_just_Data      just = &justrec;
 
@@ -662,14 +662,14 @@
 
     GXV_ODTECT_INIT( odtect );
 
-    valid->root       = ftvalid;
-    valid->table_data = just;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = just;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `just' table\n" ));
     GXV_INIT;
 
-    limit      = valid->root->limit;
+    limit      = gxvalid->root->limit;
 
     GXV_LIMIT_CHECK( 4 + 2 + 2 + 2 );
     version     = FT_NEXT_ULONG( p );
@@ -696,19 +696,19 @@
     /* validate justData */
     if ( 0 < horizOffset )
     {
-      gxv_just_justData_validate( table + horizOffset, limit, valid );
-      gxv_odtect_add_range( table + horizOffset, valid->subtable_length,
+      gxv_just_justData_validate( table + horizOffset, limit, gxvalid );
+      gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,
                             "horizJustData", odtect );
     }
 
     if ( 0 < vertOffset )
     {
-      gxv_just_justData_validate( table + vertOffset, limit, valid );
-      gxv_odtect_add_range( table + vertOffset, valid->subtable_length,
+      gxv_just_justData_validate( table + vertOffset, limit, gxvalid );
+      gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,
                             "vertJustData", odtect );
     }
 
-    gxv_odtect_validate( odtect, valid );
+    gxv_odtect_validate( odtect, gxvalid );
 
     FT_TRACE4(( "\n" ));
   }
--- a/src/gxvalid/gxvkern.c
+++ b/src/gxvalid/gxvkern.c
@@ -79,20 +79,20 @@
 
 #define GXV_KERN_DATA( field )  GXV_TABLE_DATA( kern, field )
 
-#define KERN_IS_CLASSIC( valid )                               \
+#define KERN_IS_CLASSIC( gxvalid )                               \
           ( KERN_VERSION_CLASSIC == GXV_KERN_DATA( version ) )
-#define KERN_IS_NEW( valid )                                   \
+#define KERN_IS_NEW( gxvalid )                                   \
           ( KERN_VERSION_NEW     == GXV_KERN_DATA( version ) )
 
-#define KERN_DIALECT( valid )              \
+#define KERN_DIALECT( gxvalid )              \
           GXV_KERN_DATA( dialect_request )
-#define KERN_ALLOWS_MS( valid )                       \
-          ( KERN_DIALECT( valid ) & KERN_DIALECT_MS )
-#define KERN_ALLOWS_APPLE( valid )                       \
-          ( KERN_DIALECT( valid ) & KERN_DIALECT_APPLE )
+#define KERN_ALLOWS_MS( gxvalid )                       \
+          ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_MS )
+#define KERN_ALLOWS_APPLE( gxvalid )                       \
+          ( KERN_DIALECT( gxvalid ) & KERN_DIALECT_APPLE )
 
-#define GXV_KERN_HEADER_SIZE           ( KERN_IS_NEW( valid ) ? 8 : 4 )
-#define GXV_KERN_SUBTABLE_HEADER_SIZE  ( KERN_IS_NEW( valid ) ? 8 : 6 )
+#define GXV_KERN_HEADER_SIZE           ( KERN_IS_NEW( gxvalid ) ? 8 : 4 )
+#define GXV_KERN_SUBTABLE_HEADER_SIZE  ( KERN_IS_NEW( gxvalid ) ? 8 : 6 )
 
 
   /*************************************************************************/
@@ -110,7 +110,7 @@
   gxv_kern_subtable_fmt0_pairs_validate( FT_Bytes       table,
                                          FT_Bytes       limit,
                                          FT_UShort      nPairs,
-                                         GXV_Validator  valid )
+                                         GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  i;
@@ -134,11 +134,11 @@
 
       /* left */
       gid_left  = FT_NEXT_USHORT( p );
-      gxv_glyphid_validate( gid_left, valid );
+      gxv_glyphid_validate( gid_left, gxvalid );
 
       /* right */
       gid_right = FT_NEXT_USHORT( p );
-      gxv_glyphid_validate( gid_right, valid );
+      gxv_glyphid_validate( gid_right, gxvalid );
 
       /* Pairs of left and right GIDs must be unique and sorted. */
       GXV_TRACE(( "left gid = %u, right gid = %u\n", gid_left, gid_right ));
@@ -171,7 +171,7 @@
   static void
   gxv_kern_subtable_fmt0_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;
 
@@ -186,10 +186,10 @@
 
     /* nPairs, searchRange, entrySelector, rangeShift */
     GXV_LIMIT_CHECK( 2 + 2 + 2 + 2 );
-    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, valid );
+    gxv_BinSrchHeader_validate( p, limit, &unitSize, &nPairs, gxvalid );
     p += 2 + 2 + 2 + 2;
 
-    gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, valid );
+    gxv_kern_subtable_fmt0_pairs_validate( p, limit, nPairs, gxvalid );
 
     GXV_EXIT;
   }
@@ -209,11 +209,11 @@
   static void
   gxv_kern_subtable_fmt1_valueTable_load( FT_Bytes       table,
                                           FT_Bytes       limit,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_Bytes                       p = table;
     GXV_kern_fmt1_StateOptRecData  optdata =
-      (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+      (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
 
 
     GXV_LIMIT_CHECK( 2 );
@@ -232,7 +232,7 @@
                                          FT_UShort*     classTable_length_p,
                                          FT_UShort*     stateArray_length_p,
                                          FT_UShort*     entryTable_length_p,
-                                         GXV_Validator  valid )
+                                         GXV_Validator  gxvalid )
   {
     FT_UShort  o[4];
     FT_UShort  *l[4];
@@ -239,7 +239,7 @@
     FT_UShort  buff[5];
 
     GXV_kern_fmt1_StateOptRecData  optdata =
-      (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+      (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
 
 
     o[0] = classTable;
@@ -251,7 +251,7 @@
     l[2] = entryTable_length_p;
     l[3] = &(optdata->valueTable_length);
 
-    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid );
+    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );
   }
 
 
@@ -265,7 +265,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_UShort  push;
@@ -289,7 +289,7 @@
 
     {
       GXV_kern_fmt1_StateOptRecData  vt_rec =
-        (GXV_kern_fmt1_StateOptRecData)valid->statetable.optdata;
+        (GXV_kern_fmt1_StateOptRecData)gxvalid->statetable.optdata;
       FT_Bytes  p;
 
 
@@ -311,7 +311,7 @@
   static void
   gxv_kern_subtable_fmt1_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     FT_Bytes                   p = table;
     GXV_kern_fmt1_StateOptRec  vt_rec;
@@ -319,18 +319,18 @@
 
     GXV_NAME_ENTER( "kern subtable format 1" );
 
-    valid->statetable.optdata =
+    gxvalid->statetable.optdata =
       &vt_rec;
-    valid->statetable.optdata_load_func =
+    gxvalid->statetable.optdata_load_func =
       gxv_kern_subtable_fmt1_valueTable_load;
-    valid->statetable.subtable_setup_func =
+    gxvalid->statetable.subtable_setup_func =
       gxv_kern_subtable_fmt1_subtable_setup;
-    valid->statetable.entry_glyphoffset_fmt =
+    gxvalid->statetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_NONE;
-    valid->statetable.entry_validate_func =
+    gxvalid->statetable.entry_validate_func =
       gxv_kern_subtable_fmt1_entry_validate;
 
-    gxv_StateTable_validate( p, limit, valid );
+    gxv_StateTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
@@ -373,7 +373,7 @@
   gxv_kern_subtable_fmt2_clstbl_validate( FT_Bytes            table,
                                           FT_Bytes            limit,
                                           GXV_kern_ClassSpec  spec,
-                                          GXV_Validator       valid )
+                                          GXV_Validator       gxvalid )
   {
     const FT_String*  tag    = GXV_KERN_FMT2_DATA( class_tag[spec] );
     GXV_odtect_Range  odtect = GXV_KERN_FMT2_DATA( odtect );
@@ -391,13 +391,13 @@
     GXV_TRACE(( " %s firstGlyph=%d, nGlyphs=%d\n",
                 tag, firstGlyph, nGlyphs ));
 
-    gxv_glyphid_validate( firstGlyph, valid );
-    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), valid );
+    gxv_glyphid_validate( firstGlyph, gxvalid );
+    gxv_glyphid_validate( (FT_UShort)( firstGlyph + nGlyphs - 1 ), gxvalid );
 
     gxv_array_getlimits_ushort( p, p + ( 2 * nGlyphs ),
                                 &( GXV_KERN_FMT2_DATA( offset_min[spec] ) ),
                                 &( GXV_KERN_FMT2_DATA( offset_max[spec] ) ),
-                                valid );
+                                gxvalid );
 
     gxv_odtect_add_range( table, 2 * nGlyphs, tag, odtect );
 
@@ -408,7 +408,7 @@
   static void
   gxv_kern_subtable_fmt2_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     GXV_ODTECT( 3, odtect );
     GXV_kern_subtable_fmt2_DataRec  fmt2_rec =
@@ -439,10 +439,10 @@
     GXV_LIMIT_CHECK( GXV_KERN_FMT2_DATA( array ) );
 
     gxv_kern_subtable_fmt2_clstbl_validate( table + leftOffsetTable, limit,
-                                            GXV_KERN_CLS_L, valid );
+                                            GXV_KERN_CLS_L, gxvalid );
 
     gxv_kern_subtable_fmt2_clstbl_validate( table + rightOffsetTable, limit,
-                                            GXV_KERN_CLS_R, valid );
+                                            GXV_KERN_CLS_R, gxvalid );
 
     if ( GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_L] ) +
            GXV_KERN_FMT2_DATA( offset_min[GXV_KERN_CLS_R] )
@@ -455,7 +455,7 @@
                             - GXV_KERN_FMT2_DATA( array ),
                           "array", odtect );
 
-    gxv_odtect_validate( odtect, valid );
+    gxv_odtect_validate( odtect, gxvalid );
 
     GXV_EXIT;
   }
@@ -466,7 +466,7 @@
   static void
   gxv_kern_subtable_fmt3_validate( FT_Bytes       table,
                                    FT_Bytes       limit,
-                                   GXV_Validator  valid )
+                                   GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table + GXV_KERN_SUBTABLE_HEADER_SIZE;
     FT_UShort  glyphCount;
@@ -485,10 +485,10 @@
     rightClassCount = FT_NEXT_BYTE( p );
     flags           = FT_NEXT_BYTE( p );
 
-    if ( valid->face->num_glyphs != glyphCount )
+    if ( gxvalid->face->num_glyphs != glyphCount )
     {
       GXV_TRACE(( "maxGID=%d, but glyphCount=%d\n",
-                  valid->face->num_glyphs, glyphCount ));
+                  gxvalid->face->num_glyphs, glyphCount ));
       GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
     }
 
@@ -509,8 +509,8 @@
 
 
       GXV_LIMIT_CHECK( glyphCount );
-      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid );
-      p += valid->subtable_length;
+      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );
+      p += gxvalid->subtable_length;
 
       if ( leftClassCount < max )
         FT_INVALID_DATA;
@@ -524,8 +524,8 @@
 
 
       GXV_LIMIT_CHECK( glyphCount );
-      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, valid );
-      p += valid->subtable_length;
+      gxv_array_getlimits_byte( p, p + glyphCount, &min, &max, gxvalid );
+      p += gxvalid->subtable_length;
 
       if ( rightClassCount < max )
         FT_INVALID_DATA;
@@ -549,7 +549,7 @@
       }
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -558,7 +558,7 @@
   static FT_Bool
   gxv_kern_coverage_new_apple_validate( FT_UShort      coverage,
                                         FT_UShort*     format,
-                                        GXV_Validator  valid )
+                                        GXV_Validator  gxvalid )
   {
     /* new Apple-dialect */
 #ifdef GXV_LOAD_TRACE_VARS
@@ -567,7 +567,7 @@
     FT_Bool  kernVariation;
 #endif
 
-    FT_UNUSED( valid );
+    FT_UNUSED( gxvalid );
 
 
     /* reserved bits = 0 */
@@ -595,7 +595,7 @@
   static FT_Bool
   gxv_kern_coverage_classic_apple_validate( FT_UShort      coverage,
                                             FT_UShort*     format,
-                                            GXV_Validator  valid )
+                                            GXV_Validator  gxvalid )
   {
     /* classic Apple-dialect */
 #ifdef GXV_LOAD_TRACE_VARS
@@ -605,7 +605,7 @@
 
 
     /* check expected flags, but don't check if MS-dialect is impossible */
-    if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( valid ) )
+    if ( !( coverage & 0xFD00 ) && KERN_ALLOWS_MS( gxvalid ) )
       return FALSE;
 
     /* reserved bits = 0 */
@@ -636,7 +636,7 @@
   static FT_Bool
   gxv_kern_coverage_classic_microsoft_validate( FT_UShort      coverage,
                                                 FT_UShort*     format,
-                                                GXV_Validator  valid )
+                                                GXV_Validator  gxvalid )
   {
     /* classic Microsoft-dialect */
 #ifdef GXV_LOAD_TRACE_VARS
@@ -646,7 +646,7 @@
     FT_Bool  override;
 #endif
 
-    FT_UNUSED( valid );
+    FT_UNUSED( gxvalid );
 
 
     /* reserved bits = 0 */
@@ -686,7 +686,7 @@
   static GXV_kern_Dialect
   gxv_kern_coverage_validate( FT_UShort      coverage,
                               FT_UShort*     format,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     GXV_kern_Dialect  result = KERN_DIALECT_UNKNOWN;
 
@@ -695,11 +695,11 @@
 
     GXV_TRACE(( "interprete coverage 0x%04x by Apple style\n", coverage ));
 
-    if ( KERN_IS_NEW( valid ) )
+    if ( KERN_IS_NEW( gxvalid ) )
     {
       if ( gxv_kern_coverage_new_apple_validate( coverage,
                                                  format,
-                                                 valid ) )
+                                                 gxvalid ) )
       {
         result = KERN_DIALECT_APPLE;
         goto Exit;
@@ -706,11 +706,11 @@
       }
     }
 
-    if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_APPLE( valid ) )
+    if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_APPLE( gxvalid ) )
     {
       if ( gxv_kern_coverage_classic_apple_validate( coverage,
                                                      format,
-                                                     valid ) )
+                                                     gxvalid ) )
       {
         result = KERN_DIALECT_APPLE;
         goto Exit;
@@ -717,11 +717,11 @@
       }
     }
 
-    if ( KERN_IS_CLASSIC( valid ) && KERN_ALLOWS_MS( valid ) )
+    if ( KERN_IS_CLASSIC( gxvalid ) && KERN_ALLOWS_MS( gxvalid ) )
     {
       if ( gxv_kern_coverage_classic_microsoft_validate( coverage,
                                                          format,
-                                                         valid ) )
+                                                         gxvalid ) )
       {
         result = KERN_DIALECT_MS;
         goto Exit;
@@ -739,7 +739,7 @@
   static void
   gxv_kern_subtable_validate( FT_Bytes       table,
                               FT_Bytes       limit,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
 #ifdef GXV_LOAD_TRACE_VARS
@@ -761,7 +761,7 @@
     u16[1]   = FT_NEXT_USHORT( p ); /* Apple: length_lo MS: length */
     coverage = FT_NEXT_USHORT( p );
 
-    switch ( gxv_kern_coverage_validate( coverage, &format, valid ) )
+    switch ( gxv_kern_coverage_validate( coverage, &format, gxvalid ) )
     {
     case KERN_DIALECT_MS:
 #ifdef GXV_LOAD_TRACE_VARS
@@ -785,7 +785,7 @@
 #endif
       GXV_TRACE(( "Subtable length = %d\n", length ));
 
-      if ( KERN_IS_NEW( valid ) )
+      if ( KERN_IS_NEW( gxvalid ) )
       {
         GXV_LIMIT_CHECK( 2 );
 #ifdef GXV_LOAD_TRACE_VARS
@@ -806,18 +806,18 @@
 
     /* formats 1, 2, 3 require the position of the start of this subtable */
     if ( format == 0 )
-      gxv_kern_subtable_fmt0_validate( table, table + length, valid );
+      gxv_kern_subtable_fmt0_validate( table, table + length, gxvalid );
     else if ( format == 1 )
-      gxv_kern_subtable_fmt1_validate( table, table + length, valid );
+      gxv_kern_subtable_fmt1_validate( table, table + length, gxvalid );
     else if ( format == 2 )
-      gxv_kern_subtable_fmt2_validate( table, table + length, valid );
+      gxv_kern_subtable_fmt2_validate( table, table + length, gxvalid );
     else if ( format == 3 )
-      gxv_kern_subtable_fmt3_validate( table, table + length, valid );
+      gxv_kern_subtable_fmt3_validate( table, table + length, gxvalid );
     else
       FT_INVALID_DATA;
 
   Exit:
-    valid->subtable_length = length;
+    gxvalid->subtable_length = length;
     GXV_EXIT;
   }
 
@@ -837,8 +837,8 @@
                              GXV_kern_Dialect  dialect_request,
                              FT_Validator      ftvalid )
   {
-    GXV_ValidatorRec   validrec;
-    GXV_Validator      valid = &validrec;
+    GXV_ValidatorRec   gxvalidrec;
+    GXV_Validator      gxvalid = &gxvalidrec;
 
     GXV_kern_DataRec   kernrec;
     GXV_kern_Data      kern = &kernrec;
@@ -850,13 +850,13 @@
     FT_UInt            i;
 
 
-    valid->root       = ftvalid;
-    valid->table_data = kern;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = kern;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `kern' table\n" ));
     GXV_INIT;
-    KERN_DIALECT( valid ) = dialect_request;
+    KERN_DIALECT( gxvalid ) = dialect_request;
 
     GXV_LIMIT_CHECK( 2 );
     GXV_KERN_DATA( version ) = (GXV_kern_Version)FT_NEXT_USHORT( p );
@@ -865,12 +865,12 @@
 
     if ( 0x0001 < GXV_KERN_DATA( version ) )
       FT_INVALID_FORMAT;
-    else if ( KERN_IS_CLASSIC( valid ) )
+    else if ( KERN_IS_CLASSIC( gxvalid ) )
     {
       GXV_LIMIT_CHECK( 2 );
       nTables = FT_NEXT_USHORT( p );
     }
-    else if ( KERN_IS_NEW( valid ) )
+    else if ( KERN_IS_NEW( gxvalid ) )
     {
       if ( classic_only )
         FT_INVALID_FORMAT;
@@ -886,8 +886,8 @@
     {
       GXV_TRACE(( "validating subtable %d/%d\n", i, nTables ));
       /* p should be 32bit-aligned? */
-      gxv_kern_subtable_validate( p, 0, valid );
-      p += valid->subtable_length;
+      gxv_kern_subtable_validate( p, 0, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
     FT_TRACE4(( "\n" ));
--- a/src/gxvalid/gxvlcar.c
+++ b/src/gxvalid/gxvlcar.c
@@ -67,7 +67,7 @@
   static void
   gxv_lcar_partial_validate( FT_UShort      partial,
                              FT_UShort      glyph,
-                             GXV_Validator  valid )
+                             GXV_Validator  gxvalid )
   {
     GXV_NAME_ENTER( "partial" );
 
@@ -74,7 +74,7 @@
     if ( GXV_LCAR_DATA( format ) != 1 )
       goto Exit;
 
-    gxv_ctlPoint_validate( glyph, partial, valid );
+    gxv_ctlPoint_validate( glyph, partial, gxvalid );
 
   Exit:
     GXV_EXIT;
@@ -84,10 +84,10 @@
   static void
   gxv_lcar_LookupValue_validate( FT_UShort            glyph,
                                  GXV_LookupValueCPtr  value_p,
-                                 GXV_Validator        valid )
+                                 GXV_Validator        gxvalid )
   {
-    FT_Bytes   p     = valid->root->base + value_p->u;
-    FT_Bytes   limit = valid->root->limit;
+    FT_Bytes   p     = gxvalid->root->base + value_p->u;
+    FT_Bytes   limit = gxvalid->root->limit;
     FT_UShort  count;
     FT_Short   partial;
     FT_UShort  i;
@@ -102,7 +102,7 @@
     for ( i = 0; i < count; i++ )
     {
       partial = FT_NEXT_SHORT( p );
-      gxv_lcar_partial_validate( partial, glyph, valid );
+      gxv_lcar_partial_validate( partial, glyph, gxvalid );
     }
 
     GXV_EXIT;
@@ -148,7 +148,7 @@
   gxv_lcar_LookupFmt4_transit( FT_UShort            relative_gindex,
                                GXV_LookupValueCPtr  base_value_p,
                                FT_Bytes             lookuptbl_limit,
-                               GXV_Validator        valid )
+                               GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -160,8 +160,8 @@
     /* XXX: check range? */
     offset = (FT_UShort)( base_value_p->u +
                           relative_gindex * sizeof ( FT_UShort ) );
-    p      = valid->root->base + offset;
-    limit  = valid->root->limit;
+    p      = gxvalid->root->base + offset;
+    limit  = gxvalid->root->limit;
 
     GXV_LIMIT_CHECK ( 2 );
     value.u = FT_NEXT_USHORT( p );
@@ -185,8 +185,8 @@
   {
     FT_Bytes          p     = table;
     FT_Bytes          limit = 0;
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
 
     GXV_lcar_DataRec  lcarrec;
     GXV_lcar_Data     lcar = &lcarrec;
@@ -194,9 +194,9 @@
     FT_Fixed          version;
 
 
-    valid->root       = ftvalid;
-    valid->table_data = lcar;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = lcar;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `lcar' table\n" ));
     GXV_INIT;
@@ -211,10 +211,10 @@
     if ( GXV_LCAR_DATA( format ) > 1 )
       FT_INVALID_FORMAT;
 
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_lcar_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit;
-    gxv_LookupTable_validate( p, limit, valid );
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_lcar_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_lcar_LookupFmt4_transit;
+    gxv_LookupTable_validate( p, limit, gxvalid );
 
     FT_TRACE4(( "\n" ));
   }
--- a/src/gxvalid/gxvmort.c
+++ b/src/gxvalid/gxvmort.c
@@ -40,7 +40,7 @@
 
   static void
   gxv_mort_feature_validate( GXV_mort_feature  f,
-                             GXV_Validator     valid )
+                             GXV_Validator     gxvalid )
   {
     if ( f->featureType >= gxv_feat_registry_length )
     {
@@ -89,7 +89,7 @@
   gxv_mort_featurearray_validate( FT_Bytes       table,
                                   FT_Bytes       limit,
                                   FT_ULong       nFeatureFlags,
-                                  GXV_Validator  valid )
+                                  GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
     FT_ULong  i;
@@ -106,13 +106,13 @@
       f.enableFlags    = FT_NEXT_ULONG( p );
       f.disableFlags   = FT_NEXT_ULONG( p );
 
-      gxv_mort_feature_validate( &f, valid );
+      gxv_mort_feature_validate( &f, gxvalid );
     }
 
     if ( !IS_GXV_MORT_FEATURE_OFF( f ) )
       FT_INVALID_DATA;
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -119,9 +119,9 @@
 
   FT_LOCAL_DEF( void )
   gxv_mort_coverage_validate( FT_UShort      coverage,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
-    FT_UNUSED( valid );
+    FT_UNUSED( gxvalid );
 
 #ifdef FT_DEBUG_LEVEL_TRACE
     if ( coverage & 0x8000U )
@@ -150,7 +150,7 @@
   gxv_mort_subtables_validate( FT_Bytes       table,
                                FT_Bytes       limit,
                                FT_UShort      nSubtables,
-                               GXV_Validator  valid )
+                               GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -198,7 +198,7 @@
       rest = length - ( 2 + 2 + 4 );
 
       GXV_LIMIT_CHECK( rest );
-      gxv_mort_coverage_validate( coverage, valid );
+      gxv_mort_coverage_validate( coverage, gxvalid );
 
       if ( type > 5 )
         FT_INVALID_FORMAT;
@@ -207,13 +207,13 @@
       if ( func == NULL )
         GXV_TRACE(( "morx type %d is reserved\n", type ));
 
-      func( p, p + rest, valid );
+      func( p, p + rest, gxvalid );
 
       p += rest;
       /* TODO: validate subFeatureFlags */
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -222,7 +222,7 @@
   static void
   gxv_mort_chain_validate( FT_Bytes       table,
                            FT_Bytes       limit,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
 #ifdef GXV_LOAD_UNUSED_VARS
@@ -246,10 +246,10 @@
     nSubtables    = FT_NEXT_USHORT( p );
 
     gxv_mort_featurearray_validate( p, table + chainLength,
-                                    nFeatureFlags, valid );
-    p += valid->subtable_length;
-    gxv_mort_subtables_validate( p, table + chainLength, nSubtables, valid );
-    valid->subtable_length = chainLength;
+                                    nFeatureFlags, gxvalid );
+    p += gxvalid->subtable_length;
+    gxv_mort_subtables_validate( p, table + chainLength, nSubtables, gxvalid );
+    gxvalid->subtable_length = chainLength;
 
     /* TODO: validate defaultFlags */
     GXV_EXIT;
@@ -261,8 +261,8 @@
                      FT_Face       face,
                      FT_Validator  ftvalid )
   {
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
     FT_Bytes          p     = table;
     FT_Bytes          limit = 0;
     FT_ULong          version;
@@ -270,9 +270,9 @@
     FT_ULong          i;
 
 
-    valid->root = ftvalid;
-    valid->face = face;
-    limit       = valid->root->limit;
+    gxvalid->root = ftvalid;
+    gxvalid->face = face;
+    limit         = gxvalid->root->limit;
 
     FT_TRACE3(( "validating `mort' table\n" ));
     GXV_INIT;
@@ -288,8 +288,8 @@
     {
       GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains ));
       GXV_32BIT_ALIGNMENT_VALIDATE( p - table );
-      gxv_mort_chain_validate( p, limit, valid );
-      p += valid->subtable_length;
+      gxv_mort_chain_validate( p, limit, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
     FT_TRACE4(( "\n" ));
--- a/src/gxvalid/gxvmort.h
+++ b/src/gxvalid/gxvmort.h
@@ -55,36 +55,36 @@
   gxv_mort_featurearray_validate( FT_Bytes       table,
                                   FT_Bytes       limit,
                                   FT_ULong       nFeatureFlags,
-                                  GXV_Validator  valid );
+                                  GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_coverage_validate( FT_UShort      coverage,
-                              GXV_Validator  valid );
+                              GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_subtable_type0_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_subtable_type1_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_subtable_type2_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_subtable_type4_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_mort_subtable_type5_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
 
 #endif /* __GXVMORT_H__ */
--- a/src/gxvalid/gxvmort0.c
+++ b/src/gxvalid/gxvmort0.c
@@ -67,7 +67,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
     FT_UShort  markFirst;
     FT_UShort  dontAdvance;
@@ -125,7 +125,7 @@
   FT_LOCAL_DEF( void )
   gxv_mort_subtable_type0_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -135,14 +135,14 @@
 
     GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );
 
-    valid->statetable.optdata               = NULL;
-    valid->statetable.optdata_load_func     = NULL;
-    valid->statetable.subtable_setup_func   = NULL;
-    valid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
-    valid->statetable.entry_validate_func =
+    gxvalid->statetable.optdata               = NULL;
+    gxvalid->statetable.optdata_load_func     = NULL;
+    gxvalid->statetable.subtable_setup_func   = NULL;
+    gxvalid->statetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+    gxvalid->statetable.entry_validate_func =
       gxv_mort_subtable_type0_entry_validate;
 
-    gxv_StateTable_validate( p, limit, valid );
+    gxv_StateTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmort1.c
+++ b/src/gxvalid/gxvmort1.c
@@ -53,12 +53,12 @@
   static void
   gxv_mort_subtable_type1_substitutionTable_load( FT_Bytes       table,
                                                   FT_Bytes       limit,
-                                                  GXV_Validator  valid )
+                                                  GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
     GXV_mort_subtable_type1_StateOptRecData  optdata =
-      (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;
 
 
     GXV_LIMIT_CHECK( 2 );
@@ -74,7 +74,7 @@
                                           FT_UShort*     classTable_length_p,
                                           FT_UShort*     stateArray_length_p,
                                           FT_UShort*     entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_UShort  o[4];
     FT_UShort  *l[4];
@@ -81,7 +81,7 @@
     FT_UShort  buff[5];
 
     GXV_mort_subtable_type1_StateOptRecData  optdata =
-      (GXV_mort_subtable_type1_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type1_StateOptRecData)gxvalid->statetable.optdata;
 
 
     o[0] = classTable;
@@ -93,7 +93,7 @@
     l[2] = entryTable_length_p;
     l[3] = &( optdata->substitutionTable_length );
 
-    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, valid );
+    gxv_set_length_by_ushort_offset( o, l, buff, 4, table_size, gxvalid );
   }
 
 
@@ -102,7 +102,7 @@
     FT_Short          wordOffset,
     const FT_String*  tag,
     FT_Byte           state,
-    GXV_Validator     valid )
+    GXV_Validator     gxvalid )
   {
     FT_UShort  substTable;
     FT_UShort  substTable_limit;
@@ -113,16 +113,16 @@
 
     substTable =
       ((GXV_mort_subtable_type1_StateOptRec *)
-       (valid->statetable.optdata))->substitutionTable;
+       (gxvalid->statetable.optdata))->substitutionTable;
     substTable_limit =
       (FT_UShort)( substTable +
                    ((GXV_mort_subtable_type1_StateOptRec *)
-                    (valid->statetable.optdata))->substitutionTable_length );
+                    (gxvalid->statetable.optdata))->substitutionTable_length );
 
-    valid->min_gid = (FT_UShort)( ( substTable       - wordOffset * 2 ) / 2 );
-    valid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );
-    valid->max_gid = (FT_UShort)( FT_MAX( valid->max_gid,
-                                          valid->face->num_glyphs ) );
+    gxvalid->min_gid = (FT_UShort)( ( substTable       - wordOffset * 2 ) / 2 );
+    gxvalid->max_gid = (FT_UShort)( ( substTable_limit - wordOffset * 2 ) / 2 );
+    gxvalid->max_gid = (FT_UShort)( FT_MAX( gxvalid->max_gid,
+                                            gxvalid->face->num_glyphs ) );
 
     /* XXX: check range? */
 
@@ -137,7 +137,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_UShort  setMark;
@@ -169,12 +169,12 @@
     gxv_mort_subtable_type1_offset_to_subst_validate( markOffset,
                                                       "markOffset",
                                                       state,
-                                                      valid );
+                                                      gxvalid );
 
     gxv_mort_subtable_type1_offset_to_subst_validate( currentOffset,
                                                       "currentOffset",
                                                       state,
-                                                      valid );
+                                                      gxvalid );
   }
 
 
@@ -181,12 +181,12 @@
   static void
   gxv_mort_subtable_type1_substTable_validate( FT_Bytes       table,
                                                FT_Bytes       limit,
-                                               GXV_Validator  valid )
+                                               GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  num_gids = (FT_UShort)(
                  ((GXV_mort_subtable_type1_StateOptRec *)
-                  (valid->statetable.optdata))->substitutionTable_length / 2 );
+                  (gxvalid->statetable.optdata))->substitutionTable_length / 2 );
     FT_UShort  i;
 
 
@@ -202,11 +202,11 @@
       if ( dst_gid >= 0xFFFFU )
         continue;
 
-      if ( dst_gid < valid->min_gid || valid->max_gid < dst_gid )
+      if ( dst_gid < gxvalid->min_gid || gxvalid->max_gid < dst_gid )
       {
         GXV_TRACE(( "substTable include a strange gid[%d]=%d >"
                     " out of define range (%d..%d)\n",
-                    i, dst_gid, valid->min_gid, valid->max_gid ));
+                    i, dst_gid, gxvalid->min_gid, gxvalid->max_gid ));
         GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
       }
     }
@@ -223,7 +223,7 @@
   FT_LOCAL_DEF( void )
   gxv_mort_subtable_type1_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -234,23 +234,23 @@
 
     GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE1_HEADER_SIZE );
 
-    valid->statetable.optdata =
+    gxvalid->statetable.optdata =
       &st_rec;
-    valid->statetable.optdata_load_func =
+    gxvalid->statetable.optdata_load_func =
       gxv_mort_subtable_type1_substitutionTable_load;
-    valid->statetable.subtable_setup_func =
+    gxvalid->statetable.subtable_setup_func =
       gxv_mort_subtable_type1_subtable_setup;
-    valid->statetable.entry_glyphoffset_fmt =
+    gxvalid->statetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_ULONG;
-    valid->statetable.entry_validate_func =
+    gxvalid->statetable.entry_validate_func =
 
       gxv_mort_subtable_type1_entry_validate;
-    gxv_StateTable_validate( p, limit, valid );
+    gxv_StateTable_validate( p, limit, gxvalid );
 
     gxv_mort_subtable_type1_substTable_validate(
       table + st_rec.substitutionTable,
       table + st_rec.substitutionTable + st_rec.substitutionTable_length,
-      valid );
+      gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmort2.c
+++ b/src/gxvalid/gxvmort2.c
@@ -57,11 +57,11 @@
   static void
   gxv_mort_subtable_type2_opttable_load( FT_Bytes       table,
                                          FT_Bytes       limit,
-                                         GXV_Validator  valid )
+                                         GXV_Validator  gxvalid )
   {
-    FT_Bytes p = table;
+    FT_Bytes  p = table;
     GXV_mort_subtable_type2_StateOptRecData  optdata =
-      (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
 
 
     GXV_LIMIT_CHECK( 2 + 2 + 2 );
@@ -86,7 +86,7 @@
                                           FT_UShort      *classTable_length_p,
                                           FT_UShort      *stateArray_length_p,
                                           FT_UShort      *entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_UShort  o[6];
     FT_UShort  *l[6];
@@ -93,7 +93,7 @@
     FT_UShort  buff[7];
 
     GXV_mort_subtable_type2_StateOptRecData  optdata =
-      (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
 
 
     GXV_NAME_ENTER( "subtable boundaries setup" );
@@ -111,7 +111,7 @@
     l[4] = &(optdata->componentTable_length);
     l[5] = &(optdata->ligatureTable_length);
 
-    gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, valid );
+    gxv_set_length_by_ushort_offset( o, l, buff, 6, table_size, gxvalid );
 
     GXV_TRACE(( "classTable: offset=0x%04x length=0x%04x\n",
                 classTable, *classTable_length_p ));
@@ -137,11 +137,11 @@
   gxv_mort_subtable_type2_ligActionOffset_validate(
     FT_Bytes       table,
     FT_UShort      ligActionOffset,
-    GXV_Validator  valid )
+    GXV_Validator  gxvalid )
   {
     /* access ligActionTable */
     GXV_mort_subtable_type2_StateOptRecData  optdata =
-      (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
 
     FT_Bytes lat_base  = table + optdata->ligActionTable;
     FT_Bytes p         = table + ligActionOffset;
@@ -214,7 +214,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_UShort setComponent;
@@ -236,16 +236,16 @@
 
     if ( 0 < offset )
       gxv_mort_subtable_type2_ligActionOffset_validate( table, offset,
-                                                        valid );
+                                                        gxvalid );
   }
 
 
   static void
   gxv_mort_subtable_type2_ligatureTable_validate( FT_Bytes       table,
-                                                  GXV_Validator  valid )
+                                                  GXV_Validator  gxvalid )
   {
     GXV_mort_subtable_type2_StateOptRecData  optdata =
-      (GXV_mort_subtable_type2_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type2_StateOptRecData)gxvalid->statetable.optdata;
 
     FT_Bytes p     = table + optdata->ligatureTable;
     FT_Bytes limit = table + optdata->ligatureTable
@@ -264,7 +264,7 @@
         GXV_LIMIT_CHECK( 2 );
         lig_gid = FT_NEXT_USHORT( p );
 
-        if ( valid->face->num_glyphs < lig_gid )
+        if ( gxvalid->face->num_glyphs < lig_gid )
           GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
       }
     }
@@ -275,7 +275,7 @@
   FT_LOCAL_DEF( void )
   gxv_mort_subtable_type2_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -286,23 +286,23 @@
 
     GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE2_HEADER_SIZE );
 
-    valid->statetable.optdata =
+    gxvalid->statetable.optdata =
       &lig_rec;
-    valid->statetable.optdata_load_func =
+    gxvalid->statetable.optdata_load_func =
       gxv_mort_subtable_type2_opttable_load;
-    valid->statetable.subtable_setup_func =
+    gxvalid->statetable.subtable_setup_func =
       gxv_mort_subtable_type2_subtable_setup;
-    valid->statetable.entry_glyphoffset_fmt =
+    gxvalid->statetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_NONE;
-    valid->statetable.entry_validate_func =
+    gxvalid->statetable.entry_validate_func =
       gxv_mort_subtable_type2_entry_validate;
 
-    gxv_StateTable_validate( p, limit, valid );
+    gxv_StateTable_validate( p, limit, gxvalid );
 
-    p += valid->subtable_length;
-    gxv_mort_subtable_type2_ligatureTable_validate( table, valid );
+    p += gxvalid->subtable_length;
+    gxv_mort_subtable_type2_ligatureTable_validate( table, gxvalid );
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmort4.c
+++ b/src/gxvalid/gxvmort4.c
@@ -41,11 +41,11 @@
   static void
   gxv_mort_subtable_type4_lookupval_validate( FT_UShort            glyph,
                                               GXV_LookupValueCPtr  value_p,
-                                              GXV_Validator        valid )
+                                              GXV_Validator        gxvalid )
   {
     FT_UNUSED( glyph );
 
-    gxv_glyphid_validate( value_p->u, valid );
+    gxv_glyphid_validate( value_p->u, gxvalid );
   }
 
   /*
@@ -80,7 +80,7 @@
     FT_UShort            relative_gindex,
     GXV_LookupValueCPtr  base_value_p,
     FT_Bytes             lookuptbl_limit,
-    GXV_Validator        valid )
+    GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -91,7 +91,7 @@
     offset = (FT_UShort)( base_value_p->u +
                           relative_gindex * sizeof ( FT_UShort ) );
 
-    p     = valid->lookuptbl_head + offset;
+    p     = gxvalid->lookuptbl_head + offset;
     limit = lookuptbl_limit;
 
     GXV_LIMIT_CHECK( 2 );
@@ -104,7 +104,7 @@
   FT_LOCAL_DEF( void )
   gxv_mort_subtable_type4_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -112,11 +112,11 @@
     GXV_NAME_ENTER( "mort chain subtable type4 "
                     "(Non-Contextual Glyph Substitution)" );
 
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_mort_subtable_type4_lookupval_validate;
-    valid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_mort_subtable_type4_lookupval_validate;
+    gxvalid->lookupfmt4_trans = gxv_mort_subtable_type4_lookupfmt4_transit;
 
-    gxv_LookupTable_validate( p, limit, valid );
+    gxv_LookupTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmort5.c
+++ b/src/gxvalid/gxvmort5.c
@@ -70,10 +70,10 @@
                                           FT_UShort*     classTable_length_p,
                                           FT_UShort*     stateArray_length_p,
                                           FT_UShort*     entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     GXV_mort_subtable_type5_StateOptRecData  optdata =
-      (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;
 
 
     gxv_StateTable_subtable_setup( table_size,
@@ -83,7 +83,7 @@
                                    classTable_length_p,
                                    stateArray_length_p,
                                    entryTable_length_p,
-                                   valid );
+                                   gxvalid );
 
     optdata->classTable = classTable;
     optdata->stateArray = stateArray;
@@ -100,7 +100,7 @@
                                                FT_UShort      count,
                                                FT_Bytes       table,
                                                FT_Bytes       limit,
-                                               GXV_Validator  valid )
+                                               GXV_Validator  gxvalid )
   {
     /*
      * We don't know the range of insertion-glyph-list.
@@ -109,7 +109,7 @@
     FT_Bytes  p = table + offset;
 
     GXV_mort_subtable_type5_StateOptRecData  optdata =
-      (GXV_mort_subtable_type5_StateOptRecData)valid->statetable.optdata;
+      (GXV_mort_subtable_type5_StateOptRecData)gxvalid->statetable.optdata;
 
     if ( optdata->classTable < offset                                   &&
          offset < optdata->classTable + *(optdata->classTable_length_p) )
@@ -145,7 +145,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_Bool    setMark;
@@ -184,7 +184,7 @@
                                                    currentInsertCount,
                                                    table,
                                                    limit,
-                                                   valid );
+                                                   gxvalid );
     }
 
     if ( 0 != markedInsertList && 0 != markedInsertCount )
@@ -193,7 +193,7 @@
                                                    markedInsertCount,
                                                    table,
                                                    limit,
-                                                   valid );
+                                                   gxvalid );
     }
   }
 
@@ -201,7 +201,7 @@
   FT_LOCAL_DEF( void )
   gxv_mort_subtable_type5_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -213,18 +213,18 @@
 
     GXV_LIMIT_CHECK( GXV_MORT_SUBTABLE_TYPE5_HEADER_SIZE );
 
-    valid->statetable.optdata =
+    gxvalid->statetable.optdata =
       et;
-    valid->statetable.optdata_load_func =
+    gxvalid->statetable.optdata_load_func =
       NULL;
-    valid->statetable.subtable_setup_func =
+    gxvalid->statetable.subtable_setup_func =
       gxv_mort_subtable_type5_subtable_setup;
-    valid->statetable.entry_glyphoffset_fmt =
+    gxvalid->statetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_ULONG;
-    valid->statetable.entry_validate_func =
+    gxvalid->statetable.entry_validate_func =
       gxv_mort_subtable_type5_entry_validate;
 
-    gxv_StateTable_validate( p, limit, valid );
+    gxv_StateTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmorx.c
+++ b/src/gxvalid/gxvmorx.c
@@ -42,7 +42,7 @@
   gxv_morx_subtables_validate( FT_Bytes       table,
                                FT_Bytes       limit,
                                FT_UShort      nSubtables,
-                               GXV_Validator  valid )
+                               GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -93,7 +93,7 @@
 
       /* morx coverage consists of mort_coverage & 16bit padding */
       gxv_mort_coverage_validate( (FT_UShort)( ( coverage >> 16 ) | coverage ),
-                                  valid );
+                                  gxvalid );
       if ( type > 5 )
         FT_INVALID_FORMAT;
 
@@ -101,13 +101,13 @@
       if ( func == NULL )
         GXV_TRACE(( "morx type %d is reserved\n", type ));
 
-      func( p, p + rest, valid );
+      func( p, p + rest, gxvalid );
 
       /* TODO: subFeatureFlags should be unique in a table? */
       p += rest;
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
 
     GXV_EXIT;
   }
@@ -116,7 +116,7 @@
   static void
   gxv_morx_chain_validate( FT_Bytes       table,
                            FT_Bytes       limit,
-                           GXV_Validator  valid )
+                           GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 #ifdef GXV_LOAD_UNUSED_VARS
@@ -140,16 +140,16 @@
     nSubtables    = FT_NEXT_ULONG( p );
 
     /* feature-array of morx is same with that of mort */
-    gxv_mort_featurearray_validate( p, limit, nFeatureFlags, valid );
-    p += valid->subtable_length;
+    gxv_mort_featurearray_validate( p, limit, nFeatureFlags, gxvalid );
+    p += gxvalid->subtable_length;
 
     if ( nSubtables >= 0x10000L )
       FT_INVALID_DATA;
 
     gxv_morx_subtables_validate( p, table + chainLength,
-                                 (FT_UShort)nSubtables, valid );
+                                 (FT_UShort)nSubtables, gxvalid );
 
-    valid->subtable_length = chainLength;
+    gxvalid->subtable_length = chainLength;
 
     /* TODO: defaultFlags should be compared with the flags in tables */
 
@@ -162,8 +162,8 @@
                      FT_Face       face,
                      FT_Validator  ftvalid )
   {
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
     FT_Bytes          p     = table;
     FT_Bytes          limit = 0;
     FT_ULong          version;
@@ -171,8 +171,8 @@
     FT_ULong          i;
 
 
-    valid->root = ftvalid;
-    valid->face = face;
+    gxvalid->root = ftvalid;
+    gxvalid->face = face;
 
     FT_TRACE3(( "validating `morx' table\n" ));
     GXV_INIT;
@@ -188,8 +188,8 @@
     {
       GXV_TRACE(( "validating chain %d/%d\n", i + 1, nChains ));
       GXV_32BIT_ALIGNMENT_VALIDATE( p - table );
-      gxv_morx_chain_validate( p, limit, valid );
-      p += valid->subtable_length;
+      gxv_morx_chain_validate( p, limit, gxvalid );
+      p += gxvalid->subtable_length;
     }
 
     FT_TRACE4(( "\n" ));
--- a/src/gxvalid/gxvmorx.h
+++ b/src/gxvalid/gxvmorx.h
@@ -38,27 +38,27 @@
   FT_LOCAL( void )
   gxv_morx_subtable_type0_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_morx_subtable_type1_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_morx_subtable_type2_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_morx_subtable_type4_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
   FT_LOCAL( void )
   gxv_morx_subtable_type5_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid );
+                                    GXV_Validator  gxvalid );
 
 
 #endif /* __GXVMORX_H__ */
--- a/src/gxvalid/gxvmorx0.c
+++ b/src/gxvalid/gxvmorx0.c
@@ -45,7 +45,7 @@
     GXV_XStateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                         table,
     FT_Bytes                         limit,
-    GXV_Validator                    valid )
+    GXV_Validator                    gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_UShort  markFirst;
@@ -85,7 +85,7 @@
   FT_LOCAL_DEF( void )
   gxv_morx_subtable_type0_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -95,14 +95,14 @@
 
     GXV_LIMIT_CHECK( GXV_STATETABLE_HEADER_SIZE );
 
-    valid->xstatetable.optdata               = NULL;
-    valid->xstatetable.optdata_load_func     = NULL;
-    valid->xstatetable.subtable_setup_func   = NULL;
-    valid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
-    valid->xstatetable.entry_validate_func =
+    gxvalid->xstatetable.optdata               = NULL;
+    gxvalid->xstatetable.optdata_load_func     = NULL;
+    gxvalid->xstatetable.subtable_setup_func   = NULL;
+    gxvalid->xstatetable.entry_glyphoffset_fmt = GXV_GLYPHOFFSET_NONE;
+    gxvalid->xstatetable.entry_validate_func =
       gxv_morx_subtable_type0_entry_validate;
 
-    gxv_XStateTable_validate( p, limit, valid );
+    gxv_XStateTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmorx1.c
+++ b/src/gxvalid/gxvmorx1.c
@@ -55,12 +55,12 @@
   static void
   gxv_morx_subtable_type1_substitutionTable_load( FT_Bytes       table,
                                                   FT_Bytes       limit,
-                                                  GXV_Validator  valid )
+                                                  GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
     GXV_morx_subtable_type1_StateOptRecData  optdata =
-      (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     GXV_LIMIT_CHECK( 2 );
@@ -76,7 +76,7 @@
                                           FT_ULong*      classTable_length_p,
                                           FT_ULong*      stateArray_length_p,
                                           FT_ULong*      entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_ULong  o[4];
     FT_ULong  *l[4];
@@ -83,7 +83,7 @@
     FT_ULong  buff[5];
 
     GXV_morx_subtable_type1_StateOptRecData  optdata =
-      (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     o[0] = classTable;
@@ -95,7 +95,7 @@
     l[2] = entryTable_length_p;
     l[3] = &(optdata->substitutionTable_length);
 
-    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
+    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );
   }
 
 
@@ -106,7 +106,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_TRACE_VARS
     FT_UShort  setMark;
@@ -117,7 +117,7 @@
     FT_Short   currentIndex;
 
     GXV_morx_subtable_type1_StateOptRecData  optdata =
-      (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
 
     FT_UNUSED( state );
     FT_UNUSED( table );
@@ -159,13 +159,13 @@
   static void
   gxv_morx_subtable_type1_LookupValue_validate( FT_UShort            glyph,
                                                 GXV_LookupValueCPtr  value_p,
-                                                GXV_Validator        valid )
+                                                GXV_Validator        gxvalid )
   {
     FT_UNUSED( glyph ); /* for the non-debugging case */
 
     GXV_TRACE(( "morx subtable type1 subst.: %d -> %d\n", glyph, value_p->u ));
 
-    if ( value_p->u > valid->face->num_glyphs )
+    if ( value_p->u > gxvalid->face->num_glyphs )
       FT_INVALID_GLYPH_ID;
   }
 
@@ -175,7 +175,7 @@
     FT_UShort            relative_gindex,
     GXV_LookupValueCPtr  base_value_p,
     FT_Bytes             lookuptbl_limit,
-    GXV_Validator        valid )
+    GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -186,7 +186,7 @@
     offset = (FT_UShort)( base_value_p->u +
                           relative_gindex * sizeof ( FT_UShort ) );
 
-    p     = valid->lookuptbl_head + offset;
+    p     = gxvalid->lookuptbl_head + offset;
     limit = lookuptbl_limit;
 
     GXV_LIMIT_CHECK ( 2 );
@@ -202,19 +202,19 @@
   static void
   gxv_morx_subtable_type1_substitutionTable_validate( FT_Bytes       table,
                                                       FT_Bytes       limit,
-                                                      GXV_Validator  valid )
+                                                      GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  i;
 
     GXV_morx_subtable_type1_StateOptRecData  optdata =
-      (GXV_morx_subtable_type1_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type1_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     /* TODO: calculate offset/length for each lookupTables */
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_morx_subtable_type1_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_morx_subtable_type1_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_morx_subtable_type1_LookupFmt4_transit;
 
     for ( i = 0; i < optdata->substitutionTable_num_lookupTables; i++ )
     {
@@ -224,7 +224,7 @@
       GXV_LIMIT_CHECK( 4 );
       offset = FT_NEXT_ULONG( p );
 
-      gxv_LookupTable_validate( table + offset, limit, valid );
+      gxv_LookupTable_validate( table + offset, limit, gxvalid );
     }
 
     /* TODO: overlapping of lookupTables in substitutionTable */
@@ -239,7 +239,7 @@
   FT_LOCAL_DEF( void )
   gxv_morx_subtable_type1_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -252,23 +252,23 @@
 
     st_rec.substitutionTable_num_lookupTables = 0;
 
-    valid->xstatetable.optdata =
+    gxvalid->xstatetable.optdata =
       &st_rec;
-    valid->xstatetable.optdata_load_func =
+    gxvalid->xstatetable.optdata_load_func =
       gxv_morx_subtable_type1_substitutionTable_load;
-    valid->xstatetable.subtable_setup_func =
+    gxvalid->xstatetable.subtable_setup_func =
       gxv_morx_subtable_type1_subtable_setup;
-    valid->xstatetable.entry_glyphoffset_fmt =
+    gxvalid->xstatetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_ULONG;
-    valid->xstatetable.entry_validate_func =
+    gxvalid->xstatetable.entry_validate_func =
       gxv_morx_subtable_type1_entry_validate;
 
-    gxv_XStateTable_validate( p, limit, valid );
+    gxv_XStateTable_validate( p, limit, gxvalid );
 
     gxv_morx_subtable_type1_substitutionTable_validate(
       table + st_rec.substitutionTable,
       table + st_rec.substitutionTable + st_rec.substitutionTable_length,
-      valid );
+      gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmorx2.c
+++ b/src/gxvalid/gxvmorx2.c
@@ -58,12 +58,12 @@
   static void
   gxv_morx_subtable_type2_opttable_load( FT_Bytes       table,
                                          FT_Bytes       limit,
-                                         GXV_Validator  valid )
+                                         GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
     GXV_morx_subtable_type2_StateOptRecData  optdata =
-      (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     GXV_LIMIT_CHECK( 4 + 4 + 4 );
@@ -88,7 +88,7 @@
                                           FT_ULong*      classTable_length_p,
                                           FT_ULong*      stateArray_length_p,
                                           FT_ULong*      entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_ULong   o[6];
     FT_ULong*  l[6];
@@ -95,7 +95,7 @@
     FT_ULong   buff[7];
 
     GXV_morx_subtable_type2_StateOptRecData  optdata =
-      (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     GXV_NAME_ENTER( "subtable boundaries setup" );
@@ -113,7 +113,7 @@
     l[4] = &(optdata->componentTable_length);
     l[5] = &(optdata->ligatureTable_length);
 
-    gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, valid );
+    gxv_set_length_by_ulong_offset( o, l, buff, 6, table_size, gxvalid );
 
     GXV_TRACE(( "classTable: offset=0x%08x length=0x%08x\n",
                 classTable, *classTable_length_p ));
@@ -142,11 +142,11 @@
   gxv_morx_subtable_type2_ligActionIndex_validate(
     FT_Bytes       table,
     FT_UShort      ligActionIndex,
-    GXV_Validator  valid )
+    GXV_Validator  gxvalid )
   {
     /* access ligActionTable */
     GXV_morx_subtable_type2_StateOptRecData optdata =
-      (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
 
     FT_Bytes lat_base  = table + optdata->ligActionTable;
     FT_Bytes p         = lat_base +
@@ -188,7 +188,7 @@
       /* it is different from the location offset in mort */
       if ( ( offset & 0x3FFF0000UL ) == 0x3FFF0000UL )
       { /* negative offset */
-        gid_limit = valid->face->num_glyphs - ( offset & 0x0000FFFFUL );
+        gid_limit = gxvalid->face->num_glyphs - ( offset & 0x0000FFFFUL );
         if ( gid_limit > 0 )
           return;
 
@@ -200,7 +200,7 @@
       }
       else if ( ( offset & 0x3FFF0000UL ) == 0x00000000UL )
       { /* positive offset */
-        if ( (FT_Long)offset < valid->face->num_glyphs )
+        if ( (FT_Long)offset < gxvalid->face->num_glyphs )
           return;
 
         GXV_TRACE(( "ligature action table includes"
@@ -225,7 +225,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_UShort  setComponent;
@@ -253,16 +253,16 @@
 
     if ( 0 < ligActionIndex )
       gxv_morx_subtable_type2_ligActionIndex_validate(
-        table, ligActionIndex, valid );
+        table, ligActionIndex, gxvalid );
   }
 
 
   static void
   gxv_morx_subtable_type2_ligatureTable_validate( FT_Bytes       table,
-                                                  GXV_Validator  valid )
+                                                  GXV_Validator  gxvalid )
   {
     GXV_morx_subtable_type2_StateOptRecData  optdata =
-      (GXV_morx_subtable_type2_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type2_StateOptRecData)gxvalid->xstatetable.optdata;
 
     FT_Bytes p     = table + optdata->ligatureTable;
     FT_Bytes limit = table + optdata->ligatureTable
@@ -281,7 +281,7 @@
 
         GXV_LIMIT_CHECK( 2 );
         lig_gid = FT_NEXT_USHORT( p );
-        if ( lig_gid < valid->face->num_glyphs )
+        if ( lig_gid < gxvalid->face->num_glyphs )
           GXV_SET_ERR_IF_PARANOID( FT_INVALID_GLYPH_ID );
       }
     }
@@ -293,7 +293,7 @@
   FT_LOCAL_DEF( void )
   gxv_morx_subtable_type2_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -304,23 +304,23 @@
 
     GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE2_HEADER_SIZE );
 
-    valid->xstatetable.optdata =
+    gxvalid->xstatetable.optdata =
       &lig_rec;
-    valid->xstatetable.optdata_load_func =
+    gxvalid->xstatetable.optdata_load_func =
       gxv_morx_subtable_type2_opttable_load;
-    valid->xstatetable.subtable_setup_func =
+    gxvalid->xstatetable.subtable_setup_func =
       gxv_morx_subtable_type2_subtable_setup;
-    valid->xstatetable.entry_glyphoffset_fmt =
+    gxvalid->xstatetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_USHORT;
-    valid->xstatetable.entry_validate_func =
+    gxvalid->xstatetable.entry_validate_func =
       gxv_morx_subtable_type2_entry_validate;
 
-    gxv_XStateTable_validate( p, limit, valid );
+    gxv_XStateTable_validate( p, limit, gxvalid );
 
 #if 0
-    p += valid->subtable_length;
+    p += gxvalid->subtable_length;
 #endif
-    gxv_morx_subtable_type2_ligatureTable_validate( table, valid );
+    gxv_morx_subtable_type2_ligatureTable_validate( table, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmorx4.c
+++ b/src/gxvalid/gxvmorx4.c
@@ -41,12 +41,12 @@
   FT_LOCAL_DEF( void )
   gxv_morx_subtable_type4_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     GXV_NAME_ENTER( "morx chain subtable type4 "
                     "(Non-Contextual Glyph Substitution)" );
 
-    gxv_mort_subtable_type4_validate( table, limit, valid );
+    gxv_mort_subtable_type4_validate( table, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvmorx5.c
+++ b/src/gxvalid/gxvmorx5.c
@@ -64,12 +64,12 @@
   static void
   gxv_morx_subtable_type5_insertionGlyphList_load( FT_Bytes       table,
                                                    FT_Bytes       limit,
-                                                   GXV_Validator  valid )
+                                                   GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
     GXV_morx_subtable_type5_StateOptRecData  optdata =
-      (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     GXV_LIMIT_CHECK( 4 );
@@ -85,7 +85,7 @@
                                           FT_ULong*      classTable_length_p,
                                           FT_ULong*      stateArray_length_p,
                                           FT_ULong*      entryTable_length_p,
-                                          GXV_Validator  valid )
+                                          GXV_Validator  gxvalid )
   {
     FT_ULong   o[4];
     FT_ULong*  l[4];
@@ -92,7 +92,7 @@
     FT_ULong   buff[5];
 
     GXV_morx_subtable_type5_StateOptRecData  optdata =
-      (GXV_morx_subtable_type5_StateOptRecData)valid->xstatetable.optdata;
+      (GXV_morx_subtable_type5_StateOptRecData)gxvalid->xstatetable.optdata;
 
 
     o[0] = classTable;
@@ -104,7 +104,7 @@
     l[2] = entryTable_length_p;
     l[3] = &(optdata->insertionGlyphList_length);
 
-    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, valid );
+    gxv_set_length_by_ulong_offset( o, l, buff, 4, table_size, gxvalid );
   }
 
 
@@ -113,9 +113,9 @@
                                                FT_UShort      count,
                                                FT_Bytes       table,
                                                FT_Bytes       limit,
-                                               GXV_Validator  valid )
+                                               GXV_Validator  gxvalid )
   {
-    FT_Bytes p = table + table_index * 2;
+    FT_Bytes  p = table + table_index * 2;
 
 
 #ifndef GXV_LOAD_TRACE_VARS
@@ -143,7 +143,7 @@
     GXV_StateTable_GlyphOffsetCPtr  glyphOffset_p,
     FT_Bytes                        table,
     FT_Bytes                        limit,
-    GXV_Validator                   valid )
+    GXV_Validator                   gxvalid )
   {
 #ifdef GXV_LOAD_UNUSED_VARS
     FT_Bool    setMark;
@@ -180,13 +180,13 @@
       gxv_morx_subtable_type5_InsertList_validate( currentInsertList,
                                                    currentInsertCount,
                                                    table, limit,
-                                                   valid );
+                                                   gxvalid );
 
     if ( markedInsertList && 0 != markedInsertCount )
       gxv_morx_subtable_type5_InsertList_validate( markedInsertList,
                                                    markedInsertCount,
                                                    table, limit,
-                                                   valid );
+                                                   gxvalid );
   }
 
 
@@ -193,7 +193,7 @@
   FT_LOCAL_DEF( void )
   gxv_morx_subtable_type5_validate( FT_Bytes       table,
                                     FT_Bytes       limit,
-                                    GXV_Validator  valid )
+                                    GXV_Validator  gxvalid )
   {
     FT_Bytes  p = table;
 
@@ -205,18 +205,18 @@
 
     GXV_LIMIT_CHECK( GXV_MORX_SUBTABLE_TYPE5_HEADER_SIZE );
 
-    valid->xstatetable.optdata =
+    gxvalid->xstatetable.optdata =
       et;
-    valid->xstatetable.optdata_load_func =
+    gxvalid->xstatetable.optdata_load_func =
       gxv_morx_subtable_type5_insertionGlyphList_load;
-    valid->xstatetable.subtable_setup_func =
+    gxvalid->xstatetable.subtable_setup_func =
       gxv_morx_subtable_type5_subtable_setup;
-    valid->xstatetable.entry_glyphoffset_fmt =
+    gxvalid->xstatetable.entry_glyphoffset_fmt =
       GXV_GLYPHOFFSET_ULONG;
-    valid->xstatetable.entry_validate_func =
+    gxvalid->xstatetable.entry_validate_func =
       gxv_morx_subtable_type5_entry_validate;
 
-    gxv_XStateTable_validate( p, limit, valid );
+    gxv_XStateTable_validate( p, limit, gxvalid );
 
     GXV_EXIT;
   }
--- a/src/gxvalid/gxvopbd.c
+++ b/src/gxvalid/gxvopbd.c
@@ -68,11 +68,11 @@
   static void
   gxv_opbd_LookupValue_validate( FT_UShort            glyph,
                                  GXV_LookupValueCPtr  value_p,
-                                 GXV_Validator        valid )
+                                 GXV_Validator        gxvalid )
   {
     /* offset in LookupTable is measured from the head of opbd table */
-    FT_Bytes   p     = valid->root->base + value_p->u;
-    FT_Bytes   limit = valid->root->limit;
+    FT_Bytes   p     = gxvalid->root->base + value_p->u;
+    FT_Bytes   limit = gxvalid->root->limit;
     FT_Short   delta_value;
     int        i;
 
@@ -90,7 +90,7 @@
         if ( delta_value == -1 )
           continue;
 
-        gxv_ctlPoint_validate( glyph, delta_value, valid );
+        gxv_ctlPoint_validate( glyph, delta_value, gxvalid );
       }
       else                              /* format 0, value is distance */
         continue;
@@ -134,12 +134,12 @@
   gxv_opbd_LookupFmt4_transit( FT_UShort            relative_gindex,
                                GXV_LookupValueCPtr  base_value_p,
                                FT_Bytes             lookuptbl_limit,
-                               GXV_Validator        valid )
+                               GXV_Validator        gxvalid )
   {
     GXV_LookupValueDesc  value;
 
     FT_UNUSED( lookuptbl_limit );
-    FT_UNUSED( valid );
+    FT_UNUSED( gxvalid );
 
     /* XXX: check range? */
     value.u = (FT_UShort)( base_value_p->u +
@@ -162,8 +162,8 @@
                      FT_Face       face,
                      FT_Validator  ftvalid )
   {
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
     GXV_opbd_DataRec  opbdrec;
     GXV_opbd_Data     opbd  = &opbdrec;
     FT_Bytes          p     = table;
@@ -172,9 +172,9 @@
     FT_ULong  version;
 
 
-    valid->root       = ftvalid;
-    valid->table_data = opbd;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = opbd;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `opbd' table\n" ));
     GXV_INIT;
@@ -196,12 +196,12 @@
     if ( 0x0001 < GXV_OPBD_DATA( format ) )
       FT_INVALID_FORMAT;
 
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_opbd_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_opbd_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_opbd_LookupFmt4_transit;
 
-    gxv_LookupTable_validate( p, limit, valid );
-    p += valid->subtable_length;
+    gxv_LookupTable_validate( p, limit, gxvalid );
+    p += gxvalid->subtable_length;
 
     if ( p > table + GXV_OPBD_DATA( valueOffset_min ) )
     {
--- a/src/gxvalid/gxvprop.c
+++ b/src/gxvalid/gxvprop.c
@@ -75,7 +75,7 @@
 
   static void
   gxv_prop_zero_advance_validate( FT_UShort      gid,
-                                  GXV_Validator  valid )
+                                  GXV_Validator  gxvalid )
   {
     FT_Face       face;
     FT_Error      error;
@@ -84,7 +84,7 @@
 
     GXV_NAME_ENTER( "zero advance" );
 
-    face = valid->face;
+    face = gxvalid->face;
 
     error = FT_Load_Glyph( face,
                            gid,
@@ -109,10 +109,10 @@
   static void
   gxv_prop_property_validate( FT_UShort      property,
                               FT_UShort      glyph,
-                              GXV_Validator  valid )
+                              GXV_Validator  gxvalid )
   {
     if ( glyph != 0 && ( property & GXV_PROP_FLOATER ) )
-      gxv_prop_zero_advance_validate( glyph, valid );
+      gxv_prop_zero_advance_validate( glyph, gxvalid );
 
     if ( property & GXV_PROP_USE_COMPLEMENTARY_BRACKET )
     {
@@ -145,7 +145,7 @@
       else
       {
         /* The gid for complement must be the face. */
-        gxv_glyphid_validate( (FT_UShort)( glyph + complement ), valid );
+        gxv_glyphid_validate( (FT_UShort)( glyph + complement ), gxvalid );
       }
     }
     else
@@ -187,9 +187,9 @@
   static void
   gxv_prop_LookupValue_validate( FT_UShort            glyph,
                                  GXV_LookupValueCPtr  value_p,
-                                 GXV_Validator        valid )
+                                 GXV_Validator        gxvalid )
   {
-    gxv_prop_property_validate( value_p->u, glyph, valid );
+    gxv_prop_property_validate( value_p->u, glyph, gxvalid );
   }
 
 
@@ -224,7 +224,7 @@
   gxv_prop_LookupFmt4_transit( FT_UShort            relative_gindex,
                                GXV_LookupValueCPtr  base_value_p,
                                FT_Bytes             lookuptbl_limit,
-                               GXV_Validator        valid )
+                               GXV_Validator        gxvalid )
   {
     FT_Bytes             p;
     FT_Bytes             limit;
@@ -234,7 +234,7 @@
     /* XXX: check range? */
     offset = (FT_UShort)( base_value_p->u +
                           relative_gindex * sizeof ( FT_UShort ) );
-    p      = valid->lookuptbl_head + offset;
+    p      = gxvalid->lookuptbl_head + offset;
     limit  = lookuptbl_limit;
 
     GXV_LIMIT_CHECK ( 2 );
@@ -259,8 +259,8 @@
   {
     FT_Bytes          p     = table;
     FT_Bytes          limit = 0;
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
 
     GXV_prop_DataRec  proprec;
     GXV_prop_Data     prop = &proprec;
@@ -270,9 +270,9 @@
     FT_UShort         defaultProp;
 
 
-    valid->root       = ftvalid;
-    valid->table_data = prop;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = prop;
+    gxvalid->face       = face;
 
     FT_TRACE3(( "validating `prop' table\n" ));
     GXV_INIT;
@@ -303,7 +303,7 @@
       FT_INVALID_FORMAT;
     }
 
-    gxv_prop_property_validate( defaultProp, 0, valid );
+    gxv_prop_property_validate( defaultProp, 0, gxvalid );
 
     if ( format == 0 )
     {
@@ -315,11 +315,11 @@
     /* format == 1 */
     GXV_PROP_DATA( version ) = version;
 
-    valid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
-    valid->lookupval_func   = gxv_prop_LookupValue_validate;
-    valid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit;
+    gxvalid->lookupval_sign   = GXV_LOOKUPVALUE_UNSIGNED;
+    gxvalid->lookupval_func   = gxv_prop_LookupValue_validate;
+    gxvalid->lookupfmt4_trans = gxv_prop_LookupFmt4_transit;
 
-    gxv_LookupTable_validate( p, limit, valid );
+    gxv_LookupTable_validate( p, limit, gxvalid );
 
   Exit:
     FT_TRACE4(( "\n" ));
--- a/src/gxvalid/gxvtrak.c
+++ b/src/gxvalid/gxvtrak.c
@@ -93,9 +93,9 @@
   gxv_trak_trackTable_validate( FT_Bytes       table,
                                 FT_Bytes       limit,
                                 FT_UShort      nTracks,
-                                GXV_Validator  valid )
+                                GXV_Validator  gxvalid )
   {
-    FT_Bytes   p = table;
+    FT_Bytes  p = table;
 
     FT_Fixed   track, t;
     FT_UShort  nameIndex;
@@ -122,7 +122,7 @@
       if ( offset > GXV_TRAK_DATA( trackValueOffset_max ) )
         GXV_TRAK_DATA( trackValueOffset_max ) = offset;
 
-      gxv_sfntName_validate( nameIndex, 256, 32767, valid );
+      gxv_sfntName_validate( nameIndex, 256, 32767, gxvalid );
 
       for ( j = i; j < nTracks; j ++ )
       {
@@ -134,7 +134,7 @@
       }
     }
 
-    valid->subtable_length = p - table;
+    gxvalid->subtable_length = p - table;
     GXV_EXIT;
   }
 
@@ -142,7 +142,7 @@
   static void
   gxv_trak_trackData_validate( FT_Bytes       table,
                                FT_Bytes       limit,
-                               GXV_Validator  valid )
+                               GXV_Validator  gxvalid )
   {
     FT_Bytes   p = table;
     FT_UShort  nTracks;
@@ -164,24 +164,24 @@
     gxv_odtect_add_range( table, p - table, "trackData header", odtect );
 
     /* validate trackTable */
-    gxv_trak_trackTable_validate( p, limit, nTracks, valid );
-    gxv_odtect_add_range( p, valid->subtable_length,
+    gxv_trak_trackTable_validate( p, limit, nTracks, gxvalid );
+    gxv_odtect_add_range( p, gxvalid->subtable_length,
                           "trackTable", odtect );
 
     /* sizeTable is array of FT_Fixed, don't check contents */
-    p = valid->root->base + sizeTableOffset;
+    p = gxvalid->root->base + sizeTableOffset;
     GXV_LIMIT_CHECK( nSizes * 4 );
     gxv_odtect_add_range( p, nSizes * 4, "sizeTable", odtect );
 
     /* validate trackValueOffet */
-    p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_min );
+    p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_min );
     if ( limit - p < nTracks * nSizes * 2 )
       GXV_TRACE(( "too short trackValue array\n" ));
 
-    p = valid->root->base + GXV_TRAK_DATA( trackValueOffset_max );
+    p = gxvalid->root->base + GXV_TRAK_DATA( trackValueOffset_max );
     GXV_LIMIT_CHECK( nSizes * 2 );
 
-    gxv_odtect_add_range( valid->root->base
+    gxv_odtect_add_range( gxvalid->root->base
                             + GXV_TRAK_DATA( trackValueOffset_min ),
                           GXV_TRAK_DATA( trackValueOffset_max )
                             - GXV_TRAK_DATA( trackValueOffset_min )
@@ -188,7 +188,7 @@
                             + nSizes * 2,
                           "trackValue array", odtect );
 
-    gxv_odtect_validate( odtect, valid );
+    gxv_odtect_validate( odtect, gxvalid );
 
     GXV_EXIT;
   }
@@ -210,8 +210,8 @@
     FT_Bytes          p = table;
     FT_Bytes          limit = 0;
 
-    GXV_ValidatorRec  validrec;
-    GXV_Validator     valid = &validrec;
+    GXV_ValidatorRec  gxvalidrec;
+    GXV_Validator     gxvalid = &gxvalidrec;
     GXV_trak_DataRec  trakrec;
     GXV_trak_Data     trak = &trakrec;
 
@@ -225,11 +225,11 @@
     GXV_ODTECT( 3, odtect );
 
     GXV_ODTECT_INIT( odtect );
-    valid->root       = ftvalid;
-    valid->table_data = trak;
-    valid->face       = face;
+    gxvalid->root       = ftvalid;
+    gxvalid->table_data = trak;
+    gxvalid->face       = face;
 
-    limit      = valid->root->limit;
+    limit      = gxvalid->root->limit;
 
     FT_TRACE3(( "validating `trak' table\n" ));
     GXV_INIT;
@@ -265,19 +265,19 @@
     /* validate trackData */
     if ( 0 < horizOffset )
     {
-      gxv_trak_trackData_validate( table + horizOffset, limit, valid );
-      gxv_odtect_add_range( table + horizOffset, valid->subtable_length,
+      gxv_trak_trackData_validate( table + horizOffset, limit, gxvalid );
+      gxv_odtect_add_range( table + horizOffset, gxvalid->subtable_length,
                             "horizJustData", odtect );
     }
 
     if ( 0 < vertOffset )
     {
-      gxv_trak_trackData_validate( table + vertOffset, limit, valid );
-      gxv_odtect_add_range( table + vertOffset, valid->subtable_length,
+      gxv_trak_trackData_validate( table + vertOffset, limit, gxvalid );
+      gxv_odtect_add_range( table + vertOffset, gxvalid->subtable_length,
                             "vertJustData", odtect );
     }
 
-    gxv_odtect_validate( odtect, valid );
+    gxv_odtect_validate( odtect, gxvalid );
 
     FT_TRACE4(( "\n" ));
   }