summaryrefslogtreecommitdiff
path: root/src/psaux
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2018-08-14 15:48:17 +0200
committerWerner Lemberg <wl@gnu.org>2018-08-14 15:56:28 +0200
commit1d7b034cd87a423ed002803df5aed46ca7e8f362 (patch)
tree51c1817d313a5dcb1d93ef2b261a5109aaaeaf80 /src/psaux
parente001a17d734e5af20919c81dfa335bb8991359c6 (diff)
downloadfreetype2-1d7b034cd87a423ed002803df5aed46ca7e8f362.tar.gz
Use formatting string in FT_TRACEX calls for non-simple arguments.
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_hstem, cff_op_hintmask, cff_op_hlineto, cff_op_vhcurveto>: Do it. * src/psaux/pshints.c (cf2_hintmap_build): Ditto. * src/psaux/psintrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM, cf2_cmdVSTEM, cf2_cmdHLINETO, cf2_cmdRRCURVETO, cf2_cmdCALLSUBR, cf2_escHSTEM3, cf2_cmdHINTMASK, cf2_cmdHVCURVETO>: Ditto. * src/truetype/ttinterp.c (TT_RunIns): Ditto.
Diffstat (limited to 'src/psaux')
-rw-r--r--src/psaux/cffdecode.c19
-rw-r--r--src/psaux/pshints.c8
-rw-r--r--src/psaux/psintrp.c24
3 files changed, 27 insertions, 24 deletions
diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c
index 2c2aa6a84..af32f69c4 100644
--- a/src/psaux/cffdecode.c
+++ b/src/psaux/cffdecode.c
@@ -964,10 +964,10 @@
case cff_op_hstemhm:
case cff_op_vstemhm:
/* the number of arguments is always even here */
- FT_TRACE4((
- op == cff_op_hstem ? " hstem\n" :
- ( op == cff_op_vstem ? " vstem\n" :
- ( op == cff_op_hstemhm ? " hstemhm\n" : " vstemhm\n" ) ) ));
+ FT_TRACE4(( "%s\n",
+ op == cff_op_hstem ? " hstem" :
+ ( op == cff_op_vstem ? " vstem" :
+ ( op == cff_op_hstemhm ? " hstemhm" : " vstemhm" ) ) ));
if ( hinter )
hinter->stems( hinter->hints,
@@ -981,7 +981,8 @@
case cff_op_hintmask:
case cff_op_cntrmask:
- FT_TRACE4(( op == cff_op_hintmask ? " hintmask" : " cntrmask" ));
+ FT_TRACE4(( "%s", op == cff_op_hintmask ? " hintmask"
+ : " cntrmask" ));
/* implement vstem when needed -- */
/* the specification doesn't say it, but this also works */
@@ -1094,8 +1095,8 @@
FT_Int phase = ( op == cff_op_hlineto );
- FT_TRACE4(( op == cff_op_hlineto ? " hlineto\n"
- : " vlineto\n" ));
+ FT_TRACE4(( "%s\n", op == cff_op_hlineto ? " hlineto"
+ : " vlineto" ));
if ( num_args < 0 )
goto Stack_Underflow;
@@ -1266,8 +1267,8 @@
FT_Int nargs;
- FT_TRACE4(( op == cff_op_vhcurveto ? " vhcurveto\n"
- : " hvcurveto\n" ));
+ FT_TRACE4(( "%s\n", op == cff_op_vhcurveto ? " vhcurveto"
+ : " hvcurveto" ));
if ( cff_builder_start_point( builder, x, y ) )
goto Fail;
diff --git a/src/psaux/pshints.c b/src/psaux/pshints.c
index 4560fb86a..0a5af316d 100644
--- a/src/psaux/pshints.c
+++ b/src/psaux/pshints.c
@@ -1025,10 +1025,10 @@
}
}
- FT_TRACE6(( initialMap ? "flags: [p]air [g]host [t]op "
- "[b]ottom [L]ocked [S]ynthetic\n"
- "Initial hintmap\n"
- : "Hints:\n" ));
+ FT_TRACE6(( "%s\n", initialMap ? "flags: [p]air [g]host [t]op"
+ " [b]ottom [L]ocked [S]ynthetic\n"
+ "Initial hintmap"
+ : "Hints:" ));
cf2_hintmap_dump( hintmap );
/*
diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c
index 145b672a0..2597f8c77 100644
--- a/src/psaux/psintrp.c
+++ b/src/psaux/psintrp.c
@@ -776,7 +776,8 @@
case cf2_cmdHSTEMHM:
case cf2_cmdHSTEM:
- FT_TRACE4(( op1 == cf2_cmdHSTEMHM ? " hstemhm\n" : " hstem\n" ));
+ FT_TRACE4(( "%s\n", op1 == cf2_cmdHSTEMHM ? " hstemhm"
+ : " hstem" ));
if ( !font->isT1 )
{
@@ -806,7 +807,8 @@
case cf2_cmdVSTEMHM:
case cf2_cmdVSTEM:
- FT_TRACE4(( op1 == cf2_cmdVSTEMHM ? " vstemhm\n" : " vstem\n" ));
+ FT_TRACE4(( "%s\n", op1 == cf2_cmdVSTEMHM ? " vstemhm"
+ : " vstem" ));
if ( !font->isT1 )
{
@@ -889,7 +891,7 @@
FT_Bool isX = FT_BOOL( op1 == cf2_cmdHLINETO );
- FT_TRACE4(( isX ? " hlineto\n" : " vlineto\n" ));
+ FT_TRACE4(( "%s\n", isX ? " hlineto" : " vlineto" ));
for ( idx = 0; idx < count; idx++ )
{
@@ -917,8 +919,8 @@
CF2_UInt idx = 0;
- FT_TRACE4(( op1 == cf2_cmdRCURVELINE ? " rcurveline\n"
- : " rrcurveto\n" ));
+ FT_TRACE4(( "%s\n", op1 == cf2_cmdRCURVELINE ? " rcurveline"
+ : " rrcurveto" ));
while ( idx + 6 <= count )
{
@@ -973,8 +975,8 @@
CF2_Int subrNum;
- FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr"
- : " callsubr" ));
+ FT_TRACE4(( "%s", op1 == cf2_cmdCALLGSUBR ? " callgsubr"
+ : " callsubr" ));
if ( ( !font->isT1 && charstringIndex > CF2_MAX_SUBR ) ||
( font->isT1 && charstringIndex > T1_MAX_SUBRS_CALLS ) )
@@ -1213,8 +1215,8 @@
FT_Bool isV = FT_BOOL( op2 == cf2_escVSTEM3 );
- FT_TRACE4(( isV ? " vstem3\n"
- : " hstem3\n" ));
+ FT_TRACE4(( "%s\n", isV ? " vstem3"
+ : " hstem3" ));
FT_ASSERT( cf2_stack_count( opStack ) == 6 );
@@ -2564,7 +2566,7 @@
case cf2_cmdHINTMASK:
/* the final \n in the tracing message gets added in */
/* `cf2_hintmask_read' (which also traces the mask bytes) */
- FT_TRACE4(( op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
+ FT_TRACE4(( "%s", op1 == cf2_cmdCNTRMASK ? " cntrmask" : " hintmask" ));
/* never add hints after the mask is computed */
if ( cf2_stack_count( opStack ) > 1 &&
@@ -2830,7 +2832,7 @@
count = count1 & ~2U;
idx += count1 - count;
- FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
+ FT_TRACE4(( "%s\n", alternate ? " hvcurveto" : " vhcurveto" ));
while ( idx < count )
{