Replace `++foo' and `--foo' with `foo++' and `foo--', resp.

This commit is contained in:
Werner Lemberg 2016-12-26 23:57:45 +01:00
parent 4441f7b246
commit f80c4473b6
18 changed files with 68 additions and 68 deletions

View File

@ -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;

View File

@ -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 )

View File

@ -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;

View File

@ -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;

View File

@ -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 )
{

View File

@ -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';

View File

@ -374,7 +374,7 @@
{
while ( state->stack_top > 0 )
{
--state->stack_top;
state->stack_top--;
if ( buffer )
buffer[result] = state->stack[state->stack_top];

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -240,7 +240,7 @@
FT_UInt32 char_code = *pchar_code;
++char_code;
char_code++;
if ( char_code < cmap->first )
char_code = cmap->first;

View File

@ -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;

View File

@ -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++;
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -437,7 +437,7 @@
*cur == '\t' ||
(test_cr && *cur == '\r' ) ||
*cur == '\n' ) )
++cur;
cur++;
if ( cur >= limit )
{
FT_ERROR(( "T1_Get_Private_Dict:"