summaryrefslogtreecommitdiffstats
path: root/src/psaux/psobjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/psaux/psobjs.c')
-rw-r--r--src/psaux/psobjs.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 52e30a4..fe8398a 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_CALC_H
#include "psobjs.h"
#include "psconv.h"
@@ -564,8 +565,8 @@
cur++;
if ( cur >= limit || *cur != '>' ) /* >> */
{
- FT_ERROR(( "ps_parser_skip_PS_token: "
- "unexpected closing delimiter `>'\n" ));
+ FT_ERROR(( "ps_parser_skip_PS_token:"
+ " unexpected closing delimiter `>'\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
@@ -590,9 +591,10 @@
Exit:
if ( cur == parser->cursor )
{
- FT_ERROR(( "ps_parser_skip_PS_token: "
- "current token is `%c', which is self-delimiting "
- "but invalid at this point\n",
+ FT_ERROR(( "ps_parser_skip_PS_token:"
+ " current token is `%c' which is self-delimiting\n"
+ " "
+ " but invalid at this point\n",
*cur ));
error = PSaux_Err_Invalid_File_Format;
@@ -1153,8 +1155,10 @@
}
else
{
- FT_ERROR(( "ps_parser_load_field: expected a name or string "
- "but found token of type %d instead\n",
+ FT_ERROR(( "ps_parser_load_field:"
+ " expected a name or string\n"
+ " "
+ " but found token of type %d instead\n",
token.type ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
@@ -1191,8 +1195,8 @@
if ( result < 0 )
{
- FT_ERROR(( "ps_parser_load_field: "
- "expected four integers in bounding box\n" ));
+ FT_ERROR(( "ps_parser_load_field:"
+ " expected four integers in bounding box\n" ));
error = PSaux_Err_Invalid_File_Format;
goto Exit;
}
@@ -1309,7 +1313,7 @@
FT_LOCAL_DEF( FT_Error )
ps_parser_to_bytes( PS_Parser parser,
FT_Byte* bytes,
- FT_Long max_bytes,
+ FT_Offset max_bytes,
FT_Long* pnum_bytes,
FT_Bool delimiters )
{
@@ -1551,16 +1555,9 @@
FT_Byte* control = (FT_Byte*)outline->tags + outline->n_points;
- if ( builder->shift )
- {
- x >>= 16;
- y >>= 16;
- }
- point->x = x;
- point->y = y;
+ point->x = FIXED_TO_INT( x );
+ point->y = FIXED_TO_INT( y );
*control = (FT_Byte)( flag ? FT_CURVE_TAG_ON : FT_CURVE_TAG_CUBIC );
-
- builder->last = *point;
}
outline->n_points++;
}
@@ -1668,8 +1665,8 @@
if ( outline->n_contours > 0 )
{
- /* Don't add contours only consisting of one point, i.e., */
- /* check whether begin point and last point are the same. */
+ /* Don't add contours only consisting of one point, i.e., */
+ /* check whether the first and the last point is the same. */
if ( first == outline->n_points - 1 )
{
outline->n_contours--;