Compare commits

...

25 Commits

Author SHA1 Message Date
suzuki toshiya 237b3822c4 correct a wrong note in makefile 2017-09-13 17:11:14 +09:00
suzuki toshiya 0fcbb73fa3 replace dummy code in PIC support, from typedef to unused global variable.
Watcom C compiler does not recognize typedef-only code as something valid.
2017-09-13 17:11:14 +09:00
suzuki toshiya 2beca49584 bdf_parse_t->have[], bdf_font_t->{nmod,umod} are allocated in runtime.
Watcom C compiler refuses too huge structure type > 64k.
2017-09-13 17:11:13 +09:00
suzuki toshiya 4e41249fad cpp-conditionalize too large property value check for LP64 systems,
because it is always false on 16bit & 32bit systems.
2017-09-13 17:11:13 +09:00
suzuki toshiya 70e4141c0d [memory debug] incompatible change of internal API for 16bit & ILP64 systems.
ft_mem_primes[] is originally typed to FT_Int, it could not track the memory allocation on 16bit (I16-LP32) system.
2017-09-13 17:11:13 +09:00
suzuki toshiya c6569d4423 Insert casts to some bitshifting, to fit the types of destination variables. 2017-09-13 17:11:13 +09:00
suzuki toshiya 2dcaaad116 [md5] make some constants typed unsigned long,
and MD5_u32plus is changed from unsigned int to FT_UInt32.
2017-09-13 17:11:13 +09:00
suzuki toshiya a645228790 disable TrueTypeGX Variant for 16bit systems in temporal,
due to the limitation that internal face_index is typed int.
2017-09-13 17:11:13 +09:00
suzuki toshiya 79b806fef8 replace 32bit enumarator by cpp macro, conditionally on 16bit system. 2017-09-13 17:11:13 +09:00
suzuki toshiya 7576da1c3e [cff] internal API is changed incompatibly for 16bit & ILP64 systems.
bias calculation is expected to be ILP32, LP64 or LLP64 systems (int = 32bit).
Some internal variables and internal APIs are extended to use 32bit type for 16bit systems.
Using long type is too large on LP64 systems,
and induces the incompatible change of the internal API for 32bit systems,
it should be avoided.
2017-09-13 17:11:13 +09:00
suzuki toshiya 5d2e1ac3b6 insert explict cast to FT_UInt32 when bitshifting for 32bit value.
note: long constant is too large for LP64 platforms.
2017-09-13 17:11:13 +09:00
suzuki toshiya fbde20e94b cpp-conditionalize too large property value check for LP64 systems,
because it is always false on 16bit systems.
2017-09-13 17:11:12 +09:00
suzuki toshiya c122d3172c To make large unsigned 16bit value, temporal bit shift like (1 << 16) can induce an overflow.
Change to make 32bit value by bitshifting and cast to 16bit in later.
2017-09-13 17:11:12 +09:00
suzuki toshiya 2d4f881acd replace "<=" by "==" in the comparison of unsigned variable. 2017-09-13 17:11:12 +09:00
suzuki toshiya df9094492d cpp-conditionalize a check for int width or height > 64k, because it is always false on 16bit system. 2017-09-13 17:11:12 +09:00
suzuki toshiya 12ef16a44b insert explict cast to FT_Fixed when bitshifting for FT_Fixed value.
note: long constant is too large for LP64 platforms.
2017-09-13 17:11:12 +09:00
suzuki toshiya 8f36537406 use FT_UInt32 type to check UCS-2 codepoint overflow in cmap format 4 parser.
note: long type is too large for LP64 platforms.
2017-09-13 17:11:12 +09:00
suzuki toshiya 58dd3a1e6e insert explict cast to FT_Fixed when bitshifting for FT_Fixed value.
note: long constant is too large for LP64 platforms.
2017-09-13 17:11:11 +09:00
suzuki toshiya 776ff19d64 make numerical constant long when bitshifting for FT_Long value 2017-09-13 17:11:11 +09:00
suzuki toshiya 8938185a80 cast 16bit values in the enumarator to signed short, to fit 16bit platforms. 2017-09-13 17:11:11 +09:00
suzuki toshiya 4e28a8fc63 make numerical constant long when bitshifting for FT_Long value 2017-09-13 17:11:11 +09:00
suzuki toshiya ebaa282874 cpp-conditionalize a too long string > 64k, because it is always false on 16bit system. 2017-09-13 17:11:11 +09:00
suzuki toshiya 67219481a8 watcom16.h, watcom16.mk: Watcom 16bit C compiler support files.
unix-watcom16.mk: cross build by Watcom C compiler on Linux.
2017-09-13 17:11:11 +09:00
suzuki toshiya 782336ab31 builds/compiler/16bit.h: new generic header, to avoid greater-than-int enumarator. 2017-09-13 17:11:11 +09:00
suzuki toshiya 93e76a510c devel/ftoption.h: disable some too expensive features for 16bit platform. 2017-09-13 17:11:11 +09:00
42 changed files with 439 additions and 165 deletions

7
builds/compiler/16bit.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef FT_IMAGE_TAG
#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
#endif /* FT_IMAGE_TAG */
#ifndef FT_ENC_TAG
#define FT_ENC_TAG( value, a, b, c, d ) value
#endif /* FT_ENC_TAG */

View File

@ -0,0 +1,10 @@
#include "16bit.h"
/*
* Watcom C compiler for 16bit cannot parse a command line option
* to set preprocessor macro with a value including a dot.
* it is misunderstood as a filename.
*/
#define FT_CONFIG_MODULES_H "ftmodule.h"
#undef TT_CONFIG_OPTION_GX_VAR_SUPPORT

View File

