various clean-ups:

- using FT_UNUSED instead of UNUSED
- using FT_LONG64 and FT_INT64 instead of LONG64 & INT64
- using FT_SIZEOF_INT & FT_SIZEOF_LONG instead of...

- removed the #ifdefs that used SIZEOF_INT, instead we now
  use FT_Int32 and FT_UInt32 when needed to support
  32-bits quantity correctly on 64-bits systems..
This commit is contained in:
David Turner 2000-07-04 18:12:13 +00:00
parent aa8c7da0bf
commit c6a92202c2
29 changed files with 181 additions and 195 deletions

View File

@ -59,10 +59,10 @@
#undef STDC_HEADERS
/* the number of bytes in an `int' type. */
#define SIZEOF_INT 4
#define FT_SIZEOF_INT 4
/* the number of bytes in a `long' type. */
#define SIZEOF_LONG 4
#define FT_SIZEOF_LONG 4
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
@ -99,12 +99,12 @@
typedef signed short FT_Int16;
typedef unsigned short FT_Word16;
#if SIZEOF_INT == 4
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
typedef unsigned int FT_Word32;
#elif SIZEOF_LONG == 4
#elif FT_SIZEOF_LONG == 4
typedef signed long FT_Int32;
typedef unsigned long FT_Word32;
@ -113,11 +113,11 @@
#error "no 32bit type found - please check your configuration files"
#endif
#if SIZEOF_LONG == 8
#if FT_SIZEOF_LONG == 8
/* LONG64 must be defined when a 64-bit type is available */
#define LONG64
#define INT64 long
#define FT_LONG64
#define FT_INT64 long
#else
@ -132,8 +132,8 @@
/* */
#ifdef FTCALC_USE_LONG_LONG
#define LONG64
#define INT64 long long
#define FT_LONG64
#define FT_INT64 long long
#endif /* FTCALC_USE_LONG_LONG */
#endif

View File

@ -63,20 +63,20 @@
/* The number of bytes in an `int' type. */
#if UINT_MAX == 0xFFFFFFFF
#define SIZEOF_INT 4
#define FT_SIZEOF_INT 4
#elif UINT_MAX == 0xFFFF
#define SIZEOF_INT 2
#define FT_SIZEOF_INT 2
#elif UINT_MAX > 0xFFFFFFFF && UINT_MAX == 0xFFFFFFFFFFFFFFFF
#define SIZEOF_INT 8
#define FT_SIZEOF_INT 8
#else
#error "Unsupported number of bytes in `int' type!"
#endif
/* The number of bytes in a `long' type. */
#if ULONG_MAX == 0xFFFFFFFF
#define SIZEOF_LONG 4
#define FT_SIZEOF_LONG 4
#elif ULONG_MAX > 0xFFFFFFFF && ULONG_MAX == 0xFFFFFFFFFFFFFFFF
#define SIZEOF_LONG 8
#define FT_SIZEOF_LONG 8
#else
#error "Unsupported number of bytes in `long' type!"
#endif
@ -97,8 +97,8 @@
/* UNUSED is a macro used to indicate that a given parameter is not used */
/* this is only used to get rid of unpleasant compiler warnings.. */
#ifndef UNUSED
#define UNUSED( arg ) ( (arg)=(arg) )
#ifndef FT_UNUSED
#define FT_UNUSED( arg ) ( (arg)=(arg) )
#endif
@ -123,12 +123,12 @@
typedef signed short FT_Int16;
typedef unsigned short FT_Word16;
#if SIZEOF_INT == 4
#if FT_SIZEOF_INT == 4
typedef signed int FT_Int32;
typedef unsigned int FT_Word32;
#elif SIZEOF_LONG == 4
#elif FT_SIZEOF_LONG == 4
typedef signed long FT_Int32;
typedef unsigned long FT_Word32;
@ -137,11 +137,11 @@
#error "no 32bit type found - please check your configuration files"
#endif
#if SIZEOF_LONG == 8
#if FT_SIZEOF_LONG == 8
/* LONG64 must be defined when a 64-bit type is available */
#define LONG64
#define INT64 long
/* FT_LONG64 must be defined when a 64-bit type is available */
#define FT_LONG64
#define FT_INT64 long
#else
@ -156,8 +156,8 @@
/* */
#ifdef FTCALC_USE_LONG_LONG
#define LONG64
#define INT64 long long
#define FT_LONG64
#define FT_INT64 long long
#endif /* FTCALC_USE_LONG_LONG */
#endif

