ref: a7d2f5e1c0b8e3636a93d9e9e0b1a22457b98faa
parent: 66b3509bdd013698950a80546fbe66782a118e44
author: Werner Lemberg <[email protected]>
date: Mon Feb 18 20:12:23 EST 2002
* 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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2002-02-18 Werner Lemberg <[email protected]>
+
+ * 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 <[email protected]>
Add support for ISOLatin1 PS encoding.
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -71,8 +71,8 @@
#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
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -71,8 +71,8 @@
#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
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -86,8 +86,8 @@
#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
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -54,10 +54,6 @@
#define NULL (void*)0
#endif
-#ifndef UNUSED
-#define UNUSED( arg ) ( (arg)=(arg) )
-#endif
-
/*************************************************************************/
/* */
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -976,11 +976,7 @@
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;
--- 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;
--- 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) );
--- 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];
--- 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 )
{
--- 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 )
--- 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;
--- a/src/pshinter/pshglob.h
+++ b/src/pshinter/pshglob.h
@@ -143,6 +143,7 @@
typedef enum
{
+ PSH_BLUE_ALIGN_NONE = 0,
PSH_BLUE_ALIGN_TOP = 1,
PSH_BLUE_ALIGN_BOT = 2
--- 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 )
--- 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;