@ -0,0 +1,83 @@
#
# FreeType 2 Watcom-specific definitions
#
# Copyright 1996-2017 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
# Compiler command line name
#
CC := wcc
COMPILER_SEP := $(SEP)
_cc_opt_gcc_incompat := yes
_no_cpp_opt_ftmodule_h := yes
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
#
O := obj
SO := obj
# The library file extension (for standard and static libraries). This can
# be .a, .lib, etc., depending on the platform.
#
A := lib
SA := lib
# Path inclusion flag. Some compilers use a different flag than `-I' to
# specify an additional include path. Examples are `/i=' or `-J'.
#
I := -i=
# C flag used to define a macro before the compilation of a given source
# object. Usually it is `-D' like in `-DDEBUG'.
#
D := -d
# The link flag used to specify a given library file on link. Note that
# this is only used to compile the demo programs, not the library itself.
#
L := -l
# Target flag.
#
T := -fo=
# C flags
#
# These should concern: debug output, optimization & warnings.
#
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
CFLAGS ?= -zq -i=$(TOP_DIR)/builds/compiler -fi=$(TOP_DIR)/builds/compiler/watcom16.h
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
ANSIFLAGS := -za
# Library linking
#
CLEAN_LIBRARY ?= $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
wlib -q -n $@; \
$(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
echo > nul)
# EOF

View File

@ -126,12 +126,14 @@ INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) \
INCLUDE_FLAGS := $(INCLUDES:%=$I%)
ifdef DEVEL_DIR
# We assume that all library dependencies for FreeType are fulfilled for a
# development build, so we directly access the necessary include directory
# information using `pkg-config'.
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
harfbuzz )
ifndef _cc_opt_gcc_incompat
ifdef DEVEL_DIR
# We assume that all library dependencies for FreeType are fulfilled for a
# development build, so we directly access the necessary include directory
# information using `pkg-config'.
INCLUDE_FLAGS += $(shell pkg-config --cflags libpng \
harfbuzz )
endif
endif
@ -157,10 +159,18 @@ endif
# `CPPFLAGS' might be specified by the user in the environment.
#
# some broken C compiler cannot parse "<ftmodule.h>" correctly.
# they should declare _no_cpp_opt_ftmodule_h
ifdef _no_cpp_opt_ftmodule_h
CPPFLAGS += $(I)$(TOP_DIR)/include/freetype/config
else
FTOPTION_FTMODULE_H := $(D)FT_CONFIG_MODULE_H="<ftmodule.h>"
endif
FT_CFLAGS = $(CPPFLAGS) \
$(CFLAGS) \
$DFT2_BUILD_LIBRARY \
$DFT_CONFIG_MODULES_H="<ftmodule.h>" \
$(FTOPTION_FTMODULE_H) \
$(FTOPTION_FLAG)

View File

@ -54,23 +54,32 @@ ifeq ($(PLATFORM),unix)
.PHONY: lcc
else
# If a Unix platform is detected, the configure script is called and
# `unix-def.mk' together with `unix-cc.mk' is created.
#
# Arguments to `configure' should be in the CFG variable. Example:
#
# make CFG="--prefix=/usr --disable-static"
#
# If you need to set CFLAGS or LDFLAGS, do it here also.
#
# Feel free to add support for other platform specific compilers in
# this directory (e.g. solaris.mk + changes here to detect the
# platform).
#
CONFIG_FILE := unix.mk
unix: setup
must_configure := 1
.PHONY: unix
ifneq ($(findstring unix-watcom16,$(MAKECMDGOALS)),)
CONFIG_FILE := unix-watcom16.mk
CC := wcc
unix-watcom16: setup
.PHONY: unix-watcom16
else
# If a Unix platform is detected, the configure script is called and
# `unix-def.mk' together with `unix-cc.mk' is created.
#
# Arguments to `configure' should be in the CFG variable. Example:
#
# make CFG="--prefix=/usr --disable-static"
#
# If you need to set CFLAGS or LDFLAGS, do it here also.
#
# Feel free to add support for other platform specific compilers in
# this directory (e.g. solaris.mk + changes here to detect the
# platform).
#
CONFIG_FILE := unix.mk
unix: setup
must_configure := 1
.PHONY: unix
endif
endif
endif

View File

@ -0,0 +1,25 @@
#
# FreeType 2 Configuration rules for cross building by Watcom C compiler
# for 16bit platforms.
#
# Development version without optimizations & libtool
# and no installation.
#
# Copyright 1996-2017 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
# and distributed under the terms of the FreeType project license,
# LICENSE.TXT. By continuing to use, modify, or distribute this file you
# indicate that you have read the license and understand and accept it
# fully.
include $(TOP_DIR)/builds/unix/unixddef.mk
include $(TOP_DIR)/builds/compiler/watcom16.mk
include $(TOP_DIR)/builds/link_std.mk
# EOF

View File

@ -175,7 +175,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
#define FT_CONFIG_OPTION_USE_LZW
/* #define FT_CONFIG_OPTION_USE_LZW */
/*************************************************************************/
@ -190,7 +190,7 @@ FT_BEGIN_HEADER
/* Define this macro if you want to enable this `feature'. See also */
/* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
#define FT_CONFIG_OPTION_USE_ZLIB
/* #define FT_CONFIG_OPTION_USE_ZLIB */
/*************************************************************************/
@ -227,7 +227,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
#define FT_CONFIG_OPTION_USE_BZIP2
/* #define FT_CONFIG_OPTION_USE_BZIP2 */
/*************************************************************************/
@ -252,7 +252,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
#define FT_CONFIG_OPTION_USE_PNG
/* #define FT_CONFIG_OPTION_USE_PNG */
/*************************************************************************/
@ -265,7 +265,7 @@ FT_BEGIN_HEADER
/* */
/* Define this macro if you want to enable this `feature'. */
/* */
#define FT_CONFIG_OPTION_USE_HARFBUZZ
/* #define FT_CONFIG_OPTION_USE_HARFBUZZ */
/*************************************************************************/
@ -702,7 +702,9 @@ FT_BEGIN_HEADER
/* and avar tables). This has many similarities to Type 1 Multiple */
/* Masters support. */
/* */
#if FT_UINT_MAX > 0xFFFFUL
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
#endif
/*************************************************************************/