View File

@ -47,7 +47,8 @@ typedef enum FT_Frame_Op_
ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 )
ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
} FT_Frame_Op;
@ -96,6 +97,8 @@ typedef struct FT_Frame_Field_
count, \
(FT_UShort)(char*)&FT_FIELD_REF(struct_type,field) }
#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 }
/*************************************************************************/

View File

@ -111,7 +111,7 @@
#endif /* FT_CONFIG_OPTION_OLD_CALCS */
#ifdef LONG64
#ifdef FT_LONG64
/*************************************************************************/
/* */
@ -252,7 +252,7 @@
while ( z )
{
z = (unsigned INT64)z >> 1;
z = (unsigned FT_INT64)z >> 1;
j++;
}
return j - 1;
@ -298,7 +298,7 @@
#endif /* FT_CONFIG_OPTION_OLD_CALCS */
#else /* LONG64 */
#else /* FT_LONG64 */
/*************************************************************************/
@ -767,7 +767,7 @@
#endif /* FT_CONFIG_OPTION_OLD_CALCS */
#endif /* LONG64 */
#endif /* FT_LONG64 */
/* END */

View File

@ -1084,7 +1084,7 @@
FT_Pos distance;
int c, n, first, orientation;
UNUSED( advance );
FT_UNUSED( advance );
/* compute control distance */

View File

@ -540,20 +540,28 @@
continue; /* loop! */
case ft_frame_bytes: /* read a byte sequence */
case ft_frame_skip: /* skip some bytes */
{
FT_Int len = stream->limit - stream->cursor;
if ( len > fields->size )
len = fields->size;
p = (FT_Byte*)structure + fields->offset;
MEM_Copy( p, stream->cursor, len );
stream->cursor += len;
FT_Int len = fields->size;
if (stream->cursor + len > stream->limit)
{
error = FT_Err_Invalid_Stream_Operation;
goto Exit;
}
if (fields->value == ft_frame_bytes)
{
p = (FT_Byte*)structure + fields->offset;
MEM_Copy( p, stream->cursor, len );
}
stream->cursor += len;
fields++;
continue;
}
case ft_frame_byte:
case ft_frame_schar: /* read a single byte */
value = GET_Byte();
@ -644,7 +652,7 @@
/* now, compute the signed value is necessary */
if ( fields->value & FT_FRAME_OP_SIGNED )
value = (FT_ULong)( (FT_Long)( value << sign_shift ) >> sign_shift );
value = (FT_ULong)( (FT_Int32)( value << sign_shift ) >> sign_shift );
/* finally, store the value in the object */
@ -659,23 +667,11 @@
*(FT_UShort*)p = (FT_UShort)value;
break;
/* SIZEOF_INT is defined in <freetype/config/ftconfig.h> */
/* and gives the size in bytes of the `int' type on the */
/* current platform. */
/* */
/* Only on 16-bit systems the value of SIZEOF_INT can be */
/* less than 4. In this case SIZEOF_LONG is always 4. */
/* */
/* On a 64-bit system, SIZEOF_LONG can be 8, which is */
/* handled by the default case. */
/* */
#if SIZEOF_INT == 4
case 4:
*(FT_UInt*)p = (FT_UInt)value;
*(FT_UInt32*)p = (FT_UInt32)value;
break;
#endif
default:
default: /* for 64-bits systems */
*(FT_ULong*)p = (FT_ULong)value;
}

View File

