* 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
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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
diff --git a/ChangeLog b/ChangeLog
index 3529b07..8102a5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-04-20 David Turner <david@freetype.org>
+
+ * 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 <tjk@ams.org>
* t1load.c (parse_charstrings): Changed code for placing .notdef
diff --git a/builds/win32/visualc/freetype.dsp b/builds/win32/visualc/freetype.dsp
index 5379da6..831bc18 100644
--- a/builds/win32/visualc/freetype.dsp
+++ b/builds/win32/visualc/freetype.dsp
@@ -39,11 +39,12 @@ RSC=rc.exe
# 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 @@ BSC32=bscmake.exe
# 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 @@ LIB32=link.exe -lib
# 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 @@ BSC32=bscmake.exe
# 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 @@ LIB32=link.exe -lib
# 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 @@ BSC32=bscmake.exe
# 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 @@ LIB32=link.exe -lib
# 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 @@ BSC32=bscmake.exe
# 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 @@ LIB32=link.exe -lib
# 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
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\src\base\ftbase.c
# End Source File
# Begin Source File
-SOURCE=.\src\cff\cff.c
+SOURCE=..\..\..\src\base\ftdebug.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftbase.c
+SOURCE=..\..\..\src\base\ftglyph.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftdebug.c
+SOURCE=..\..\..\src\base\ftinit.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftglyph.c
+SOURCE=..\..\..\src\base\ftmm.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftinit.c
+SOURCE=..\..\..\src\base\ftsystem.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftmm.c
+SOURCE=..\..\..\src\pcf\pcf.c
# End Source File
# Begin Source File
-SOURCE=.\src\base\ftsystem.c
+SOURCE=..\..\..\src\psaux\psaux.c
# End Source File
# Begin Source File
-SOURCE=.\src\psnames\psmodule.c
+SOURCE=..\..\..\src\psnames\psmodule.c
# End Source File
# Begin Source File
-SOURCE=.\src\raster\raster.c
+SOURCE=..\..\..\src\raster\raster.c
# End Source File
# Begin Source File
-SOURCE=.\src\sfnt\sfnt.c
+SOURCE=..\..\..\src\sfnt\sfnt.c
# End Source File
# Begin Source File
-SOURCE=.\src\smooth\smooth.c
+SOURCE=..\..\..\src\smooth\smooth.c
# End Source File
# Begin Source File
-SOURCE=.\src\truetype\truetype.c
+SOURCE=..\..\..\src\truetype\truetype.c
# End Source File
# Begin Source File
-SOURCE=.\src\cid\type1cid.c
+SOURCE=..\..\..\src\type1\type1.c
# End Source File
# Begin Source File
-SOURCE=.\src\type1\type1.c
+SOURCE=..\..\..\src\cid\type1cid.c
# End Source File
# Begin Source File
-SOURCE=.\src\winfonts\winfnt.c
+SOURCE=..\..\..\src\winfonts\winfnt.c
# End Source File
# End Group
# Begin Group "Header Files"
diff --git a/include/freetype/config/ftconfig.h b/include/freetype/config/ftconfig.h
index 2c2d381..b419164 100644
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -127,31 +127,73 @@ FT_BEGIN_HEADER
#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
+
+#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 */
-#else
/*************************************************************************/
/* */
- /* 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'. */
- /* */
- /* 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! */
+ /* 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.. */
/* */
-#ifdef FTCALC_USE_LONG_LONG
+#if defined(FT_LONG64) && !defined(FT_CONFIG_OPTION_FORCE_INT64)
+
+# ifdef __STDC__
+
+ /* 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 */
+
+
+
+
-#define FT_LONG64
-#define FT_INT64 long long
-#endif /* FTCALC_USE_LONG_LONG */
-#endif /* FT_SIZEOF_LONG == 8 */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 5c3973c..58f1217 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -139,12 +139,22 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* 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 @@ FT_BEGIN_HEADER
/* */
/* 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 */
/*************************************************************************/
/* */
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 4850e3d..4764e71 100644
--- 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 ));