View File

@ -711,7 +711,9 @@ FT_BEGIN_HEADER
/* and avar tables). This has many similarities to Type 1 Multiple */
/* Masters support. */
/* */
#if FT_UINT_MAX > 0xFFFFUL
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT
#endif
/*************************************************************************/

View File

@ -146,6 +146,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _autofit_afpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -102,6 +102,12 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _base_basepic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -149,7 +149,7 @@
* Prime numbers are ugly to handle. It would be better to implement
* L-Hashing, which is 10% faster and doesn't require divisions.
*/
static const FT_Int ft_mem_primes[] =
static const FT_Int32 ft_mem_primes[] =
{
7,
11,

View File

@ -1992,10 +1992,10 @@
header[0x53] > 0x7F )
return FT_THROW( Unknown_File_Format );
dlen = ( header[0x53] << 24 ) |
( header[0x54] << 16 ) |
( header[0x55] << 8 ) |
header[0x56];
dlen = ( (FT_Long)header[0x53] << 24 ) |
( (FT_Long)header[0x54] << 16 ) |
( (FT_Long)header[0x55] << 8 ) |
(FT_Long)header[0x56];
#if 0
rlen = ( header[0x57] << 24 ) |
( header[0x58] << 16 ) |
@ -3543,11 +3543,14 @@
FT_CMap cmap = FT_CMAP( face->charmap );
/* care for 64bit platforms */
#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Get_Char_Index: too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
#endif
result = cmap->clazz->char_index( cmap, (FT_UInt32)charcode );
if ( result >= (FT_UInt)face->num_glyphs )
@ -3723,6 +3726,8 @@
FT_CMap vcmap = FT_CMAP( charmap );
/* care for 64bit platforms */
#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetCharVariantIndex:"
@ -3735,6 +3740,7 @@
" too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
#endif
result = vcmap->clazz->char_var_index( vcmap, ucmap,
(FT_UInt32)charcode,
@ -3766,6 +3772,8 @@
FT_CMap vcmap = FT_CMAP( charmap );
/* care for 64bit platforms */
#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetCharVariantIsDefault:"
@ -3778,6 +3786,7 @@
" too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
#endif
result = vcmap->clazz->char_var_default( vcmap,
(FT_UInt32)charcode,
@ -3836,11 +3845,14 @@
FT_Memory memory = FT_FACE_MEMORY( face );
/* care for 64bit platforms */
#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Face_GetVariantsOfChar: too large charcode" ));
FT_TRACE1(( " 0x%x is truncated\n", charcode ));
}
#endif
result = vcmap->clazz->charvariant_list( vcmap, memory,
(FT_UInt32)charcode );
@ -3870,11 +3882,14 @@
FT_Memory memory = FT_FACE_MEMORY( face );
/* care for 64bit platforms */
#if (FT_ULONG_MAX > 0xFFFFFFFFUL)
if ( variantSelector > 0xFFFFFFFFUL )
{
FT_TRACE1(( "FT_Get_Char_Index: too large variantSelector" ));
FT_TRACE1(( " 0x%x is truncated\n", variantSelector ));
}
#endif
result = vcmap->clazz->variantchar_list( vcmap, memory,
(FT_UInt32)variantSelector );

View File

@ -49,6 +49,11 @@
ft_base_pic_free( library );
}
#else
/* ANSI C doesn't like empty source files */
int _base_ftpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -78,22 +78,22 @@
head[12] >= 0x80 )
return FT_THROW( Unknown_File_Format );
*rdata_pos = ( head[ 0] << 24 ) |
( head[ 1] << 16 ) |
( head[ 2] << 8 ) |
head[ 3];
map_pos = ( head[ 4] << 24 ) |
( head[ 5] << 16 ) |
( head[ 6] << 8 ) |
head[ 7];
rdata_len = ( head[ 8] << 24 ) |
( head[ 9] << 16 ) |
( head[10] << 8 ) |
head[11];
map_len = ( head[12] << 24 ) |
( head[13] << 16 ) |
( head[14] << 8 ) |
head[15];
*rdata_pos = ( (FT_Long)head[ 0] << 24 ) |
( (FT_Long)head[ 1] << 16 ) |
( (FT_Long)head[ 2] << 8 ) |
(FT_Long)head[ 3];
map_pos = ( (FT_Long)head[ 4] << 24 ) |
( (FT_Long)head[ 5] << 16 ) |
( (FT_Long)head[ 6] << 8 ) |
(FT_Long)head[ 7];
rdata_len = ( (FT_Long)head[ 8] << 24 ) |
( (FT_Long)head[ 9] << 16 ) |
( (FT_Long)head[10] << 8 ) |
(FT_Long)head[11];
map_len = ( (FT_Long)head[12] << 24 ) |
( (FT_Long)head[13] << 16 ) |
( (FT_Long)head[14] << 8 ) |
(FT_Long)head[15];
/* the map must not be empty */
if ( !map_pos )
@ -519,10 +519,10 @@
char **result_file_name,
FT_Long *result_offset )
{
FT_Int32 magic = ( 0x00 << 24 ) |
( 0x05 << 16 ) |
( 0x16 << 8 ) |
0x07;
FT_Int32 magic = ( (FT_Int32)0x00 << 24 ) |
( (FT_Int32)0x05 << 16 ) |
( (FT_Int32)0x16 << 8 ) |
(FT_Int32)0x07;
*result_file_name = NULL;
@ -541,10 +541,10 @@
char **result_file_name,
FT_Long *result_offset )
{
FT_Int32 magic = ( 0x00 << 24 ) |
( 0x05 << 16 ) |
( 0x16 << 8 ) |
0x00;
FT_Int32 magic = ( (FT_Int32)0x00 << 24 ) |
( (FT_Int32)0x05 << 16 ) |
( (FT_Int32)0x16 << 8 ) |
(FT_Int32)0x00;
*result_file_name = NULL;

View File

@ -59,7 +59,7 @@
*/
#define STEP(f, a, b, c, d, x, t, s) \
(a) += f((b), (c), (d)) + (x) + (t); \
(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \
(a) = (((a) << (s)) | (((a) & 0xffffffffUL) >> (32 - (s)))); \
(a) += (b);
/*
@ -117,76 +117,76 @@ static const void *body(MD5_CTX *ctx, const void *data, unsigned long size)
saved_d = d;
/* Round 1 */
STEP(F, a, b, c, d, SET(0), 0xd76aa478, 7)
STEP(F, d, a, b, c, SET(1), 0xe8c7b756, 12)
STEP(F, c, d, a, b, SET(2), 0x242070db, 17)
STEP(F, b, c, d, a, SET(3), 0xc1bdceee, 22)
STEP(F, a, b, c, d, SET(4), 0xf57c0faf, 7)
STEP(F, d, a, b, c, SET(5), 0x4787c62a, 12)
STEP(F, c, d, a, b, SET(6), 0xa8304613, 17)
STEP(F, b, c, d, a, SET(7), 0xfd469501, 22)
STEP(F, a, b, c, d, SET(8), 0x698098d8, 7)
STEP(F, d, a, b, c, SET(9), 0x8b44f7af, 12)
STEP(F, c, d, a, b, SET(10), 0xffff5bb1, 17)
STEP(F, b, c, d, a, SET(11), 0x895cd7be, 22)
STEP(F, a, b, c, d, SET(12), 0x6b901122, 7)
STEP(F, d, a, b, c, SET(13), 0xfd987193, 12)
STEP(F, c, d, a, b, SET(14), 0xa679438e, 17)
STEP(F, b, c, d, a, SET(15), 0x49b40821, 22)
STEP(F, a, b, c, d, SET(0), 0xd76aa478UL, 7)
STEP(F, d, a, b, c, SET(1), 0xe8c7b756UL, 12)
STEP(F, c, d, a, b, SET(2), 0x242070dbUL, 17)
STEP(F, b, c, d, a, SET(3), 0xc1bdceeeUL, 22)
STEP(F, a, b, c, d, SET(4), 0xf57c0fafUL, 7)
STEP(F, d, a, b, c, SET(5), 0x4787c62aUL, 12)
STEP(F, c, d, a, b, SET(6), 0xa8304613UL, 17)
STEP(F, b, c, d, a, SET(7), 0xfd469501UL, 22)
STEP(F, a, b, c, d, SET(8), 0x698098d8UL, 7)
STEP(F, d, a, b, c, SET(9), 0x8b44f7afUL, 12)
STEP(F, c, d, a, b, SET(10), 0xffff5bb1UL, 17)
STEP(F, b, c, d, a, SET(11), 0x895cd7beUL, 22)
STEP(F, a, b, c, d, SET(12), 0x6b901122UL, 7)
STEP(F, d, a, b, c, SET(13), 0xfd987193UL, 12)
STEP(F, c, d, a, b, SET(14), 0xa679438eUL, 17)
STEP(F, b, c, d, a, SET(15), 0x49b40821UL, 22)
/* Round 2 */
STEP(G, a, b, c, d, GET(1), 0xf61e2562, 5)
STEP(G, d, a, b, c, GET(6), 0xc040b340, 9)
STEP(G, c, d, a, b, GET(11), 0x265e5a51, 14)
STEP(G, b, c, d, a, GET(0), 0xe9b6c7aa, 20)
STEP(G, a, b, c, d, GET(5), 0xd62f105d, 5)
STEP(G, d, a, b, c, GET(10), 0x02441453, 9)
STEP(G, c, d, a, b, GET(15), 0xd8a1e681, 14)
STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8, 20)
STEP(G, a, b, c, d, GET(9), 0x21e1cde6, 5)
STEP(G, d, a, b, c, GET(14), 0xc33707d6, 9)
STEP(G, c, d, a, b, GET(3), 0xf4d50d87, 14)
STEP(G, b, c, d, a, GET(8), 0x455a14ed, 20)
STEP(G, a, b, c, d, GET(13), 0xa9e3e905, 5)
STEP(G, d, a, b, c, GET(2), 0xfcefa3f8, 9)
STEP(G, c, d, a, b, GET(7), 0x676f02d9, 14)
STEP(G, b, c, d, a, GET(12), 0x8d2a4c8a, 20)
STEP(G, a, b, c, d, GET(1), 0xf61e2562UL, 5)
STEP(G, d, a, b, c, GET(6), 0xc040b340UL, 9)
STEP(G, c, d, a, b, GET(11), 0x265e5a51UL, 14)
STEP(G, b, c, d, a, GET(0), 0xe9b6c7aaUL, 20)
STEP(G, a, b, c, d, GET(5), 0xd62f105dUL, 5)
STEP(G, d, a, b, c, GET(10), 0x02441453UL, 9)
STEP(G, c, d, a, b, GET(15), 0xd8a1e681UL, 14)
STEP(G, b, c, d, a, GET(4), 0xe7d3fbc8UL, 20)
STEP(G, a, b, c, d, GET(9), 0x21e1cde6UL, 5)
STEP(G, d, a, b, c, GET(14), 0xc33707d6UL, 9)
STEP(G, c, d, a, b, GET(3), 0xf4d50d87UL, 14)
STEP(G, b, c, d, a, GET(8), 0x455a14edUL, 20)
STEP(G, a, b, c, d, GET(13), 0xa9e3e905UL, 5)
STEP(G, d, a, b, c, GET(2), 0xfcefa3f8UL, 9)
STEP(G, c, d, a, b, GET(7), 0x676f02d9UL, 14)
STEP(G, b, c, d, a, GET(12), 0x8d2a4c8aUL, 20)
/* Round 3 */
STEP(H, a, b, c, d, GET(5), 0xfffa3942, 4)
STEP(H2, d, a, b, c, GET(8), 0x8771f681, 11)
STEP(H, c, d, a, b, GET(11), 0x6d9d6122, 16)
STEP(H2, b, c, d, a, GET(14), 0xfde5380c, 23)
STEP(H, a, b, c, d, GET(1), 0xa4beea44, 4)
STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9, 11)
STEP(H, c, d, a, b, GET(7), 0xf6bb4b60, 16)
STEP(H2, b, c, d, a, GET(10), 0xbebfbc70, 23)
STEP(H, a, b, c, d, GET(13), 0x289b7ec6, 4)
STEP(H2, d, a, b, c, GET(0), 0xeaa127fa, 11)
STEP(H, c, d, a, b, GET(3), 0xd4ef3085, 16)
STEP(H2, b, c, d, a, GET(6), 0x04881d05, 23)
STEP(H, a, b, c, d, GET(9), 0xd9d4d039, 4)
STEP(H2, d, a, b, c, GET(12), 0xe6db99e5, 11)
STEP(H, c, d, a, b, GET(15), 0x1fa27cf8, 16)
STEP(H2, b, c, d, a, GET(2), 0xc4ac5665, 23)
STEP(H, a, b, c, d, GET(5), 0xfffa3942UL, 4)
STEP(H2, d, a, b, c, GET(8), 0x8771f681UL, 11)
STEP(H, c, d, a, b, GET(11), 0x6d9d6122UL, 16)
STEP(H2, b, c, d, a, GET(14), 0xfde5380cUL, 23)
STEP(H, a, b, c, d, GET(1), 0xa4beea44UL, 4)
STEP(H2, d, a, b, c, GET(4), 0x4bdecfa9UL, 11)
STEP(H, c, d, a, b, GET(7), 0xf6bb4b60UL, 16)
STEP(H2, b, c, d, a, GET(10), 0xbebfbc70UL, 23)
STEP(H, a, b, c, d, GET(13), 0x289b7ec6UL, 4)
STEP(H2, d, a, b, c, GET(0), 0xeaa127faUL, 11)
STEP(H, c, d, a, b, GET(3), 0xd4ef3085UL, 16)
STEP(H2, b, c, d, a, GET(6), 0x04881d05UL, 23)
STEP(H, a, b, c, d, GET(9), 0xd9d4d039UL, 4)
STEP(H2, d, a, b, c, GET(12), 0xe6db99e5UL, 11)
STEP(H, c, d, a, b, GET(15), 0x1fa27cf8UL, 16)
STEP(H2, b, c, d, a, GET(2), 0xc4ac5665UL, 23)
/* Round 4 */
STEP(I, a, b, c, d, GET(0), 0xf4292244, 6)
STEP(I, d, a, b, c, GET(7), 0x432aff97, 10)
STEP(I, c, d, a, b, GET(14), 0xab9423a7, 15)
STEP(I, b, c, d, a, GET(5), 0xfc93a039, 21)
STEP(I, a, b, c, d, GET(12), 0x655b59c3, 6)
STEP(I, d, a, b, c, GET(3), 0x8f0ccc92, 10)
STEP(I, c, d, a, b, GET(10), 0xffeff47d, 15)
STEP(I, b, c, d, a, GET(1), 0x85845dd1, 21)
STEP(I, a, b, c, d, GET(8), 0x6fa87e4f, 6)
STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0, 10)
STEP(I, c, d, a, b, GET(6), 0xa3014314, 15)
STEP(I, b, c, d, a, GET(13), 0x4e0811a1, 21)
STEP(I, a, b, c, d, GET(4), 0xf7537e82, 6)
STEP(I, d, a, b, c, GET(11), 0xbd3af235, 10)
STEP(I, c, d, a, b, GET(2), 0x2ad7d2bb, 15)
STEP(I, b, c, d, a, GET(9), 0xeb86d391, 21)
STEP(I, a, b, c, d, GET(0), 0xf4292244UL, 6)
STEP(I, d, a, b, c, GET(7), 0x432aff97UL, 10)
STEP(I, c, d, a, b, GET(14), 0xab9423a7UL, 15)
STEP(I, b, c, d, a, GET(5), 0xfc93a039UL, 21)
STEP(I, a, b, c, d, GET(12), 0x655b59c3UL, 6)
STEP(I, d, a, b, c, GET(3), 0x8f0ccc92UL, 10)
STEP(I, c, d, a, b, GET(10), 0xffeff47dUL, 15)
STEP(I, b, c, d, a, GET(1), 0x85845dd1UL, 21)
STEP(I, a, b, c, d, GET(8), 0x6fa87e4fUL, 6)
STEP(I, d, a, b, c, GET(15), 0xfe2ce6e0UL, 10)
STEP(I, c, d, a, b, GET(6), 0xa3014314UL, 15)
STEP(I, b, c, d, a, GET(13), 0x4e0811a1UL, 21)
STEP(I, a, b, c, d, GET(4), 0xf7537e82UL, 6)
STEP(I, d, a, b, c, GET(11), 0xbd3af235UL, 10)
STEP(I, c, d, a, b, GET(2), 0x2ad7d2bbUL, 15)
STEP(I, b, c, d, a, GET(9), 0xeb86d391UL, 21)
a += saved_a;
b += saved_b;