@ -70,7 +70,7 @@
void* ft_alloc( FT_Memory memory,
long size )
{
UNUSED( memory );
FT_UNUSED( memory );
return malloc( size );
}
@ -102,8 +102,8 @@
long new_size,
void* block )
{
UNUSED( memory );
UNUSED( cur_size );
FT_UNUSED( memory );
FT_UNUSED( cur_size );
return realloc( block, new_size );
}
@ -126,7 +126,7 @@
void ft_free( FT_Memory memory,
void* block )
{
UNUSED( memory );
FT_UNUSED( memory );
free( block );
}

View File

@ -627,10 +627,10 @@
{
if ( ip + 3 >= limit )
goto Syntax_Error;
val = ( (FT_Long)ip[0] << 24 ) |
( (FT_Long)ip[1] << 16 ) |
( (FT_Long)ip[2] << 8 ) |
ip[3];
val = ( (FT_Int32)ip[0] << 24 ) |
( (FT_Int32)ip[1] << 16 ) |
( (FT_Int32)ip[2] << 8 ) |
ip[3];
ip += 4;
shift = 0;
}

View File

@ -203,7 +203,7 @@
#else
UNUSED( driver );
FT_UNUSED( driver );
return T2_Err_Ok;
@ -233,7 +233,7 @@
#else
UNUSED( driver );
FT_UNUSED( driver );
#endif
}

View File

@ -519,16 +519,6 @@
case t2_kind_fixed:
val = t2_parse_fixed( parser->stack );
/* SIZEOF_INT is defined in <freetype/config/ftconfig.h> */
/* and gives the size in bytes of the `int' type on the */
/* current platform. */
/* */
/* Only on 16-bit systems the value of SIZEOF_INT can be */
/* less than 4. In this case SIZEOF_LONG is always 4. */
/* */
/* On a 64-bit system, SIZEOF_LONG can be 8, which is */
/* handled by the default case. */
/* */
Store_Number:
switch ( field->size )
{
@ -540,13 +530,11 @@
*(FT_Short*)q = (FT_Short)val;
break;
#if SIZEOF_INT == 4
case 4:
*(FT_Int*)q = (FT_Int)val;
*(FT_Int32*)q = (FT_Int)val;
break;
#endif
default:
default: /* for 64-bit systems where long is 8 bytes */
*(FT_Long*)q = val;
}
break;
@ -578,12 +566,12 @@
case 2:
*(FT_Short*)q = (FT_Short)val;
break;
#if SIZEOF_INT == 4
case 4:
*(FT_Int*)q = (FT_Int)val;
*(FT_Int32*)q = (FT_Int)val;
break;
#endif
default:
default: /* for 64-bit systems */
*(FT_Long*)q = val;
}

View File

@ -466,7 +466,7 @@
void t1_init_loader( CID_Loader* loader,
CID_Face face )
{
UNUSED( face );
FT_UNUSED( face );
MEM_Set( loader, 0, sizeof ( *loader ) );
}

View File

@ -121,10 +121,10 @@
FT_Error error;
PSNames_Interface* psnames;
UNUSED( num_params );
UNUSED( params );
UNUSED( face_index );
UNUSED( stream );
FT_UNUSED( num_params );
FT_UNUSED( params );
FT_UNUSED( face_index );
FT_UNUSED( stream );
face->root.num_faces = 1;
@ -341,7 +341,7 @@
LOCAL_FUNC
FT_Error CID_Init_Driver( CID_Driver driver )
{
UNUSED( driver );
FT_UNUSED( driver );
return T1_Err_Ok;
}
@ -361,7 +361,7 @@
LOCAL_DEF
void CID_Done_Driver( CID_Driver driver )
{
UNUSED( driver );
FT_UNUSED( driver );
}

View File

@ -761,13 +761,11 @@
*(FT_UShort*)q = (FT_UShort)val;
break;
#if SIZEOF_INT == 4
case 4:
*(FT_Int*)q = (FT_Int)val;
*(FT_Int32*)q = (FT_Int)val;
break;
#endif
default:
default: /* for 64-bit systems */
*(FT_Long*)q = val;
}
break;

View File

