freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master f80c447: Replace `++foo' and `--foo' with `foo++' and


From: Werner LEMBERG
Subject: [freetype2] master f80c447: Replace `++foo' and `--foo' with `foo++' and `foo--', resp.
Date: Mon, 26 Dec 2016 22:58:47 +0000 (UTC)

branch: master
commit f80c4473b6a9ccfb50b4cca8da059dc799441dc4
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Replace `++foo' and `--foo' with `foo++' and `foo--', resp.
---
 src/base/ftmac.c              |    2 +-
 src/base/ftobjs.c             |    4 ++--
 src/base/ftrfork.c            |    6 +++---
 src/cff/cf2intrp.c            |    8 ++++----
 src/cff/cf2stack.c            |    8 ++++----
 src/cff/cffobjs.c             |    4 ++--
 src/lzw/ftzopen.c             |    2 +-
 src/otvalid/otvcommn.c        |    2 +-
 src/otvalid/otvmath.c         |   20 ++++++++++----------
 src/psaux/psobjs.c            |   16 ++++++++--------
 src/psaux/t1cmap.c            |    2 +-
 src/psaux/t1decode.c          |    4 ++--
 src/sfnt/ttcmap.c             |   26 +++++++++++++-------------
 src/tools/ftrandom/ftrandom.c |   16 ++++++++--------
 src/truetype/ttgxvar.c        |    2 +-
 src/truetype/ttinterp.c       |    2 +-
 src/type1/t1load.c            |   10 +++++-----
 src/type1/t1parse.c           |    2 +-
 18 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index a7115c4..f0edc94 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -821,7 +821,7 @@
       return FT_THROW( Cannot_Open_Resource );
 
     num_faces_in_res = 0;