View File

@ -29,7 +29,7 @@
#define _MD5_H
/* Any 32-bit or wider unsigned integer data type will do */
typedef unsigned int MD5_u32plus;
typedef FT_UInt32 MD5_u32plus;
typedef struct {
MD5_u32plus lo, hi;

View File

@ -211,8 +211,9 @@ FT_BEGIN_HEADER
/* The size of the next two arrays must be in sync with the */
/* size of the `have' array in the `bdf_parse_t' structure. */
unsigned long nmod[34816]; /* Bitmap indicating modified glyphs. */
unsigned long umod[34816]; /* Bitmap indicating modified */
#define BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH 34816
unsigned long* nmod; /* Bitmap indicating modified glyphs. */
unsigned long* umod; /* Bitmap indicating modified */
/* unencoded glyphs. */
unsigned short modified; /* Boolean indicating font modified. */
unsigned short bpp; /* Bits per pixel. */

View File

@ -170,6 +170,7 @@ THE SOFTWARE.
}
Exit:
#ifdef FT_LONG64
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "bdf_cmap_char_next: charcode 0x%x > 32bit API" ));
@ -177,6 +178,7 @@ THE SOFTWARE.
/* XXX: result should be changed to indicate an overflow error */
}
else
#endif
*acharcode = (FT_UInt32)charcode;
return result;
}
@ -888,21 +890,27 @@ THE SOFTWARE.
break;
case BDF_INTEGER:
#ifdef FT_LONG64
if ( prop->value.l > 0x7FFFFFFFL || prop->value.l < ( -1 - 0x7FFFFFFFL ) )
{
FT_TRACE1(( "bdf_get_bdf_property:"
" too large integer 0x%x is truncated\n" ));
" too large integer 0x%x is truncated\n",
prop->value.l ));
}
#endif
aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
aproperty->u.integer = (FT_Int32)prop->value.l;
break;
case BDF_CARDINAL:
#ifdef FT_LONG64
if ( prop->value.ul > 0xFFFFFFFFUL )
{
FT_TRACE1(( "bdf_get_bdf_property:"
" too large cardinal 0x%x is truncated\n" ));
" too large cardinal 0x%x is truncated\n",
prop->value.l ));
}
#endif
aproperty->type = BDF_PROPERTY_TYPE_CARDINAL;
aproperty->u.cardinal = (FT_UInt32)prop->value.ul;
break;