@ -40,8 +40,8 @@
FT_Module_Interface CID_Get_Interface( FT_Driver driver,
const FT_String* interface )
{
UNUSED( driver );
UNUSED( interface );
FT_UNUSED( driver );
FT_UNUSED( interface );
return 0;
}

View File

@ -146,7 +146,7 @@
/* Its purpose is simply to reduce compiler warnings. Note also that */
/* simply defining it as `(void)x' doesn't avoid warnings with certain */
/* ANSI compilers (e.g. LCC). */
#define UNUSED( x ) (x) = (x)
#define FT_UNUSED( x ) (x) = (x)
/* Disable the tracing mechanism for simplicity -- developers can */
/* activate it easily by redefining these two macros. */
@ -311,7 +311,7 @@
#define RAS_VARS /* void */
#define RAS_VAR /* void */
#define UNUSED_RASTER do ; while ( 0 )
#define FT_UNUSED_RASTER do ; while ( 0 )
#else /* TT_STATIC_RASTER */
@ -323,7 +323,7 @@
#define RAS_VARS raster,
#define RAS_VAR raster
#define UNUSED_RASTER UNUSED( raster )
#define FT_UNUSED_RASTER FT_UNUSED( raster )
#endif /* TT_STATIC_RASTER */
@ -2028,7 +2028,7 @@
{
Long pitch = ras.target.pitch;
UNUSED( max );
FT_UNUSED( max );
ras.traceIncr = (Short)-pitch;
@ -2053,9 +2053,9 @@
Byte f1, f2;
Byte* target;
UNUSED( y );
UNUSED( left );
UNUSED( right );
FT_UNUSED( y );
FT_UNUSED( left );
FT_UNUSED( right );
/* Drop-out control */
@ -2239,9 +2239,9 @@
Short* max )
{
/* nothing, really */
UNUSED( raster );
UNUSED( min );
UNUSED( max );
FT_UNUSED( raster );
FT_UNUSED( min );
FT_UNUSED( max );
}
@ -2256,8 +2256,8 @@
PByte bits;
Byte f1;
UNUSED( left );
UNUSED( right );
FT_UNUSED( left );
FT_UNUSED( right );
if ( x2 - x1 < ras.precision )
@ -2388,7 +2388,7 @@
void Horizontal_Sweep_Step( RAS_ARG )
{
/* Nothing, really */
UNUSED( raster );
FT_UNUSED( raster );
}
@ -2535,12 +2535,12 @@
PProfile right )
{
/* nothing, really */
UNUSED( raster );
UNUSED( y );
UNUSED( x1 );
UNUSED( x2 );
UNUSED( left );
UNUSED( right );
FT_UNUSED( raster );
FT_UNUSED( y );
FT_UNUSED( x1 );
FT_UNUSED( x2 );
FT_UNUSED( left );
FT_UNUSED( right );
}
@ -3097,7 +3097,7 @@
LOCAL_FUNC
FT_Error Render_Gray_Glyph( RAS_ARG )
{
UNUSED_RASTER;
FT_UNUSED_RASTER;
return FT_Err_Cannot_Render_Glyph;
}
@ -3235,9 +3235,9 @@
#else
UNUSED( raster );
UNUSED( mode );
UNUSED( palette );
FT_UNUSED( raster );
FT_UNUSED( mode );
FT_UNUSED( palette );
#endif
}

View File

