Minor formatting.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 67549d0..1c23922 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -449,8 +449,8 @@
FT_Add64( &temp, &temp2, &temp );
/* last attempt to ditch long division */
- a = temp.hi == 0 ? temp.lo / c
- : ft_div64by32( temp.hi, temp.lo, c );
+ a = ( temp.hi == 0 ) ? temp.lo / c
+ : ft_div64by32( temp.hi, temp.lo, c );
}
a_ = (FT_Long)a;
@@ -492,8 +492,8 @@
ft_multo64( a, b, &temp );
/* last attempt to ditch long division */
- a = temp.hi == 0 ? temp.lo / c
- : ft_div64by32( temp.hi, temp.lo, c );
+ a = ( temp.hi == 0 ) ? temp.lo / c
+ : ft_div64by32( temp.hi, temp.lo, c );
}
a_ = (FT_Long)a;
diff --git a/src/cff/cf2hints.c b/src/cff/cf2hints.c
index bbbe8e3..c8f7dfe 100644
--- a/src/cff/cf2hints.c
+++ b/src/cff/cf2hints.c
@@ -401,10 +401,10 @@
/* calculate all four possibilities; moves down are negative */
CF2_Fixed downMoveDown = 0 - fracDown;
CF2_Fixed upMoveDown = 0 - fracUp;
- CF2_Fixed downMoveUp = fracDown == 0
+ CF2_Fixed downMoveUp = ( fracDown == 0 )
? 0
: cf2_intToFixed( 1 ) - fracDown;
- CF2_Fixed upMoveUp = fracUp == 0
+ CF2_Fixed upMoveUp = ( fracUp == 0 )
? 0
: cf2_intToFixed( 1 ) - fracUp;
diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c
index 9c059a1..c08aaba 100644
--- a/src/cff/cf2intrp.c
+++ b/src/cff/cf2intrp.c
@@ -347,7 +347,7 @@
vals[0] = *curX;
vals[1] = *curY;
index = 0;
- isHFlex = readFromStack[9] == FALSE;
+ isHFlex = FT_BOOL( readFromStack[9] == FALSE );
top = isHFlex ? 9 : 10;
for ( i = 0; i < top; i++ )
@@ -797,7 +797,7 @@
CF2_UInt index;
CF2_UInt count = cf2_stack_count( opStack );
- FT_Bool isX = op1 == cf2_cmdHLINETO;
+ FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO );
FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
@@ -1716,7 +1716,7 @@
CF2_UInt count, count1 = cf2_stack_count( opStack );
CF2_UInt index = 0;
- FT_Bool alternate = op1 == cf2_cmdHVCURVETO;
+ FT_Bool alternate = FT_BOOL( op1 == cf2_cmdHVCURVETO );
/* if `cf2_stack_count' isn't of the form 8n, 8n+1, */
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index f7ddb3c..c58f6db 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2445,7 +2445,7 @@
case cff_op_and:
{
- FT_Fixed cond = args[0] && args[1];
+ FT_Fixed cond = ( args[0] && args[1] );
FT_TRACE4(( " and\n" ));
@@ -2457,7 +2457,7 @@
case cff_op_or:
{
- FT_Fixed cond = args[0] || args[1];
+ FT_Fixed cond = ( args[0] || args[1] );
FT_TRACE4(( " or\n" ));
@@ -2481,7 +2481,7 @@
case cff_op_eq:
{
- FT_Fixed cond = args[0] == args[1];
+ FT_Fixed cond = ( args[0] == args[1] );
FT_TRACE4(( " eq\n" ));
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index c097523..09ae6f2 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1925,8 +1925,8 @@
CFF_FontRecDict top = &subfont->font_dict;
CFF_Private priv = &subfont->private_dict;
- FT_Bool cff2 = ( code == CFF2_CODE_TOPDICT ||
- code == CFF2_CODE_FONTDICT );
+ FT_Bool cff2 = FT_BOOL( code == CFF2_CODE_TOPDICT ||
+ code == CFF2_CODE_FONTDICT );
FT_UInt stackSize = cff2 ? CFF2_DEFAULT_STACK
: CFF_MAX_STACK_DEPTH;
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index c34d8d0..6b2e82c 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -319,7 +319,7 @@ THE SOFTWARE.
/* parsing normal metrics */
- fields = PCF_BYTE_ORDER( format ) == MSBFirst
+ fields = ( PCF_BYTE_ORDER( format ) == MSBFirst )
? pcf_metric_msb_header
: pcf_metric_header;
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index f208b5f..dc19e8a 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -695,7 +695,7 @@
/* ************ otherwise, it is any token **************/
default:
token->start = cur;
- token->type = ( *cur == '/' ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY );
+ token->type = ( *cur == '/' ) ? T1_TOKEN_TYPE_KEY : T1_TOKEN_TYPE_ANY;
ps_parser_skip_PS_token( parser );
cur = parser->cursor;
if ( !parser->error )
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 9dabb77..e4d8299 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -1572,8 +1572,8 @@
PS_Mask mask = table->hint_masks->masks;
FT_UInt num_masks = table->hint_masks->num_masks;
FT_UInt first = 0;
- FT_Int major_dir = dimension == 0 ? PSH_DIR_VERTICAL
- : PSH_DIR_HORIZONTAL;
+ FT_Int major_dir = ( dimension == 0 ) ? PSH_DIR_VERTICAL
+ : PSH_DIR_HORIZONTAL;
PSH_Dimension dim = &glyph->globals->dimension[dimension];
FT_Fixed scale = dim->scale_mult;
FT_Int threshold;
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index 7b9abe6..429f0d2 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1520,8 +1520,9 @@
state_bez = y1 < y3 ? Ascending_State : Descending_State;
if ( ras.state != state_bez )
{
- Bool o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
- : IS_TOP_OVERSHOOT( y1 );
+ Bool o = ( state_bez == Ascending_State )
+ ? IS_BOTTOM_OVERSHOOT( y1 )
+ : IS_TOP_OVERSHOOT( y1 );
/* finalize current profile if any */
@@ -1656,8 +1657,9 @@
/* detect a change of direction */
if ( ras.state != state_bez )
{
- Bool o = state_bez == Ascending_State ? IS_BOTTOM_OVERSHOOT( y1 )
- : IS_TOP_OVERSHOOT( y1 );
+ Bool o = ( state_bez == Ascending_State )
+ ? IS_BOTTOM_OVERSHOOT( y1 )
+ : IS_TOP_OVERSHOOT( y1 );
/* finalize current profile if any */
@@ -2390,7 +2392,7 @@
pxl = e2;
/* check that the other pixel isn't set */
- e1 = pxl == e1 ? e2 : e1;
+ e1 = ( pxl == e1 ) ? e2 : e1;
e1 = TRUNC( e1 );
@@ -2591,7 +2593,7 @@
pxl = e2;
/* check that the other pixel isn't set */
- e1 = pxl == e1 ? e2 : e1;
+ e1 = ( pxl == e1 ) ? e2 : e1;
e1 = TRUNC( e1 );
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 73343a6..1f15223 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -88,7 +88,7 @@
break;
case FT_SFNT_OS2:
- table = face->os2.version == 0xFFFFU ? NULL : &face->os2;
+ table = ( face->os2.version == 0xFFFFU ) ? NULL : &face->os2;
break;
case FT_SFNT_POST:
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 1371792..5f6aa60 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -114,8 +114,8 @@
#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
FT_Pos height_org, width_org;
#endif
- FT_Int hmul = mode == FT_RENDER_MODE_LCD;
- FT_Int vmul = mode == FT_RENDER_MODE_LCD_V;
+ FT_Int hmul = ( mode == FT_RENDER_MODE_LCD );
+ FT_Int vmul = ( mode == FT_RENDER_MODE_LCD_V );
FT_Raster_Params params;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 7287503..834784c 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5577,9 +5577,9 @@
FT_Int B1, B2;
#endif
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL
- FT_Bool in_twilight = exc->GS.gep0 == 0 || \
- exc->GS.gep1 == 0 || \
- exc->GS.gep2 == 0;
+ FT_Bool in_twilight = FT_BOOL( exc->GS.gep0 == 0 ||
+ exc->GS.gep1 == 0 ||
+ exc->GS.gep2 == 0 );
#endif
@@ -6537,7 +6537,9 @@
* Otherwise, by definition, the value of exc->twilight.orus[n] is (0,0),
* for every n.
*/
- twilight = exc->GS.gep0 == 0 || exc->GS.gep1 == 0 || exc->GS.gep2 == 0;
+ twilight = ( exc->GS.gep0 == 0 ||
+ exc->GS.gep1 == 0 ||
+ exc->GS.gep2 == 0 );
if ( BOUNDS( exc->GS.rp1, exc->zp0.n_points ) )
{
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index 9e23a51..ef36ffe 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -936,7 +936,7 @@
if ( *cur == '/' || *cur == '(' )
{
FT_UInt len;
- FT_Bool have_literal = ( *cur == '(' );
+ FT_Bool have_literal = FT_BOOL( *cur == '(' );
if ( cur + ( have_literal ? 3 : 2 ) >= limit )