View File

@ -270,7 +270,7 @@
bdf_font_t* font;
bdf_options_t* opts;
unsigned long have[34816]; /* must be in sync with `nmod' and `umod' */
unsigned long* have; /* must be in sync with `nmod' and `umod' */
/* arrays from `bdf_font_t' structure */
_bdf_list_t list;
@ -856,8 +856,10 @@
FT_ZERO( p );
n = ft_strlen( name ) + 1;
#ifdef FT_LONG64
if ( n > FT_ULONG_MAX )
return FT_THROW( Invalid_Argument );
#endif
if ( FT_NEW_ARRAY( p->name, n ) )
goto Exit;
@ -1465,9 +1467,11 @@
/* Check that the encoding is in the Unicode range because */
/* otherwise p->have (a bitmap with static size) overflows. */
if ( p->glyph_enc > 0 &&
(size_t)p->glyph_enc >= sizeof ( p->have ) /
sizeof ( unsigned long ) * 32 )
if ( p->glyph_enc > 0
#if SIZE_MAX > (BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH * 32)
&& (size_t)p->glyph_enc >= BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH * 32
#endif
)
{
FT_ERROR(( "_bdf_parse_glyphs: " ERRMSG5, lineno, "ENCODING" ));
error = FT_THROW( Invalid_File_Format );
@ -1960,6 +1964,10 @@
if ( FT_NEW( font ) )
goto Exit;
if ( FT_NEW_ARRAY( font->nmod, BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH ) )
goto Exit;
if ( FT_NEW_ARRAY( font->umod, BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH ) )
goto Exit;
p->font = font;
font->memory = p->memory;
@ -2192,6 +2200,19 @@
error = FT_THROW( Invalid_File_Format );
Exit:
if ( font && error ) {
memory = font->memory;
if ( font->nmod )
FT_FREE( font->nmod );
if ( font->umod )
FT_FREE( font->umod );
if ( font->name )
FT_FREE( font->name );
if ( font->props )
FT_FREE( font->props );
FT_FREE( font );
}
return error;
}
@ -2218,6 +2239,8 @@
if ( FT_NEW( p ) )
goto Exit;
if ( FT_NEW_ARRAY( p->have, BDF_SIZE_OF_ARRAY_MODIFIED_GLYPH ) )
goto Exit;
memory = NULL;
p->opts = (bdf_options_t*)( ( opts != 0 ) ? opts : &_bdf_opts );
@ -2345,6 +2368,7 @@
memory = extmemory;
FT_FREE( p->have );
FT_FREE( p->glyph_name );
FT_FREE( p );
}
@ -2439,6 +2463,12 @@
FT_FREE( font->user_props );
if ( font->nmod )
FT_FREE( font->nmod );
if ( font->umod )
FT_FREE( font->umod );
/* FREE( font ); */ /* XXX Fixme */
}

