include/freetype/internal/internal.h: Fixed header inclusion macros to use direct definitions. This is the only way to do these things in a portable way :-( The rest of the code should follow shortly though everything compiles now. * builds/compiler/intelc.mk, builds/compiler/watcom.mk: New files. * builds/win32/detect.mk: Added support for the Intel C/C++ compiler, as well as _preliminary_ (read: doesn't work!) support for Watcom. Also added a new setup target. Type "make setup list" for a list of supported command-line compilers on Win32. * src/base/ftdebug.c: Added dummy symbol to avoid empty file if conditionals are off.
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 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472
diff --git a/ChangeLog b/ChangeLog
index f8eb4b0..f7afdb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,20 @@
2000-12-13 David Turner <david.turner@freetype.org>
* include/freetype/config/ft2build.h,
- include/freetype/internal/internal.h: fixed header inclusion macros
- to use direct definitions. This is the only way to do these things
- in a portable way :-( The rest of the code should follow shortly
- though everything compiles now..
+ include/freetype/internal/internal.h: Fixed header inclusion macros
+ to use direct definitions. This is the only way to do these things
+ in a portable way :-( The rest of the code should follow shortly
+ though everything compiles now.
- * builds/compiler/intelc.mk, builds/compiler/watcom.mk,
- builds/win32/detect.mk: added support for the Intel C/C++ compiler,
- as well as _preliminary_ (read: doesn't work !!) support for Watcom.
- Also added a new setup target. Type "make setup list" for a list
- of supported command-line compilers on Win32..
+ * builds/compiler/intelc.mk, builds/compiler/watcom.mk: New files.
+
+ * builds/win32/detect.mk: Added support for the Intel C/C++
+ compiler, as well as _preliminary_ (read: doesn't work!) support for
+ Watcom. Also added a new setup target. Type "make setup list" for
+ a list of supported command-line compilers on Win32.
+
+ * src/base/ftdebug.c: Added dummy symbol to avoid empty file if
+ conditionals are off.
2000-12-13 Werner Lemberg <wl@gnu.org>
diff --git a/builds/compiler/intelc.mk b/builds/compiler/intelc.mk
index 0b64f91..0c3088a 100644
--- a/builds/compiler/intelc.mk
+++ b/builds/compiler/intelc.mk
@@ -63,10 +63,10 @@ T := /Fo
# ANSI compliance.
#
# Note that the Intel C/C++ compiler version 4.5 complains about
-# the use of FT_FIELD_OFFSET with "value must be arithmetic type !!"
-# this really looks like a bug in the compiler because the macro
+# the use of FT_FIELD_OFFSET with "value must be arithmetic type"!
+# This really looks like a bug in the compiler because the macro
# _does_ compute an arithmetic value, so we disable this warning
-# with "/Qwd32" !!
+# with "/Qwd32".
#
ifndef CFLAGS
CFLAGS := /nologo /c /Ox /G5 /W3 /Qwd32
diff --git a/builds/compiler/visualc.mk b/builds/compiler/visualc.mk
index 432f7af..235a4df 100644
--- a/builds/compiler/visualc.mk
+++ b/builds/compiler/visualc.mk
@@ -70,6 +70,7 @@ endif
#
ANSIFLAGS := /Za
+
# Library linking
#
#CLEAN_LIBRARY =
diff --git a/builds/compiler/watcom.mk b/builds/compiler/watcom.mk
index aae26dd..e1e2d11 100644
--- a/builds/compiler/watcom.mk
+++ b/builds/compiler/watcom.mk
@@ -17,12 +17,14 @@
#
CC := wcc386
+
# 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.
#
diff --git a/builds/win32/detect.mk b/builds/win32/detect.mk
index 228ac29..055de02 100644
--- a/builds/win32/detect.mk
+++ b/builds/win32/detect.mk
@@ -27,11 +27,11 @@ ifeq ($(PLATFORM),ansi)
is_windows := 1
endif
- # We test for the COMSPEC environment variable, then run the `ver'
- # command-line program to see if its output contains the word `Windows'.
- #
- # If this is true, we are running a win32 platform (or an emulation).
- #
+ # We test for the COMSPEC environment variable, then run the `ver'
+ # command-line program to see if its output contains the word `Windows'.
+ #
+ # If this is true, we are running a win32 platform (or an emulation).
+ #
else
ifneq ($(OSTYPE),cygwin)
ifdef COMSPEC
@@ -42,29 +42,29 @@ ifeq ($(PLATFORM),ansi)
ifdef is_windows
- PLATFORM := win32
- DELETE := del
- COPY := copy
- CONFIG_FILE := none
+ PLATFORM := win32
+ DELETE := del
+ COPY := copy
+ CONFIG_FILE := none
ifneq ($(findstring list,$(MAKECMDGOALS)),) # test for the "list" target
.PHONY: dump_target_list setup list
dump_target_list:
- @echo ˙
- @echo $(PROJECT_TITLE) build system -- supported compilers
- @echo ˙
- @echo Several command-line compilers are supported on Win32:
- @echo ˙
- @echo ˙˙make setup˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙gcc (with Mingw)
- @echo ˙˙make setup visualc˙˙˙˙˙˙˙˙˙˙˙˙˙Microsoft Visual C++
- @echo ˙˙make setup bcc32˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Borland C/C++
- @echo ˙˙make setup lcc˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Win32-LCC
- @echo ˙˙make setup intelc˙˙˙˙˙˙˙˙˙˙˙˙˙˙Intel C/C++
- @echo ˙
-
- setup: dump_target_list
+ @echo ˙
+ @echo $(PROJECT_TITLE) build system -- supported compilers
+ @echo ˙
+ @echo Several command-line compilers are supported on Win32:
+ @echo ˙
+ @echo ˙˙make setup˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙gcc (with Mingw)
+ @echo ˙˙make setup visualc˙˙˙˙˙˙˙˙˙˙˙˙˙Microsoft Visual C++
+ @echo ˙˙make setup bcc32˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Borland C/C++
+ @echo ˙˙make setup lcc˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙Win32-LCC
+ @echo ˙˙make setup intelc˙˙˙˙˙˙˙˙˙˙˙˙˙˙Intel C/C++
+ @echo ˙
+
+ setup: dump_target_list
else # test "list"
@@ -104,9 +104,10 @@ ifeq ($(PLATFORM),ansi)
CC := icl
intelc: setup
endif
-#
-# The following build targets are not officialy supported for now
-#
+
+ #
+ # The following build targets are not officially supported for now
+ #
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
diff --git a/builds/win32/w32-intl.mk b/builds/win32/w32-intl.mk
index 1b2b4e9..6ae022f 100644
--- a/builds/win32/w32-intl.mk
+++ b/builds/win32/w32-intl.mk
@@ -1,5 +1,5 @@
#
-# FreeType 2 Intel C/C++ on Win32
+# FreeType 2 configuration rules for Intel C/C++ on Win32
#
diff --git a/include/freetype/cache/ftcchunk.h b/include/freetype/cache/ftcchunk.h
index 145c8bc..f5ed7eb 100644
--- a/include/freetype/cache/ftcchunk.h
+++ b/include/freetype/cache/ftcchunk.h
@@ -55,7 +55,7 @@ FT_BEGIN_HEADER
/* maximum number of chunk sets in a given chunk cache */
-#define FTC_MAX_CHUNK_SETS 16
+#define FTC_MAX_CHUNK_SETS 16
typedef struct FTC_ChunkNodeRec_* FTC_ChunkNode;
diff --git a/include/freetype/cache/ftcimage.h b/include/freetype/cache/ftcimage.h
index e8a25bb..58ed204 100644
--- a/include/freetype/cache/ftcimage.h
+++ b/include/freetype/cache/ftcimage.h
@@ -46,25 +46,25 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define FTC_IMAGE_FORMAT( x ) ( (x) & 7 )
+#define FTC_IMAGE_FORMAT( x ) ( (x) & 7 )
-#define ftc_image_format_bitmap 0
-#define ftc_image_format_outline 1
+#define ftc_image_format_bitmap 0
+#define ftc_image_format_outline 1
-#define ftc_image_flag_monochrome 16
-#define ftc_image_flag_unhinted 32
-#define ftc_image_flag_autohinted 64
-#define ftc_image_flag_unscaled 128
-#define ftc_image_flag_no_sbits 256
+#define ftc_image_flag_monochrome 16
+#define ftc_image_flag_unhinted 32
+#define ftc_image_flag_autohinted 64
+#define ftc_image_flag_unscaled 128
+#define ftc_image_flag_no_sbits 256
/* monochrome bitmap */
-#define ftc_image_mono ftc_image_format_bitmap | \
+#define ftc_image_mono ftc_image_format_bitmap | \
ftc_image_flag_monochrome
/* anti-aliased bitmap */
-#define ftc_image_grays ftc_image_format_bitmap
+#define ftc_image_grays ftc_image_format_bitmap
/* scaled outline */
-#define ftc_image_outline ftc_image_format_outline
+#define ftc_image_outline ftc_image_format_outline
/*************************************************************************/
diff --git a/include/freetype/config/ft2build.h b/include/freetype/config/ft2build.h
index 093aa2e..13603f0 100644
--- a/include/freetype/config/ft2build.h
+++ b/include/freetype/config/ft2build.h
@@ -47,13 +47,13 @@
/* this macro is used to enclose its argument in brackets */
-#define FT2_ENCLOSE(x) <x>
+#define FT2_ENCLOSE(x) <x>
/* this macro is used to join a path and a file name */
-#define FT2_JOINPATH(d,x) d/x
+#define FT2_JOINPATH(d,x) d/x
/* this macro is used to format a path in "<d/x>" format easily */
-#define FT2_PUBLIC_PATH(d,x) FT2_ENCLOSE(d/x)
+#define FT2_PUBLIC_PATH(d,x) FT2_ENCLOSE(d/x)
diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h
index efac5ee..0fcca41 100644
--- a/include/freetype/ftcache.h
+++ b/include/freetype/ftcache.h
@@ -42,13 +42,13 @@
FT_BEGIN_HEADER
-#define FT_CACHE_MANAGER_H FT2_PUBLIC_FILE(cache/ftcmanag.h)
-#define FT_CACHE_IMAGE_H FT2_PUBLIC_FILE(cache/ftcimage.h)
-#define FT_CACHE_SMALL_BITMAPS_H FT2_PUBLIC_FILE(cache/ftcsbits.h)
+#define FT_CACHE_MANAGER_H FT2_PUBLIC_FILE(cache/ftcmanag.h)
+#define FT_CACHE_IMAGE_H FT2_PUBLIC_FILE(cache/ftcimage.h)
+#define FT_CACHE_SMALL_BITMAPS_H FT2_PUBLIC_FILE(cache/ftcsbits.h)
-#define FT_CACHE_INTERNAL_LRU_H FT2_PUBLIC_FILE(cache/ftlru.h)
-#define FT_CACHE_INTERNAL_GLYPH_H FT2_PUBLIC_FILE(cache/ftcglyph.h)
-#define FT_CACHE_INTERNAL_CHUNK_H FT2_PUBLIC_FILE(cache/ftcchunk.h)
+#define FT_CACHE_INTERNAL_LRU_H FT2_PUBLIC_FILE(cache/ftlru.h)
+#define FT_CACHE_INTERNAL_GLYPH_H FT2_PUBLIC_FILE(cache/ftcglyph.h)
+#define FT_CACHE_INTERNAL_CHUNK_H FT2_PUBLIC_FILE(cache/ftcchunk.h)
/*************************************************************************/
diff --git a/include/freetype/internal/cfftypes.h b/include/freetype/internal/cfftypes.h
index c2a3d85..ff8d375 100644
--- a/include/freetype/internal/cfftypes.h
+++ b/include/freetype/internal/cfftypes.h
@@ -20,8 +20,10 @@
#ifndef __CFFTYPES_H__
#define __CFFTYPES_H__
-#include <ft2build.h>
-#include FT_FREETYPE_H
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
FT_BEGIN_HEADER
diff --git a/include/freetype/internal/fnttypes.h b/include/freetype/internal/fnttypes.h
index 080770d..446b4b1 100644
--- a/include/freetype/internal/fnttypes.h
+++ b/include/freetype/internal/fnttypes.h
@@ -67,8 +67,8 @@ FT_BEGIN_HEADER
} WinResourceInfo;
-#define WINFNT_MZ_MAGIC 0x5A4D
-#define WINFNT_NE_MAGIC 0x454E
+#define WINFNT_MZ_MAGIC 0x5A4D
+#define WINFNT_NE_MAGIC 0x454E
typedef struct WinFNT_Header_
diff --git a/src/autohint/ahangles.c b/src/autohint/ahangles.c
index 7187852..812b021 100644
--- a/src/autohint/ahangles.c
+++ b/src/autohint/ahangles.c
@@ -20,8 +20,8 @@
/***************************************************************************/
-#include <ft2build.h>
-#include FT_SOURCE_FILE(autohint,ahangles.h)
+#include <ft2build.h>
+#include FT_SOURCE_FILE(autohint,ahangles.h)
/* the following table has been automatically generated with */
diff --git a/src/autohint/ahmodule.h b/src/autohint/ahmodule.h
index ce8daa1..f6643d2 100644
--- a/src/autohint/ahmodule.h
+++ b/src/autohint/ahmodule.h
@@ -23,8 +23,8 @@
#define __AHMODULE_H__
-#include <ft2build.h>
-#include FT_MODULE_H
+#include <ft2build.h>
+#include FT_MODULE_H
FT_BEGIN_HEADER
diff --git a/src/base/ftdebug.c b/src/base/ftdebug.c
index f954987..f2a2237 100644
--- a/src/base/ftdebug.c
+++ b/src/base/ftdebug.c
@@ -107,7 +107,9 @@
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
- /* needed by pedantic ANSI compilers */
+
+ /* ANSI C doesn't allow empty files, so we insert a dummy symbol */
extern const int ft_debug_dummy;
+
/* END */
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index de73815..adb295b 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -26,7 +26,7 @@
#include <string.h> /* memcmp() */
-#define FTC_SBITSET_ELEMENT_COUNT 16
+#define FTC_SBITSET_ELEMENT_COUNT 16
typedef struct FTC_SBitSetRec_
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 06875c8..bbde59a 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -442,7 +442,7 @@
static const CFF_Field_Handler cff_field_handlers[] =
{
-#include FT_SOURCE_FILE(cff,cfftoken.h)
+#include FT_SOURCE_FILE(cff,cfftoken.h)
{ 0, 0, 0, 0, 0, 0, 0 }
};
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index 7dceb0e..a105320 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -31,8 +31,8 @@
/* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
/* messages during execution. */
/* */
-#undef FT_COMPONENT
-#define FT_COMPONENT trace_cidobjs
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_cidobjs
/*************************************************************************/
diff --git a/src/sfnt/sfnt.c b/src/sfnt/sfnt.c
index d605ac8..91fce49 100644
--- a/src/sfnt/sfnt.c
+++ b/src/sfnt/sfnt.c
@@ -18,18 +18,18 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
-#include <ft2build.h>
-#include FT_SOURCE_FILE(sfnt,ttload.c)
-#include FT_SOURCE_FILE(sfnt,ttcmap.c)
-#include FT_SOURCE_FILE(sfnt,sfobjs.c)
-#include FT_SOURCE_FILE(sfnt,sfdriver.c)
+#include <ft2build.h>
+#include FT_SOURCE_FILE(sfnt,ttload.c)
+#include FT_SOURCE_FILE(sfnt,ttcmap.c)
+#include FT_SOURCE_FILE(sfnt,sfobjs.c)
+#include FT_SOURCE_FILE(sfnt,sfdriver.c)
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-#include FT_SOURCE_FILE(sfnt,ttsbit.c)
+#include FT_SOURCE_FILE(sfnt,ttsbit.c)
#endif
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-#include FT_SOURCE_FILE(sfnt,ttpost.c)
+#include FT_SOURCE_FILE(sfnt,ttpost.c)
#endif
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index c2ee53e..5fcf066 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -61,7 +61,7 @@
/* table of Mac names. Thus, it is possible to build a version of */
/* FreeType without the Type 1 driver & PSNames module. */
-#define MAC_NAME( x ) TT_Post_Default_Names[x]
+#define MAC_NAME( x ) TT_Post_Default_Names[x]
/* the 258 default Mac PS glyph names */
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index ca863b7..0a9c849 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -122,11 +122,11 @@
#else /* _STANDALONE_ */
-#include <ft2build.h>
-#include FT_SOURCE_FILE(smooth,ftgrays.h)
-#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_DEBUG_H
-#include FT_OUTLINE_H
+#include <ft2build.h>
+#include FT_SOURCE_FILE(smooth,ftgrays.h)
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_OUTLINE_H
#define ErrRaster_Invalid_Mode FT_Err_Cannot_Render_Glyph
#define ErrRaster_Invalid_Outline FT_Err_Invalid_Outline
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index f60b55c..d73cf94 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -6841,8 +6841,8 @@
FT_Byte opcode = CUR.opcode;
-#undef ARRAY_BOUND_ERROR
-#define ARRAY_BOUND_ERROR goto Set_Invalid_Ref
+#undef ARRAY_BOUND_ERROR
+#define ARRAY_BOUND_ERROR goto Set_Invalid_Ref
switch ( opcode )