From cc0039b53345ea7f6b2b52c8336c16014f64e910 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 19 Feb 2002 01:12:23 +0000 Subject: [PATCH] * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused variables. * src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead of UNUSED. * src/autohint/ahmodule.c (ft_autohinter_reset): Ditto. * src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable swapping code. * src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE. * src/pshinter/pshglob.c (psh_blues_snap_stem): Use it. * src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto. * src/pshinter/pshalgo2.c (psh2_hint_align): Ditto. * include/freetype/internal/ftobjs.h (UNUSED): Removed. --- ChangeLog | 15 +++++++++++++++ builds/unix/ftconfig.in | 4 ++-- builds/vms/ftconfig.h | 4 ++-- include/freetype/config/ftconfig.h | 4 ++-- include/freetype/internal/ftobjs.h | 4 ---- src/autohint/ahglyph.c | 4 ---- src/autohint/ahhint.c | 2 +- src/autohint/ahmodule.c | 2 +- src/cache/ftccache.c | 4 ++-- src/pshinter/pshalgo1.c | 2 +- src/pshinter/pshalgo2.c | 2 +- src/pshinter/pshglob.c | 2 +- src/pshinter/pshglob.h | 1 + src/pshinter/pshrec.c | 2 +- src/truetype/ttgload.c | 2 +- 15 files changed, 31 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8132b998d..403c5ad08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2002-02-18 Werner Lemberg + + * src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused + variables. + * src/autohint/ahhint.c (ah_align_serif_edge): Use FT_UNUSED instead + of UNUSED. + * src/autohint/ahmodule.c (ft_autohinter_reset): Ditto. + * src/pshinter/pshrec.c (ps_mask_table_merge): Fix typo in variable + swapping code. + * src/pshinter/pshglob.h (PSH_Blue_Align): Add PSH_BLUE_ALIGN_NONE. + * src/pshinter/pshglob.c (psh_blues_snap_stem): Use it. + * src/pshinter/pshalgo1.c (psh1_hint_table_optimize): Ditto. + * src/pshinter/pshalgo2.c (psh2_hint_align): Ditto. + * include/freetype/internal/ftobjs.h (UNUSED): Removed. + 2002-02-10 Roberto Alameda Add support for ISOLatin1 PS encoding. diff --git a/builds/unix/ftconfig.in b/builds/unix/ftconfig.in index 4fa7e8bb2..ce20cf64d 100644 --- a/builds/unix/ftconfig.in +++ b/builds/unix/ftconfig.in @@ -71,8 +71,8 @@ FT_BEGIN_HEADER #define FT_ALIGNMENT 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 */ + /* FT_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 FT_UNUSED #define FT_UNUSED( arg ) ( (arg) = (arg) ) #endif diff --git a/builds/vms/ftconfig.h b/builds/vms/ftconfig.h index 8b7525c42..f5e5e64fd 100644 --- a/builds/vms/ftconfig.h +++ b/builds/vms/ftconfig.h @@ -71,8 +71,8 @@ FT_BEGIN_HEADER #define FT_ALIGNMENT 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 */ + /* FT_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 FT_UNUSED #define FT_UNUSED( arg ) ( (arg) = (arg) ) #endif diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h index f990c90be..9d6d8fb39 100644 --- a/include/freetype/config/ftconfig.h +++ b/include/freetype/config/ftconfig.h @@ -86,8 +86,8 @@ FT_BEGIN_HEADER #define FT_ALIGNMENT 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 */ + /* FT_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 FT_UNUSED #define FT_UNUSED( arg ) ( (arg) = (arg) ) #endif diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h index 31b79c0d1..755faf810 100644 --- a/include/freetype/internal/ftobjs.h +++ b/include/freetype/internal/ftobjs.h @@ -54,10 +54,6 @@ FT_BEGIN_HEADER #define NULL (void*)0 #endif -#ifndef UNUSED -#define UNUSED( arg ) ( (arg)=(arg) ) -#endif - /*************************************************************************/ /* */ diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c index 756db6577..49da90142 100644 --- a/src/autohint/ahglyph.c +++ b/src/autohint/ahglyph.c @@ -976,12 +976,8 @@ FT_Pos min = seg1->min_coord; FT_Pos max = seg1->max_coord; FT_Pos len, dist, score; - FT_Pos size1, size2; - size1 = max - min; - size2 = seg2->max_coord - seg2->min_coord; - if ( min < seg2->min_coord ) min = seg2->min_coord; diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c index 1c212a0ff..5c02589cd 100644 --- a/src/autohint/ahhint.c +++ b/src/autohint/ahhint.c @@ -158,7 +158,7 @@ FT_Pos dist; FT_Pos sign = 1; - UNUSED( hinter ); + FT_UNUSED( hinter ); dist = serif->opos - base->opos; diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c index 1b9b1881a..f8d54b9cc 100644 --- a/src/autohint/ahmodule.c +++ b/src/autohint/ahmodule.c @@ -79,7 +79,7 @@ ft_autohinter_reset( FT_AutoHinter module, FT_Face face ) { - UNUSED( module ); + FT_UNUSED( module ); if ( face->autohint.data ) ah_hinter_done_face_globals( (AH_Face_Globals*)(face->autohint.data) ); diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c index 54d06ab4f..bd334aa7d 100644 --- a/src/cache/ftccache.c +++ b/src/cache/ftccache.c @@ -360,8 +360,8 @@ for ( i = 0; i < cache->size; i++ ) { - FTC_Node node, next, *pnode; - FT_UFast hash; + FTC_Node node, next, *pnode; + FT_UFast hash; node = cache->buckets[i]; diff --git a/src/pshinter/pshalgo1.c b/src/pshinter/pshalgo1.c index b8e8e1f4d..a31d8296a 100644 --- a/src/pshinter/pshalgo1.c +++ b/src/pshinter/pshalgo1.c @@ -415,7 +415,7 @@ hint->cur_len = fit_len; /* check blue zones for horizontal stems */ - align.align = 0; + align.align = PSH_BLUE_ALIGN_NONE; align.align_bot = align.align_top = 0; if ( !vertical ) { diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c index af30cdd5c..27ee5c1be 100644 --- a/src/pshinter/pshalgo2.c +++ b/src/pshinter/pshalgo2.c @@ -387,7 +387,7 @@ hint->cur_len = fit_len; /* check blue zones for horizontal stems */ - align.align = 0; + align.align = PSH_BLUE_ALIGN_NONE; align.align_bot = align.align_top = 0; if ( dimension == 1 ) diff --git a/src/pshinter/pshglob.c b/src/pshinter/pshglob.c index db8989061..49fb8431e 100644 --- a/src/pshinter/pshglob.c +++ b/src/pshinter/pshglob.c @@ -493,7 +493,7 @@ FT_Int no_shoots; - alignment->align = 0; + alignment->align = PSH_BLUE_ALIGN_NONE; no_shoots = blues->no_overshoots; diff --git a/src/pshinter/pshglob.h b/src/pshinter/pshglob.h index 1058fb172..157cb2348 100644 --- a/src/pshinter/pshglob.h +++ b/src/pshinter/pshglob.h @@ -143,6 +143,7 @@ FT_BEGIN_HEADER typedef enum { + PSH_BLUE_ALIGN_NONE = 0, PSH_BLUE_ALIGN_TOP = 1, PSH_BLUE_ALIGN_BOT = 2 diff --git a/src/pshinter/pshrec.c b/src/pshinter/pshrec.c index 783950522..c54ed06b4 100644 --- a/src/pshinter/pshrec.c +++ b/src/pshinter/pshrec.c @@ -414,7 +414,7 @@ { temp = index1; index1 = index2; - index2 = index1; + index2 = temp; } if ( index1 < index2 && index1 >= 0 && index2 < (FT_Int)table->num_masks ) diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 8157a6840..7b2a0f6fc 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -1087,7 +1087,7 @@ if ( num_subglyphs > 0 && loader->exec && - ins_pos > 0 && + ins_pos > 0 && subglyph->flags & WE_HAVE_INSTR ) { FT_UShort n_ins;