-    for ( res_index = 1; ; ++res_index )
+    for ( res_index = 1; ; res_index++ )
     {
       short  num_faces_in_fond;
 
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 64791e6..4f2a9ec 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1114,7 +1114,7 @@
 
     end = first + face->num_charmaps;  /* points after the last one */
 
-    for ( cur = first; cur < end; ++cur )
+    for ( cur = first; cur < end; cur++ )
     {
       if ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE    &&
            cur[0]->encoding_id == TT_APPLE_ID_VARIANT_SELECTOR &&
@@ -1617,7 +1617,7 @@
     /* Find the length of all the POST resources, concatenated.  Assume */
     /* worst case (each resource in its own section).                   */
     pfb_len = 0;
-    for ( i = 0; i < resource_cnt; ++i )
+    for ( i = 0; i < resource_cnt; i++ )
     {
       error = FT_Stream_Seek( stream, (FT_ULong)offsets[i] );
       if ( error )
diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c
index e656cd7..eac2ddb 100644
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -137,7 +137,7 @@
 
     allzeros = 1;
     allmatch = 1;
-    for ( i = 0; i < 16; ++i )
+    for ( i = 0; i < 16; i++ )
     {
       if ( head2[i] != 0 )
         allzeros = 0;
@@ -228,7 +228,7 @@
     if ( cnt > 4079 )
       return FT_THROW( Invalid_Table );
 
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
       if ( FT_READ_LONG( tag_internal ) ||
            FT_READ_SHORT( subcnt )      ||
@@ -260,7 +260,7 @@
         if ( FT_NEW_ARRAY( ref, *count ) )
           return error;
 
-        for ( j = 0; j < *count; ++j )
+        for ( j = 0; j < *count; j++ )
         {
           if ( FT_READ_SHORT( ref[j].res_id ) )
             goto Exit;
diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c
index c08aaba..078f6fe 100644
--- a/src/cff/cf2intrp.c
+++ b/src/cff/cf2intrp.c
@@ -1643,7 +1643,7 @@
             {
               x1 = cf2_stack_getReal( opStack, index ) + curX;
 
-              ++index;
+              index++;
             }
             else
               x1 = curX;
@@ -1688,7 +1688,7 @@
             {
               y1 = cf2_stack_getReal( opStack, index ) + curY;
 
-              ++index;
+              index++;
             }
             else
               y1 = curY;
@@ -1745,7 +1745,7 @@
               {
                 x3 = cf2_stack_getReal( opStack, index + 4 ) + x2;
 
-                ++index;
+                index++;
               }
               else
                 x3 = x2;
@@ -1764,7 +1764,7 @@
               {
                 y3 = cf2_stack_getReal( opStack, index + 4 ) + y2;
 
-                ++index;
+                index++;
               }
               else
                 y3 = y2;
diff --git a/src/cff/cf2stack.c b/src/cff/cf2stack.c
index a2e5b18..12a026d 100644
--- a/src/cff/cf2stack.c
+++ b/src/cff/cf2stack.c
@@ -115,7 +115,7 @@
 
     stack->top->u.i  = val;
     stack->top->type = CF2_NumberInt;
-    ++stack->top;
+    stack->top++;
   }
 
 
@@ -131,7 +131,7 @@
 
     stack->top->u.r  = val;
     stack->top->type = CF2_NumberFixed;
-    ++stack->top;
+    stack->top++;
   }
 
 
@@ -150,7 +150,7 @@
       return 0;   /* type mismatch */
     }
 
-    --stack->top;
+    stack->top--;
 
     return stack->top->u.i;
   }
@@ -167,7 +167,7 @@
       return cf2_intToFixed( 0 );    /* underflow */
     }
 
-    --stack->top;
+    stack->top--;
 
     switch ( stack->top->type )
     {
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 1c0a12d..926effc 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -450,7 +450,7 @@
       FT_Int  idx;
 
 
-      for ( idx = 1; idx <= style_name_length; ++idx )
+      for ( idx = 1; idx <= style_name_length; idx++ )
       {
         if ( family_name[family_name_length - idx] !=
              style_name[style_name_length - idx] )
@@ -469,7 +469,7 @@
                   family_name[idx] == ' ' ||
                   family_name[idx] == '_' ||
                   family_name[idx] == '+' ) )
-          --idx;
+          idx--;
 
         if ( idx > 0 )
           family_name[idx + 1] = '\0';
diff --git a/src/lzw/ftzopen.c b/src/lzw/ftzopen.c
index 9e66ba9..a2cc453 100644
--- a/src/lzw/ftzopen.c
+++ b/src/lzw/ftzopen.c
@@ -374,7 +374,7 @@
       {
         while ( state->stack_top > 0 )
         {
-          --state->stack_top;
+          state->stack_top--;
 
           if ( buffer )
             buffer[result] = state->stack[state->stack_top];
diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c
index 2e88e10..6a68444 100644
--- a/src/otvalid/otvcommn.c
+++ b/src/otvalid/otvcommn.c
@@ -68,7 +68,7 @@
 
         OTV_LIMIT_CHECK( GlyphCount * 2 );        /* GlyphArray */
 
-        for ( i = 0; i < GlyphCount; ++i )
+        for ( i = 0; i < GlyphCount; i++ )
         {
           FT_UInt  gid;
 
diff --git a/src/otvalid/otvmath.c b/src/otvalid/otvmath.c
index 6c785b6..47e2f87 100644
--- a/src/otvalid/otvmath.c
+++ b/src/otvalid/otvmath.c
@@ -60,7 +60,7 @@
     table_size = 2 * ( 56 + 51 );
 
     p += 4 * 2;                 /* First 4 constants have no device tables */
-    for ( i = 0; i < 51; ++i )
+    for ( i = 0; i < 51; i++ )
     {
       p += 2;                                            /* skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
@@ -110,7 +110,7 @@
     OTV_SIZE_CHECK( Coverage );
     otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
@@ -151,7 +151,7 @@
     table_size = 4 + 4 * cnt;
 
     /* Heights */
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
@@ -161,7 +161,7 @@
     }
 
     /* One more Kerning value */
-    for ( i = 0; i < cnt + 1; ++i )
+    for ( i = 0; i < cnt + 1; i++ )
     {
       p += 2;                                            /* Skip the value */
       OTV_OPTIONAL_OFFSET( DeviceTableOffset );
@@ -198,9 +198,9 @@
     OTV_SIZE_CHECK( Coverage );
     otv_Coverage_validate( table + Coverage, otvalid, (FT_Int)cnt );
 
-    for ( i = 0; i < cnt; ++i )
+    for ( i = 0; i < cnt; i++ )
     {
-      for ( j = 0; j < 4; ++j )
+      for ( j = 0; j < 4; j++ )
       {
         OTV_OPTIONAL_OFFSET( MKRecordOffset );
         OTV_SIZE_CHECK( MKRecordOffset );
@@ -296,7 +296,7 @@
     if ( DeviceTableOffset )
       otv_Device_validate( table + DeviceTableOffset, otvalid );
 
-    for ( i = 0; i < pcnt; ++i )
+    for ( i = 0; i < pcnt; i++ )
     {
       FT_UInt  gid;
 
@@ -332,7 +332,7 @@
     OTV_LIMIT_CHECK( 4 * vcnt );
     table_size = 4 + 4 * vcnt;
 
-    for ( i = 0; i < vcnt; ++i )
+    for ( i = 0; i < vcnt; i++ )
     {
       FT_UInt  gid;
 
@@ -384,14 +384,14 @@
     if ( HCoverage )
       otv_Coverage_validate( table + HCoverage, otvalid, (FT_Int)hcnt );
 
-    for ( i = 0; i < vcnt; ++i )
+    for ( i = 0; i < vcnt; i++ )
     {
       OTV_OPTIONAL_OFFSET( Offset );
       OTV_SIZE_CHECK( Offset );
       otv_MathGlyphConstruction_validate( table + Offset, otvalid );
     }
 
-    for ( i = 0; i < hcnt; ++i )
+    for ( i = 0; i < hcnt; i++ )
     {
       OTV_OPTIONAL_OFFSET( Offset );
       OTV_SIZE_CHECK( Offset );
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 262e9bd..6e528d4 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -344,7 +344,7 @@
       FT_Byte  c = *cur;
 
 
-      ++cur;
+      cur++;
 
       if ( c == '\\' )
       {
@@ -370,17 +370,17 @@
         case '\\':
         case '(':
         case ')':
-          ++cur;
+          cur++;
           break;
 
         default:
           /* skip octal escape or ignore backslash */
-          for ( i = 0; i < 3 && cur < limit; ++i )
+          for ( i = 0; i < 3 && cur < limit; i++ )
           {
             if ( !IS_OCTAL_DIGIT( *cur ) )
               break;
 
-            ++cur;
+            cur++;
           }
         }
       }
@@ -455,19 +455,19 @@
 
     FT_ASSERT( **acur == '{' );
 
-    for ( cur = *acur; cur < limit && error == FT_Err_Ok; ++cur )
+    for ( cur = *acur; cur < limit && error == FT_Err_Ok; cur++ )
     {
       switch ( *cur )
       {
       case '{':
-        ++embed;
+        embed++;
         break;
 
       case '}':
-        --embed;
+        embed--;
         if ( embed == 0 )
         {
-          ++cur;
+          cur++;
           goto end;
         }
         break;
diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c
index 7709c13..7b289b7 100644
--- a/src/psaux/t1cmap.c
+++ b/src/psaux/t1cmap.c
@@ -240,7 +240,7 @@
     FT_UInt32  char_code = *pchar_code;
 
 
-    ++char_code;
+    char_code++;
 
     if ( char_code < cmap->first )
       char_code = cmap->first;
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index c80ca3f..1cd9d73 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -1120,7 +1120,7 @@
 
             FT_TRACE4(( "BuildCharArray = [ " ));
 
-            for ( i = 0; i < decoder->len_buildchar; ++i )
+            for ( i = 0; i < decoder->len_buildchar; i++ )
               FT_TRACE4(( "%d ", decoder->buildchar[i] ));
 
             FT_TRACE4(( "]\n" ));
@@ -1323,7 +1323,7 @@
           /* otherwise, we divide numbers in 16.16 format --    */
           /* in both cases, it is the same operation            */
           *top = FT_DivFix( top[0], top[1] );
-          ++top;
+          top++;
 
           large_int = FALSE;
           break;
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index d383b3d..e48c15c 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -3053,7 +3053,7 @@
           if ( numRanges > (FT_ULong)( valid->limit - defp ) / 4 )
             FT_INVALID_TOO_SHORT;
 
-          for ( i = 0; i < numRanges; ++i )
+          for ( i = 0; i < numRanges; i++ )
           {
             FT_ULong  base = TT_NEXT_UINT24( defp );
             FT_ULong  cnt  = FT_NEXT_BYTE( defp );
@@ -3086,7 +3086,7 @@
           if ( numMappings > ( (FT_ULong)( valid->limit - ndp ) ) / 5 )
             FT_INVALID_TOO_SHORT;
 
-          for ( i = 0; i < numMappings; ++i )
+          for ( i = 0; i < numMappings; i++ )
           {
             FT_ULong  uni = TT_NEXT_UINT24( ndp );
             FT_ULong  gid = TT_NEXT_USHORT( ndp );
@@ -3327,7 +3327,7 @@
       return NULL;
 
     result = cmap14->results;
-    for ( i = 0; i < count; ++i )
+    for ( i = 0; i < count; i++ )
     {
       result[i] = (FT_UInt32)TT_NEXT_UINT24( p );
       p        += 8;
@@ -3352,7 +3352,7 @@
     if ( tt_cmap14_ensure( cmap14, ( count + 1 ), memory ) )
       return NULL;
 
-    for ( q = cmap14->results; count > 0; --count )
+    for ( q = cmap14->results; count > 0; count-- )
     {
       FT_UInt32  varSel    = TT_NEXT_UINT24( p );
       FT_ULong   defOff    = TT_NEXT_ULONG( p );
@@ -3411,7 +3411,7 @@
     if ( tt_cmap14_ensure( cmap14, ( cnt + 1 ), memory ) )
       return NULL;
 
-    for ( q = cmap14->results; numRanges > 0; --numRanges )
+    for ( q = cmap14->results; numRanges > 0; numRanges-- )
     {
       FT_UInt32  uni = (FT_UInt32)TT_NEXT_UINT24( p );
 
@@ -3448,7 +3448,7 @@
       return NULL;
 
     ret = cmap14->results;
-    for ( i = 0; i < numMappings; ++i )
+    for ( i = 0; i < numMappings; i++ )
     {
       ret[i] = (FT_UInt32)TT_NEXT_UINT24( p );
       p += 2;
@@ -3532,10 +3532,10 @@
       {
         if ( nuni > duni + dcnt )
         {
-          for ( k = 0; k <= dcnt; ++k )
+          for ( k = 0; k <= dcnt; k++ )
             ret[i++] = duni + k;
 
-          ++di;
+          di++;
 
           if ( di > numRanges )
             break;
@@ -3549,7 +3549,7 @@
             ret[i++] = nuni;
           /* If it is within the default range then ignore it -- */
           /* that should not have happened                       */
-          ++ni;
+          ni++;
           if ( ni > numMappings )
             break;
 
@@ -3568,7 +3568,7 @@
         {
           ret[i++] = (FT_UInt32)TT_NEXT_UINT24( p );
           p += 2;
-          ++ni;
+          ni++;
         }
       }
       else if ( di <= numRanges )
@@ -3576,7 +3576,7 @@
         /* If we get here then we have run out of all non-default     */
         /* mappings.  We have read one default range which we haven't */
         /* stored and there may be others that need to be read.       */
-        for ( k = 0; k <= dcnt; ++k )
+        for ( k = 0; k <= dcnt; k++ )
           ret[i++] = duni + k;
 
         while ( di < numRanges )
@@ -3584,9 +3584,9 @@
           duni = (FT_UInt32)TT_NEXT_UINT24( dp );
           dcnt = FT_NEXT_BYTE( dp );
 
-          for ( k = 0; k <= dcnt; ++k )
+          for ( k = 0; k <= dcnt; k++ )
             ret[i++] = duni + k;
-          ++di;
+          di++;
         }
       }
 
diff --git a/src/tools/ftrandom/ftrandom.c b/src/tools/ftrandom/ftrandom.c
index 6b50a3f..ab5cfc9 100644
--- a/src/tools/ftrandom/ftrandom.c
+++ b/src/tools/ftrandom/ftrandom.c
@@ -177,7 +177,7 @@
 
     FT_Set_Char_Size( face, 0, font_size, 72, 72 );
 
-    for ( gid = 0; gid < face->num_glyphs; ++gid )
+    for ( gid = 0; gid < face->num_glyphs; gid++ )
     {
       if ( check_outlines         &&
            FT_IS_SCALABLE( face ) )
@@ -225,7 +225,7 @@
       num = face->num_faces;
       FT_Done_Face( face );
 
-      for ( i = 0; i < num; ++i )
+      for ( i = 0; i < num; i++ )
       {
         if ( !FT_New_Face( context, testfont, i, &face ) )
           TestFace( face );
@@ -255,7 +255,7 @@
     if ( pt < strrchr( filename, '/' ) )
       return false;
 
-    for ( i = 0; extensions[i] != NULL; ++i )
+    for ( i = 0; extensions[i] != NULL; i++ )
       if ( strcasecmp( pt + 1, extensions[i] ) == 0 ||
            strcasecmp( pt,     extensions[i] ) == 0 )
         return true;
@@ -357,7 +357,7 @@
     max  = 0;
     fcnt = 0;
 
-    for ( i = 0; fontdirs[i] != NULL; ++i )
+    for ( i = 0; fontdirs[i] != NULL; i++ )
     {
       DIR*            examples;
       struct dirent*  ent;
@@ -395,7 +395,7 @@
           fontlist[fcnt].len  = statb.st_size;
 
           figurefiletype( &fontlist[fcnt] );
-          ++fcnt;
+          fcnt++;
         }
       }
 
@@ -464,7 +464,7 @@
     fclose( good );
 
     err_cnt = getErrorCnt( item );
-    for ( i = 0; i < err_cnt; ++i )
+    for ( i = 0; i < err_cnt; i++ )
     {
       fseek( newf, getRandom( 0, (int)( item->len - 1 ) ), SEEK_SET );
 
@@ -609,14 +609,14 @@
     dirs = calloc( (size_t)( argc + 1 ), sizeof ( char ** ) );
     exts = calloc( (size_t)( argc + 1 ), sizeof ( char ** ) );
 
-    for ( i = 1; i < argc; ++i )
+    for ( i = 1; i < argc; i++ )
     {
       char*  pt = argv[i];
       char*  end;
 
 
       if ( pt[0] == '-' && pt[1] == '-' )
-        ++pt;
+        pt++;
 
       if ( strcmp( pt, "-all" ) == 0 )
         allexts = true;
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index a9a1a94..e0ae12f 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1734,7 +1734,7 @@
       nc = blend->num_axis;
     }
 
-    for ( i = 0; i < nc; ++i )
+    for ( i = 0; i < nc; i++ )
       coords[i] = blend->normalizedcoords[i];
     for ( ; i < num_coords; i++ )
       coords[i] = 0;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 657598c..4a506ee 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6587,7 +6587,7 @@
       cur_range = PROJECT( &exc->zp1.cur[exc->GS.rp2], cur_base );
     }
 
-    for ( ; exc->GS.loop > 0; --exc->GS.loop )
+    for ( ; exc->GS.loop > 0; exc->GS.loop-- )
     {
       FT_UInt     point = (FT_UInt)exc->stack[--exc->args];
       FT_F26Dot6  org_dist, cur_dist, new_dist;
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 03b0879..9838ba0 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -237,7 +237,7 @@
     if ( ncv <= axismap->blend_points[0] )
       return INT_TO_FIXED( axismap->design_points[0] );
 
-    for ( j = 1; j < axismap->num_points; ++j )
+    for ( j = 1; j < axismap->num_points; j++ )
     {
       if ( ncv <= axismap->blend_points[j] )
         return INT_TO_FIXED( axismap->design_points[j - 1] ) +
@@ -326,7 +326,7 @@
                                       /* Point to axes after MM_Var struct */
     mmvar->namedstyle      = NULL;
 
-    for ( i = 0; i < mmaster.num_axis; ++i )
+    for ( i = 0; i < mmaster.num_axis; i++ )
     {
       mmvar->axis[i].name    = mmaster.axis[i].name;
       mmvar->axis[i].minimum = INT_TO_FIXED( mmaster.axis[i].minimum);
@@ -354,7 +354,7 @@
                         axiscoords,
                         blend->num_axis );
 
-      for ( i = 0; i < mmaster.num_axis; ++i )
+      for ( i = 0; i < mmaster.num_axis; i++ )
         mmvar->axis[i].def = mm_axis_unmap( &blend->design_map[i],
                                             axiscoords[i] );
     }
@@ -438,7 +438,7 @@
       nc = blend->num_axis;
     }
 
-    for ( i = 0; i < nc; ++i )
+    for ( i = 0; i < nc; i++ )
       coords[i] = axiscoords[i];
     for ( ; i < num_coords; i++ )
       coords[i] = 0x8000;
@@ -539,7 +539,7 @@
      if ( num_coords > T1_MAX_MM_AXIS )
        num_coords = T1_MAX_MM_AXIS;
 
-     for ( i = 0; i < num_coords; ++i )
+     for ( i = 0; i < num_coords; i++ )
        lcoords[i] = FIXED_TO_INT( coords[i] );
 
      return T1_Set_MM_Design( face, num_coords, lcoords );
diff --git a/src/type1/t1parse.c b/src/type1/t1parse.c
index 563d9f3..478c80b 100644
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -437,7 +437,7 @@
                 *cur == '\t'               ||
                 (test_cr && *cur == '\r' ) ||
                 *cur == '\n'               ) )
-        ++cur;
+        cur++;
       if ( cur >= limit )
       {
         FT_ERROR(( "T1_Get_Private_Dict:"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]