@ -77,7 +77,7 @@
FT_Module_Interface SFNT_Get_Interface( FT_Module module,
const char* interface )
{
UNUSED( module );
FT_UNUSED( module );
if ( strcmp( interface, "get_sfnt" ) == 0 )
return (FT_Module_Interface)get_sfnt_table;

View File

@ -186,8 +186,8 @@
SFNT_Header sfnt_header;
/* for now, parameters are unused */
UNUSED( num_params );
UNUSED( params );
FT_UNUSED( num_params );
FT_UNUSED( params );
sfnt = (SFNT_Interface*)face->sfnt;
if ( !sfnt )
@ -246,9 +246,9 @@
FT_Error error;
SFNT_Interface* sfnt = (SFNT_Interface*)face->sfnt;
UNUSED( face_index );
UNUSED( num_params );
UNUSED( params );
FT_UNUSED( face_index );
FT_UNUSED( num_params );
FT_UNUSED( params );
/* Load tables */

View File

@ -108,7 +108,7 @@
/* Its purpose is simply to reduce compiler warnings. Note also that */
/* simply defining it as `(void)x' doesn't avoid warnings with certain */
/* ANSI compilers (e.g. LCC). */
#define UNUSED( x ) (x) = (x)
#define FT_UNUSED( x ) (x) = (x)
/* Disable the tracing mechanism for simplicity -- developers can */
/* activate it easily by redefining these two macros. */
@ -125,7 +125,7 @@
#include "ftgrays.h"
#include <freetype/internal/ftobjs.h> /* for UNUSED() */
#include <freetype/internal/ftobjs.h> /* for FT_UNUSED() */
#include <freetype/internal/ftdebug.h> /* for FT_TRACE() and FT_ERROR() */
#include <freetype/ftoutln.h> /* for FT_Outline_Decompose() */
@ -1356,7 +1356,7 @@
TScan x, y, cover, area;
PCell start, cur, limit;
UNUSED( target );
FT_UNUSED( target );
cur = ras.cells;
@ -1879,7 +1879,7 @@
{
static TRaster the_raster;
UNUSED( memory );
FT_UNUSED( memory );
*araster = (FT_Raster)&the_raster;
@ -1893,7 +1893,7 @@
void grays_raster_done( FT_Raster raster )
{
/* nothing */
UNUSED( raster );
FT_UNUSED( raster );
}
#else /* _STANDALONE_ */

View File

@ -245,8 +245,8 @@
FT_UInt pixel_width,
FT_UInt pixel_height )
{
UNUSED( pixel_width );
UNUSED( pixel_height );
FT_UNUSED( pixel_width );
FT_UNUSED( pixel_height );
/* many things have been pre-computed by the base layer */

View File

@ -813,7 +813,7 @@
{
TT_GlyphSlot glyph = (TT_GlyphSlot)loader->glyph;
FT_UInt start_point, start_contour;
FT_ULong ins_pos; /* position of composite instructions, if any */
/* for each subglyph, read composite header */
start_point = gloader->base.outline.n_points;
@ -823,6 +823,7 @@
if ( error )
goto Fail;
ins_pos = loader->ins_pos;
face->forget_glyph_frame( loader );
opened_frame = 0;
@ -973,7 +974,7 @@
if ( num_subglyphs > 0 &&
loader->exec &&
loader->ins_pos > 0 &&
ins_pos > 0 &&
subglyph->flags & WE_HAVE_INSTR )
{
FT_UShort n_ins;
@ -984,8 +985,8 @@
/* read size of instructions */
if ( FILE_Seek( loader->ins_pos ) ||
READ_UShort( n_ins ) )
if ( FILE_Seek( ins_pos ) ||
READ_UShort( n_ins ) )
goto Fail;
FT_TRACE5(( " Instructions size = %d\n", n_ins ));

View File

@ -31,7 +31,7 @@
#define TT_MULFIX FT_MulFix
#define TT_MULDIV FT_MulDiv
#define TT_INT64 FT_Int64
#define TT_FT_INT64 FT_Int64
/*************************************************************************/
@ -122,7 +122,7 @@
/* This macro is used whenever `exec' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define UNUSED_EXEC UNUSED( CUR )
#define FT_UNUSED_EXEC FT_UNUSED( CUR )
/*************************************************************************/
@ -130,7 +130,7 @@
/* This macro is used whenever `args' is unused in a function, to avoid */
/* stupid warnings from pedantic compilers. */
/* */
#define UNUSED_ARG UNUSED_EXEC; UNUSED( args )
#define FT_UNUSED_ARG FT_UNUSED_EXEC; FT_UNUSED( args )
/*************************************************************************/
@ -731,7 +731,7 @@
exec->callTop = 0;
#if 1
UNUSED( debug );
FT_UNUSED( debug );
return exec->face->interpreter( exec );
#else
@ -839,7 +839,7 @@
FT_Error TT_Done_Context( TT_ExecContext exec )
{
/* Nothing at all for now */
UNUSED( exec );
FT_UNUSED( exec );
return TT_Err_Ok;
}
@ -850,7 +850,7 @@
static FT_F26Dot6 Norm( FT_F26Dot6 X,
FT_F26Dot6 Y )
{
TT_INT64 T1, T2;
TT_FT_INT64 T1, T2;
MUL_64( X, X, T1 );
@ -1479,7 +1479,7 @@
FT_UShort point,
FT_F26Dot6 distance )
{
UNUSED_EXEC;
FT_UNUSED_EXEC;
zone->cur[point].x += distance;
zone->tags[point] |= FT_Curve_Tag_Touch_X;
@ -1491,7 +1491,7 @@
FT_UShort point,
FT_F26Dot6 distance )
{
UNUSED_EXEC;
FT_UNUSED_EXEC;
zone->cur[point].y += distance;
zone->tags[point] |= FT_Curve_Tag_Touch_Y;
@ -1526,7 +1526,7 @@
{
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
@ -1566,7 +1566,7 @@
{
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
@ -1610,7 +1610,7 @@
{
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
@ -1652,7 +1652,7 @@
{
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
@ -1697,7 +1697,7 @@
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
{
@ -1740,7 +1740,7 @@
{
FT_F26Dot6 val;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( distance >= 0 )
@ -2073,7 +2073,7 @@
FT_F26Dot6 Project_x( EXEC_OP_ FT_Vector* v1,
FT_Vector* v2 )
{
UNUSED_EXEC;
FT_UNUSED_EXEC;
return ( v1->x - v2->x );
}
@ -2099,7 +2099,7 @@
FT_F26Dot6 Project_y( EXEC_OP_ FT_Vector* v1,
FT_Vector* v2 )
{
UNUSED_EXEC;
FT_UNUSED_EXEC;
return ( v1->y - v2->y );
}
@ -2214,7 +2214,7 @@
FT_F26Dot6 W;
FT_Bool S1, S2;
UNUSED_EXEC;
FT_UNUSED_EXEC;
if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
@ -3986,7 +3986,7 @@
{
FT_Long A, B, C;
UNUSED_EXEC;
FT_UNUSED_EXEC;
A = args[2];
@ -4089,7 +4089,7 @@
{
FT_Int nIfs;
UNUSED_ARG;
FT_UNUSED_ARG;
nIfs = 1;
@ -4198,7 +4198,7 @@
{
TT_CallRec* pRec;
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.callTop <= 0 ) /* We encountered an ENDF without a call */
@ -5010,7 +5010,7 @@
{
FT_UShort point;
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop )
@ -5192,7 +5192,7 @@
dy;
FT_UShort point;
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop )
@ -5757,7 +5757,7 @@
FT_UShort point;
FT_F26Dot6 distance;
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop ||
@ -5926,7 +5926,7 @@
distance;
FT_UShort point;
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.top < CUR.GS.loop )
@ -6165,7 +6165,7 @@
FT_UInt point; /* current point */
FT_Short contour; /* current contour */
UNUSED_ARG;
FT_UNUSED_ARG;
if ( CUR.opcode & 1 )
@ -6433,7 +6433,7 @@
TT_DefRecord* def = CUR.IDefs;
TT_DefRecord* limit = def + CUR.numIDefs;
UNUSED_ARG;
FT_UNUSED_ARG;
for ( ; def < limit; def++ )

View File

@ -128,10 +128,10 @@
FT_UInt horz_resolution,
FT_UInt vert_resolution )
{
UNUSED( char_width );
UNUSED( char_height );
UNUSED( horz_resolution );
UNUSED( vert_resolution );
FT_UNUSED( char_width );
FT_UNUSED( char_height );
FT_UNUSED( horz_resolution );
FT_UNUSED( vert_resolution );
size->valid = FALSE;
@ -164,8 +164,8 @@
FT_Int pixel_width,
FT_Int pixel_height )
{
UNUSED( pixel_width );
UNUSED( pixel_height );
FT_UNUSED( pixel_width );
FT_UNUSED( pixel_height );
size->valid = FALSE;

View File

@ -408,9 +408,9 @@
FT_Vector* flex = decoder->flex_vectors;
FT_Int n;
UNUSED( threshold );
UNUSED( end_x );
UNUSED( end_y );
FT_UNUSED( threshold );
FT_UNUSED( end_x );
FT_UNUSED( end_y );
/* we don't even try to test the threshold in the non-hinting */
@ -1080,9 +1080,9 @@
FT_Pos wx,
FT_Pos wy )
{
UNUSED( sbx );
UNUSED( sby );
UNUSED( wy );
FT_UNUSED( sbx );
FT_UNUSED( sby );
FT_UNUSED( wy );
if ( wx > decoder->builder.advance.x )
decoder->builder.advance.x = wx;

View File

@ -592,7 +592,7 @@
static
FT_Error Do_Def_Ignore( T1_Parser* parser )
{
UNUSED( parser );
FT_UNUSED( parser );
return T1_Err_Ok;
}

View File

@ -103,7 +103,7 @@
return error;
#else
UNUSED( error );
FT_UNUSED( error );
return T1_Err_Ok;
@ -262,10 +262,10 @@
FT_Error error;
PSNames_Interface* psnames;
UNUSED( num_params );
UNUSED( params );
UNUSED( face_index );
UNUSED( face );
FT_UNUSED( num_params );
FT_UNUSED( params );
FT_UNUSED( face_index );
FT_UNUSED( face );
face->root.num_faces = 1;
@ -486,7 +486,7 @@
#else
UNUSED( glyph );
FT_UNUSED( glyph );
#endif
}
@ -515,7 +515,7 @@
#else
UNUSED( glyph );
FT_UNUSED( glyph );
#endif

View File

@ -58,8 +58,8 @@
FT_Module_Interface Get_Interface( FT_Driver driver,
const FT_String* interface )
{
UNUSED(driver);
UNUSED(interface);
FT_UNUSED(driver);
FT_UNUSED(interface);
#ifndef Z1_CONFIG_OPTION_NO_MM_SUPPORT
if ( strcmp( (const char*)interface, "get_mm" ) == 0 )

View File

@ -573,7 +573,7 @@
{
Z1_Parser* parser = &loader->parser;
UNUSED(face);
FT_UNUSED(face);
parser->cursor = parser->limit;
parser->error = 0;
@ -1334,7 +1334,7 @@
static
void t1_init_loader( Z1_Loader* loader, T1_Face face )
{
UNUSED(face);
FT_UNUSED(face);
MEM_Set( loader, 0, sizeof(*loader) );
loader->num_glyphs = 0;

View File

@ -132,10 +132,10 @@
FT_Error error;
PSNames_Interface* psnames;
UNUSED(num_params);
UNUSED(params);
UNUSED(face_index);
UNUSED(stream);
FT_UNUSED(num_params);
FT_UNUSED(params);
FT_UNUSED(face_index);
FT_UNUSED(stream);
face->root.num_faces = 1;
@ -333,7 +333,7 @@
LOCAL_FUNC
FT_Error Z1_Init_Driver( Z1_Driver driver )
{
UNUSED(driver);
FT_UNUSED(driver);
return T1_Err_Ok;
}
@ -354,7 +354,7 @@
LOCAL_DEF
void Z1_Done_Driver( Z1_Driver driver )
{
UNUSED(driver);
FT_UNUSED(driver);
}

View File

@ -771,12 +771,12 @@
case 2:
*(FT_UShort*)q = (FT_UShort)val;
break;
#if SIZEOF_INT == 4
case 4:
*(FT_Int*)q = (FT_Int)val;
*(FT_UInt32*)q = (FT_UInt32)val;
break;
#endif
default:
default: /* for 64-bit systems */
*(FT_Long*)q = val;
}
}