ref: 6d4fbec1b8245cca808c2bc53bca58d08b85cba2
parent: 9d770c90d1efbf2de190000e7597aca3d1b1ac9f
author: David Turner <[email protected]>
date: Fri Apr 20 04:50:36 EDT 2001
* ftconfig.h, ftoption.h: updated "ftconfig.h" to detect 64-bit int types on platforms where Autoconf is not available). Also removed FTCALC_USE_LONG_LONG and replaced it with FT_CONFIG_OPTION_FORCE_INT64 * builds/win32/freetype.dsp: updated the Visual C++ project file. Doesn't create a DLL yet.. * cffgload.c: removed a compilation warning
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-04-20 David Turner <[email protected]>
+
+ * ftconfig.h, ftoption.h: updated "ftconfig.h" to detect 64-bit int
+ types on platforms where Autoconf is not available). Also removed
+ FTCALC_USE_LONG_LONG and replaced it with FT_CONFIG_OPTION_FORCE_INT64
+
+ * builds/win32/freetype.dsp: updated the Visual C++ project file. Doesn't
+ create a DLL yet..
+
+ * cffgload.c: removed a compilation warning
+
2001-04-10 Tom Kacvinsky <[email protected]>
* t1load.c (parse_charstrings): Changed code for placing .notdef
--- a/builds/win32/visualc/freetype.dsp
+++ b/builds/win32/visualc/freetype.dsp
@@ -39,11 +39,12 @@
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "obj/release"
-# PROP Intermediate_Dir "obj/release"
+# PROP Output_Dir "..\..\..\objs\release"
+# PROP Intermediate_Dir "..\..\..\objs\release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
+# ADD CPP /nologo /Za /W3 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -51,7 +52,7 @@
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"lib\freetype200b8.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype202.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -62,12 +63,12 @@
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "obj/debug"
-# PROP Intermediate_Dir "obj/debug"
+# PROP Output_Dir "..\..\..\objs\debug"
+# PROP Intermediate_Dir "..\..\..\objs\debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
-# SUBTRACT CPP /X
+# ADD CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
+# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -75,7 +76,7 @@
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"lib\freetype200b8_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype202_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -86,13 +87,13 @@
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "obj/debug_mt"
-# PROP Intermediate_Dir "obj/debug_mt"
+# PROP Output_Dir "..\..\..\objs\debug_mt"
+# PROP Intermediate_Dir "..\..\..\objs\debug_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
# SUBTRACT BASE CPP /X
-# ADD CPP /nologo /MTd /Za /W3 /Gm /GX /ZI /Od /I "..\freetype\include\\" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /GZ /c
-# SUBTRACT CPP /X
+# ADD CPP /nologo /MTd /Za /W3 /Gm /GX /ZI /Od /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_DEBUG_LEVEL_ERROR" /D "FT_DEBUG_LEVEL_TRACE" /FD /GZ /c
+# SUBTRACT CPP /X /YX
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
@@ -100,7 +101,7 @@
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
-# ADD LIB32 /nologo /out:"lib\freetype200b8MT_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype202MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -111,11 +112,12 @@
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "obj/release_mt"
-# PROP Intermediate_Dir "obj/release_mt"
+# PROP Output_Dir "..\..\..\objs\release_mt"
+# PROP Intermediate_Dir "..\..\..\objs\release_mt"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
-# ADD CPP /nologo /MT /Za /W3 /GX /O2 /I "..\freetype\include\\" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FT_FLAT_COMPILE" /YX /FD /c
+# ADD CPP /nologo /MT /Za /W3 /GX /O2 /I "..\..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /FD /c
+# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
@@ -123,7 +125,7 @@
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
-# ADD LIB32 /nologo /out:"lib\freetype200b8MT.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype202MT.lib"
!ENDIF
@@ -138,67 +140,86 @@
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
-SOURCE=.\src\autohint\autohint.c
+SOURCE=..\..\..\src\autohint\autohint.c
+
+!IF "$(CFG)" == "freetype - Win32 Release"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
+
+!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
+
+!ENDIF
+
# End Source File
# Begin Source File
-SOURCE=.\src\cff\cff.c
+SOURCE=..\..\..\src\cff\cff.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftbase.c
+SOURCE=..\..\..\src\base\ftbase.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftdebug.c
+SOURCE=..\..\..\src\base\ftdebug.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftglyph.c
+SOURCE=..\..\..\src\base\ftglyph.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftinit.c
+SOURCE=..\..\..\src\base\ftinit.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftmm.c
+SOURCE=..\..\..\src\base\ftmm.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftsystem.c
+SOURCE=..\..\..\src\base\ftsystem.c
# End Source File
# Begin Source File
-SOURCE=.\src\psnames\psmodule.c
+SOURCE=..\..\..\src\pcf\pcf.c
# End Source File
# Begin Source File
-SOURCE=.\src\raster\raster.c
+SOURCE=..\..\..\src\psaux\psaux.c
# End Source File
# Begin Source File
-SOURCE=.\src\sfnt\sfnt.c
+SOURCE=..\..\..\src\psnames\psmodule.c
# End Source File
# Begin Source File
-SOURCE=.\src\smooth\smooth.c
+SOURCE=..\..\..\src\raster\raster.c
# End Source File
# Begin Source File
-SOURCE=.\src\truetype\truetype.c
+SOURCE=..\..\..\src\sfnt\sfnt.c
# End Source File
# Begin Source File
-SOURCE=.\src\cid\type1cid.c
+SOURCE=..\..\..\src\smooth\smooth.c
# End Source File
# Begin Source File
-SOURCE=.\src\type1\type1.c
+SOURCE=..\..\..\src\truetype\truetype.c
# End Source File
# Begin Source File
-SOURCE=.\src\winfonts\winfnt.c
+SOURCE=..\..\..\src\type1\type1.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\cid\type1cid.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\winfonts\winfnt.c
# End Source File
# End Group
# Begin Group "Header Files"
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -127,31 +127,73 @@
#error "no 32bit type found -- please check your configuration files"
#endif
+
+ /* determine wether we have a 64-bit int type for platforms without */
+ /* Autoconf.. */
+ /* */
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
-#define FT_LONG64
-#define FT_INT64 long
+# define FT_LONG64
+# define FT_INT64 long
-#else
+#elif defined(_MSC_VER) /* Visual C++ (and Intel C++) */
+ /* this compiler provides the __int64 type */
+# define FT_LONG64
+# define FT_INT64 __int64
+
+# elif defined(__BORLANDC__) /* Borland C++ */
+
+ /* XXXX: we should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version.. */
+
+ /* this compiler provides the __int64 type */
+# define FT_LONG64
+# define FT_INT64 __int64
+
+# elif defined(__WATCOMC__) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+# elif defined(__MWKS__) /* Metrowerks CodeWarrior */
+
+ /* I don't know if it provides 64-bit data types, any suggestion */
+ /* is welcomed there.. */
+
+# elif defined(__GNUC__)
+
+ /* GCC provides the "long long" type */
+# define FT_LONG64
+# define FT_INT64 long long int
+
+#endif /* !FT_LONG64 */
+
+
/*************************************************************************/
/* */
- /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
- /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
- /* `ftoption.h'. */
+ /* A 64-bit data type will create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable their use if */
+ /* __STDC__ is defined. You can however ignore this rule by */
+ /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro.. */
/* */
- /* Note that this will produce many -ansi warnings during library */
- /* compilation, and that in many cases, the generated code will be */
- /* neither smaller nor faster! */
- /* */
-#ifdef FTCALC_USE_LONG_LONG
+#if defined(FT_LONG64) && !defined(FT_CONFIG_OPTION_FORCE_INT64)
-#define FT_LONG64
-#define FT_INT64 long long
+# ifdef __STDC__
-#endif /* FTCALC_USE_LONG_LONG */
-#endif /* FT_SIZEOF_LONG == 8 */
+ /* undefine the 64-bit macros in strict ANSI compilation mode */
+# undef FT_LONG64
+# undef FT_INT64
+
+# endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
+
+
+
+
+
+
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -139,12 +139,22 @@
/*************************************************************************/
/* */
- /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
- /* activate it by defining the FTCALC_USE_LONG_LONG macro. Note that */
- /* this will produce many -ansi warnings during library compilation, and */
- /* that in many cases the generated code will not be smaller or faster! */
+ /* Many compilers provide a non-ANSI 64-bit data type that can be used */
+ /* by FreeType to speed up some computations. However, this will create */
+ /* some problems when compiling the library in strict ANSI mode. */
/* */
-#undef FTCALC_USE_LONG_LONG
+ /* For this reason, the use of 64-bit ints is normally disabled when */
+ /* the __STDC__ macro is defined. You can however disable this by */
+ /* defining here the macro FT_CONFIG_OPTION_FORCE_INT64 */
+ /* */
+ /* For most compilers, this will only create compilation warnings */
+ /* when building the library.. */
+ /* */
+ /* ObNote: the compiler-specific 64-bit integers are detected in the */
+ /* file "ftconfig.h" either statically, or through Autoconf */
+ /* on platforms that support it.. */
+ /* */
+#define FT_CONFIG_OPTION_FORCE_INT64
/*************************************************************************/
@@ -200,9 +210,9 @@
/* */
/* Don't define any of these macros to compile in `release' mode! */
/* */
-#undef FT_DEBUG_LEVEL_ERROR
-#undef FT_DEBUG_LEVEL_TRACE
+/* #define FT_DEBUG_LEVEL_ERROR */
+/* #define FT_DEBUG_LEVEL_TRACE */
/*************************************************************************/
/* */
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -1078,7 +1078,7 @@
FT_TRACE4(( " " ));
for ( maskbyte = 0;
- maskbyte < ( decoder->num_hints + 7 ) >> 3;
+ maskbyte < (FT_UInt)(( decoder->num_hints + 7 ) >> 3);
maskbyte++, ip++ )
{
FT_TRACE4(( "%02X", *ip ));