View File

@ -100,11 +100,16 @@ FT_BEGIN_HEADER
* in `CF2_Blues', assuming 1000 units per em here.
*
*/
#if UINT_MAX > 0xFFFFUL
enum
{
CF2_ICF_Top = cf2_intToFixed( 880 ),
CF2_ICF_Bottom = cf2_intToFixed( -120 )
};
#else
#define CF2_ICF_Top (cf2_intToFixed( 880 ))
#define CF2_ICF_Bottom (cf2_intToFixed( -120 ))
#endif
/*

View File

@ -342,11 +342,11 @@
/* */
/* <Return> */
/* The bias value. */
static FT_Int
static FT_Int32
cff_compute_bias( FT_Int in_charstring_type,
FT_UInt num_subrs )
{
FT_Int result;
FT_Int32 result;
if ( in_charstring_type == 1 )
@ -2326,7 +2326,7 @@
end = FT_MIN( idx + count, CFF_MAX_TRANS_ELEMENTS );
if ( idx < end )
decoder->buildchar[idx] = 1 << 16;
decoder->buildchar[idx] = (FT_Fixed)1 << 16;
for ( i = idx + 1; i < end; i++ )
decoder->buildchar[i] = 0;
@ -2526,7 +2526,7 @@
case cff_op_callsubr:
{
FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
FT_UInt32 idx = (FT_UInt32)( ( args[0] >> 16 ) +
decoder->locals_bias );
@ -2570,7 +2570,7 @@
case cff_op_callgsubr:
{
FT_UInt idx = (FT_UInt)( ( args[0] >> 16 ) +
FT_UInt32 idx = (FT_UInt32)( ( args[0] >> 16 ) +
decoder->globals_bias );

View File

@ -183,8 +183,8 @@ FT_BEGIN_HEADER
FT_UInt num_locals;
FT_UInt num_globals;
FT_Int locals_bias;
FT_Int globals_bias;
FT_Int32 locals_bias;
FT_Int32 globals_bias;
FT_Byte** locals;
FT_Byte** globals;

View File

@ -132,6 +132,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _cff_cffpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -177,9 +177,9 @@ FT_BEGIN_HEADER
#define LSBFirst 0
#define MSBFirst 1
#define PCF_FILE_VERSION ( ( 'p' << 24 ) | \
( 'c' << 16 ) | \
( 'f' << 8 ) | 1 )
#define PCF_FILE_VERSION ( ((FT_UInt32)'p' << 24 ) | \
((FT_UInt32)'c' << 16 ) | \
((FT_UInt32)'f' << 8 ) | (FT_UInt32)1 )
#define PCF_FORMAT_MASK 0xFFFFFF00UL
#define PCF_DEFAULT_FORMAT 0x00000000UL

View File

@ -179,6 +179,7 @@ THE SOFTWARE.
}
Exit:
#if FT_ULONG_MAX > 0xFFFFFFFFUL
if ( charcode > 0xFFFFFFFFUL )
{
FT_TRACE1(( "pcf_cmap_char_next: charcode 0x%x > 32bit API" ));
@ -186,6 +187,7 @@ THE SOFTWARE.
/* XXX: result should be changed to indicate an overflow error */
}
else
#endif
*acharcode = (FT_UInt32)charcode;
return result;
}
@ -625,12 +627,14 @@ THE SOFTWARE.
}
else
{
#if FT_ULONG_MAX > 0xFFFFFFFFUL
if ( prop->value.l > 0x7FFFFFFFL ||
prop->value.l < ( -1 - 0x7FFFFFFFL ) )
{
FT_TRACE1(( "pcf_get_bdf_property:" ));
FT_TRACE1(( " too large integer 0x%x is truncated\n" ));
}
#endif
/*
* The PCF driver loads all properties as signed integers.

View File

@ -305,7 +305,7 @@
/* - we need at least 18 bytes for a log font record */
/* - the overall size is at least 95 bytes plus the */
/* log header and log font records */
if ( count > ( ( 1 << 16 ) - 2 ) / 5 ||
if ( count > (FT_UInt)(( 1L << 16 ) - 2 ) / 5 ||
2 + count * 5 >= stream->size - section_offset ||
95 + count * ( 5 + 18 ) >= stream->size )
{

View File

@ -95,7 +95,7 @@
val <<= 1;
mask >>= 1;
if ( --left <= 0 )
if ( --left == 0 )
{
cur[0] = (FT_Byte)c;
left = writer->width;
@ -174,7 +174,7 @@
mask >>= 1;
if ( --left <= 0 )
if ( --left == 0 )
{
cur[0] = (FT_Byte)c;
left = writer->width;
@ -239,7 +239,7 @@
mask >>= 1;
if ( --left <= 0 )
if ( --left == 0 )
{
cur[0] = (FT_Byte)c;
c = 0;

View File

@ -70,6 +70,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _pshinter_pshpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -91,6 +91,11 @@
}
#else
/* ANSI C doesn't like empty source files */
int _psnames_pspic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -166,11 +166,13 @@
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
}
#if FT_UINT_MAX > 0xFFFFUL
if ( width > FT_USHORT_MAX || height > FT_USHORT_MAX )
{
error = FT_THROW( Invalid_Argument );
goto Exit;
}
#endif
bitmap = &slot->bitmap;
memory = render->root.memory;

View File

@ -83,6 +83,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _rastter_rastpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -444,7 +444,7 @@
#else /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */
/* ANSI C doesn't like empty source files */
typedef int _pngshim_dummy;
int _sfnt_pngshim_dummy = 1;
#endif /* !(TT_CONFIG_OPTION_EMBEDDED_BITMAPS && FT_CONFIG_OPTION_USE_PNG) */

View File

@ -137,6 +137,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _sfnt_sfntpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -837,7 +837,7 @@
{
FT_TRACE3(( "sfnt_open_font: synthesize TTC\n" ));
face->ttc_header.version = 1 << 16;
face->ttc_header.version = (FT_Fixed)1 << 16;
face->ttc_header.count = 1;
if ( FT_NEW( face->ttc_header.offsets ) )

View File

@ -836,8 +836,8 @@
(FT_Int)end + delta >= 0 )
charcode = (FT_UInt)( -delta );
else if ( (FT_Int)charcode + delta < 0x10000L &&
(FT_Int)end + delta >= 0x10000L )
else if ( (FT_Int32)charcode + delta < 0x10000L &&
(FT_Int32)end + delta >= 0x10000L )
charcode = (FT_UInt)( 0x10000L - delta );
else
@ -1169,8 +1169,8 @@
(FT_Int)end + delta >= 0 )
charcode = (FT_UInt)( -delta );
else if ( (FT_Int)charcode + delta < 0x10000L &&
(FT_Int)end + delta >= 0x10000L )
else if ( (FT_Int32)charcode + delta < 0x10000L &&
(FT_Int32)end + delta >= 0x10000L )
charcode = (FT_UInt)( 0x10000L - delta );
else
@ -1407,8 +1407,8 @@
(FT_Int)end + delta >= 0 )
charcode = (FT_UInt)( -delta );
else if ( (FT_Int)charcode + delta < 0x10000L &&
(FT_Int)end + delta >= 0x10000L )
else if ( (FT_Int32)charcode + delta < 0x10000L &&
(FT_Int32)end + delta >= 0x10000L )
charcode = (FT_UInt)( 0x10000L - delta );
}
}

View File

@ -112,6 +112,11 @@
ft_smooth_renderer_class_pic_free( library );
}
#else
/* ANSI C doesn't like empty source files */
int _smooth_ftspic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -771,8 +771,8 @@
/* completely refer to the (already) hinted subglyphs. */
if ( is_composite )
{
loader->exec->metrics.x_scale = 1 << 16;
loader->exec->metrics.y_scale = 1 << 16;
loader->exec->metrics.x_scale = (FT_Fixed)1 << 16;
loader->exec->metrics.y_scale = (FT_Fixed)1 << 16;
FT_ARRAY_COPY( zone->orus, zone->cur, zone->n_points );
}

View File

@ -2476,7 +2476,7 @@
/* adjust named instance index */
face->root.face_index &= 0xFFFF;
if ( i < blend->mmvar->num_namedstyles )
face->root.face_index |= ( i + 1 ) << 16;
face->root.face_index |= ( i + 1L ) << 16;
face->is_default_instance = is_default_instance;
@ -3762,7 +3762,7 @@
#else /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */
/* ANSI C doesn't like empty source files */
typedef int _tt_gxvar_dummy;
int _tt_gxvar_dummy = 1;
#endif /* !TT_CONFIG_OPTION_GX_VAR_SUPPORT */

View File

@ -344,7 +344,11 @@ FT_BEGIN_HEADER
/* */
typedef enum GX_TupleCountFlags_
{
#if FT_UINT_MAX > 0xFFFFUL
GX_TC_TUPLES_SHARE_POINT_NUMBERS = 0x8000,
#else
GX_TC_TUPLES_SHARE_POINT_NUMBERS = (FT_Short)0x8000,
#endif
GX_TC_RESERVED_TUPLE_FLAGS = 0x7000,
GX_TC_TUPLE_COUNT_MASK = 0x0FFF
@ -362,7 +366,11 @@ FT_BEGIN_HEADER
/* */
typedef enum GX_TupleIndexFlags_
{
#if FT_UINT_MAX > 0xFFFFUL
GX_TI_EMBEDDED_TUPLE_COORD = 0x8000,
#else
GX_TI_EMBEDDED_TUPLE_COORD = (FT_Short)0x8000,
#endif
GX_TI_INTERMEDIATE_TUPLE = 0x4000,
GX_TI_PRIVATE_POINT_NUMBERS = 0x2000,
GX_TI_RESERVED_TUPLE_FLAG = 0x1000,

View File

@ -7390,7 +7390,7 @@
/* */
/* XXX: FreeType supports it, dependent on what client does? */
if ( ( args[0] & 1024 ) != 0 )
K |= 1 << 17;
K |= 1L << 17;
/********************************/
/* SYMMETRICAL SMOOTHING */
@ -7400,7 +7400,7 @@
/* The only smoothing method FreeType supports unless someone sets */
/* FT_LOAD_TARGET_MONO. */
if ( ( args[0] & 2048 ) != 0 && exc->subpixel_hinting_lean )
K |= 1 << 18;
K |= 1L << 18;
/********************************/
/* CLEARTYPE HINTING AND */
@ -7411,7 +7411,7 @@
/* Grayscale rendering is what FreeType does anyway unless someone */
/* sets FT_LOAD_TARGET_MONO or FT_LOAD_TARGET_LCD(_V) */
if ( ( args[0] & 4096 ) != 0 && exc->grayscale_cleartype )
K |= 1 << 19;
K |= 1L << 19;
}
#endif
@ -7456,7 +7456,7 @@
/* */
/* Functionality still needs to be added */
if ( ( args[0] & 512 ) != 0 && exc->bgr )
K |= 1 << 16;
K |= 1L << 16;
if ( exc->rasterizer_version >= 38 )
{
@ -7467,7 +7467,7 @@
/* */
/* Functionality still needs to be added */
if ( ( args[0] & 1024 ) != 0 && exc->subpixel_positioned )
K |= 1 << 17;
K |= 1L << 17;
/********************************/
/* SYMMETRICAL SMOOTHING */
@ -7476,7 +7476,7 @@
/* */
/* Functionality still needs to be added */
if ( ( args[0] & 2048 ) != 0 && exc->symmetrical_smoothing )
K |= 1 << 18;
K |= 1L << 18;
/********************************/
/* GRAY CLEARTYPE */
@ -7485,7 +7485,7 @@
/* */
/* Functionality still needs to be added */
if ( ( args[0] & 4096 ) != 0 && exc->gray_cleartype )
K |= 1 << 19;
K |= 1L << 19;
}
}
}

View File

@ -95,6 +95,11 @@
return error;
}
#else
/* ANSI C doesn't like empty source files */
int _truetype_ttpic_dummy = 1;
#endif /* FT_CONFIG_OPTION_PIC */

View File

@ -60,9 +60,11 @@
FT_Int n;
#if FT_UINT_MAX > 0xFFFFU
/* PS string/name length must be < 16-bit */
if ( len > 0xFFFFU )
return 0;
#endif
for ( n = 0; n < type1->num_glyphs; n++ )
{