Formatting, copyright years.
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 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877
diff --git a/ChangeLog b/ChangeLog
index 6c50dc3..a20e8b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,35 +1,66 @@
2006-01-27 David Turner <david@freetype.org>
- * src/autofit/afwarp.c: simple #ifdef to prevent compilation when
- the warp hinter isn't active (it shouldn't, still experimental)
-
- * Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
- and "otvalid" from the list of modules that are linked statically
- to a given FreeType library. Functionality has been moved to the
- "ftvalid" CVS module.
-
- note also that current Make-based build system still compiles the
- modules though...
-
- * include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
- which controls the definitions of the memory management functions
- to avoid warnings with recent versions of GCC. this macro is
- only here to be disabled, in case we detect problems with the
- new scheme.
-
- NOTE: disable macro to use the memory debugger. this will be fixed
- later !!
-
- * builds/win32/visualc/freetype.dsp: updating project file to
- define FT2_BUILD_LIBRARY, and remove gxvalid+otvalid from
- compilation
-
- * builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY
- when compiling the library.
-
- * include/freetype/config/ftheader.h: remove inclusions of
- internal headers, except if the macro FT2_BUILD_LIBRARY is defined.
-
+ * src/autofit/afwarp.c: Simple #ifdef to prevent compilation when
+ the warp hinter isn't active (it shouldn't, still experimental).
+
+ * Jamfile, include/freetype/config/ftmodule.h: Removed `gxvalid'
+ and `otvalid' from the list of modules that are linked statically
+ to a given FreeType library. Functionality has been moved to the
+ `ftvalid' CVS module.
+
+ Note also that current Make-based build system still compiles the
+ modules though.
+
+ * include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro
+ which controls the definitions of the memory management functions to
+ avoid warnings with recent versions of GCC. This macro is only here
+ to be disabled, in case we detect problems with the new scheme.
+
+ NOTE: Disable macro to use the memory debugger -- this will be fixed
+ later!
+
+ * include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc,
+ FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]:
+ New versions.
+
+
+ * builds/win32/visualc/freetype.dsp: Updating project file to
+ define FT2_BUILD_LIBRARY, and remove gxvalid + otvalid modules from
+ compilation.
+
+
+ * builds/freetype.mk (FT_CFLAGS), Jamfile (DEFINES): Define the
+ macro FT2_BUILD_LIBRARY when compiling the library.
+
+ * include/freetype/config/ftheader.h: Remove inclusions of internal
+ headers except if the macro FT2_BUILD_LIBRARY is defined.
+
+
+ * include/freetype/internal/psaux.h (AFM_KernPair, AFM_TrackKern,
+ AFM_FontInfo): Move structure declarations to...
+ * include/freetype/internal/t1types.h: This file.
+
+
+ * (many files): Fix compiler warnings.
+ Various minor reorganizations.
+
+
+ * src/cff/cffload.c (cff_font_done): Don't free static array
+ `subfonts'.
+
+ * src/otvalid/otvcommn.c (otv_ClassDef_validate),
+ src/otvalid/otvgpos.c (otv_x_sxy): Fix debugging information.
+
+ * src/psaux/afmparse.c: Include ft2build.h and FT_FREETYPE_H.
+ (AFM_MAX_ARGUMENTS): Define...
+ * src/psaux/afmparse.h: Here.
+ * src/psaux/Jamfile (_sources): Add afmparse.
+
+ * src/psaux/psconv.c: Include psconv.h.
+
+ * src/type1/t1afm.c: Don't include FT_INTERNAL_TYPE1_TYPES_H but
+ FT_INTERNAL_POSTSCRIPT_AUX_H.
+ * src/type1/t1afm.h: Include FT_INTERNAL_TYPE1_TYPES_H.
2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
diff --git a/Jamfile b/Jamfile
index 471c298..d75c666 100644
--- a/Jamfile
+++ b/Jamfile
@@ -1,6 +1,6 @@
# FreeType 2 top Jamfile.
#
-# Copyright 2001, 2002, 2003, 2004, 2005 by
+# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
diff --git a/builds/freetype.mk b/builds/freetype.mk
index 6f7abd4..a87f7fe 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005 by
+# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -133,9 +133,9 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
# old FreeType versions.
#
-# note what we also define the macro FT2_BUILD_LIBRARY when building
-# FreeType. this is required to let our sources include the internal
-# headers (something forbidden by clients)
+# Note what we also define the macro FT2_BUILD_LIBRARY when building
+# FreeType. This is required to let our sources include the internal
+# headers (something forbidden by clients).
#
FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY
FT_CC = $(CC) $(FT_CFLAGS)
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index 2b08b53..4062fdb 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -626,14 +626,17 @@
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
-/* now include internal headers definitions from <freetype/internal/...>
- * only when we're building the library !!
- */
+
+ /*
+ * Include internal headers definitions from <freetype/internal/...>
+ * only when building the library.
+ */
#ifdef FT2_BUILD_LIBRARY
-# define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
-# include FT_INTERNAL_INTERNAL_H
+#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
+
#endif /* __FT2_BUILD_H__ */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index ab5d156..2bc6151 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -556,20 +556,22 @@ FT_BEGIN_HEADER
/* */
-/*
- * This temporary macro is used to control various optimizations for
- * reducing the heap footprint of memory-mapped TrueType files.
- *
- */
+ /*
+ * This temporary macro is used to control various optimizations for
+ * reducing the heap footprint of memory-mapped TrueType files.
+ */
#define FT_OPTIMIZE_MEMORY
-/* this temporary macro is used to control wether we're going to
- * compile certain functions like FT_Alloc in a way that prevent recent
- * GCC releases from spouting horrible "strict aliasing" warning
- * messages each time a memory-management function is called
- */
+
+ /*
+ * This temporary macro is used to control whether we are going to
+ * compile certain functions like FT_Alloc in a way that prevents recent
+ * GCC releases from emitting zillions of `strict aliasing' warning
+ * messages each time a memory-management function is called.
+ */
#define FT_STRICT_ALIASING
+
FT_END_HEADER
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index 30e77e3..8543642 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -56,11 +56,15 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
+
#ifdef FT_STRICT_ALIASING
- /* the allocation functions return a pointer, and the error code
- * is written to through the 'p_error' parameter
- */
+
+ /*
+ * The allocation functions return a pointer, and the error code
+ * is written to through the `p_error' parameter. See below for
+ * for documentation.
+ */
FT_BASE( FT_Pointer )
FT_Alloc( FT_Memory memory,
@@ -91,7 +95,8 @@ FT_BEGIN_HEADER
const void* P );
-# ifdef FT_DEBUG_MEMORY
+#ifdef FT_DEBUG_MEMORY
+
FT_BASE( FT_Pointer )
FT_Alloc_Debug( FT_Memory memory,
@@ -132,64 +137,71 @@ FT_BEGIN_HEADER
const char* file_name,
FT_Long line_no );
-# define FT_MEM_ALLOC( _pointer_, _size_ ) \
+#define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \
- __FILE__, __LINE__ )
+ __FILE__, __LINE__ )
-# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
- (_pointer_), &error, \
- __FILE__, __LINE__ )
+#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
+ (_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
+ (_pointer_), &error, \
+ __FILE__, __LINE__ )
-# define FT_MEM_QALLOC( _pointer_, _size_ ) \
+#define FT_MEM_QALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \
- __FILE__, __LINE__ )
+ __FILE__, __LINE__ )
-# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
- (_pointer_), &error, \
- __FILE__, __LINE__ )
+#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
+ (_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
+ (_pointer_), &error, \
+ __FILE__, __LINE__ )
+
+#define FT_MEM_FREE( _pointer_ ) \
+ FT_BEGIN_STMNT \
+ if ( _pointer_ ) \
+ { \
+ FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
+ (_pointer_) = NULL; \
+ } \
+ FT_END_STMNT
-# define FT_MEM_FREE( _pointer_ ) \
- FT_BEGIN_STMNT \
- if ( _pointer_ ) { \
- FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
- (_pointer_) = NULL; \
- } \
- FT_END_STMNT
+#else /* !FT_DEBUG_MEMORY */
-# else /* !FT_DEBUG_MEMORY */
-# define FT_MEM_ALLOC( _pointer_, _size_ ) \
+#define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc( memory, _size_, &error )
-# define FT_MEM_FREE( _pointer_ ) \
- FT_BEGIN_STMNT \
- if ( (_pointer_) ) { \
- FT_Free( memory, (_pointer_) ); \
- (_pointer_) = NULL; \
- } \
- FT_END_STMNT
-
-# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_Realloc( memory, _current_, _size_, \
+#define FT_MEM_FREE( _pointer_ ) \
+ FT_BEGIN_STMNT \
+ if ( (_pointer_) ) \
+ { \
+ FT_Free( memory, (_pointer_) ); \
+ (_pointer_) = NULL; \
+ } \
+ FT_END_STMNT
+
+#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
+ (_pointer_) = FT_Realloc( memory, _current_, _size_, \
(_pointer_), &error )
-# define FT_MEM_QALLOC( _pointer_, _size_ ) \
+#define FT_MEM_QALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_QAlloc( memory, _size_, &error )
-# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
- (_pointer_) = FT_QRealloc( memory, _current_, _size_, \
+#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
+ (_pointer_) = FT_QRealloc( memory, _current_, _size_, \
(_pointer_), &error )
-# endif /* !FT_DEBUG_MEMORY */
+#endif /* !FT_DEBUG_MEMORY */
+
+
+#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
-# define FT_MEM_SET_ERROR(cond) ( (cond), error != 0 )
#else /* !FT_STRICT_ALIASING */
-# ifdef FT_DEBUG_MEMORY
+
+#ifdef FT_DEBUG_MEMORY
+
FT_BASE( FT_Error )
FT_Alloc_Debug( FT_Memory memory,
@@ -227,8 +239,8 @@ FT_BEGIN_HEADER
const char* file_name,
FT_Long line_no );
-# endif /* FT_DEBUG_MEMORY */
+#endif /* FT_DEBUG_MEMORY */
/*************************************************************************/
@@ -383,8 +395,10 @@ FT_BEGIN_HEADER
FT_Free( FT_Memory memory,
void* *P );
+
#ifdef FT_DEBUG_MEMORY
+
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
@@ -410,7 +424,7 @@ FT_BEGIN_HEADER
__FILE__, __LINE__ )
-#else /* !FT_DEBUG_MEMORY */
+#else /* !FT_DEBUG_MEMORY */
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
@@ -433,12 +447,14 @@ FT_BEGIN_HEADER
FT_QRealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
+
#endif /* !FT_DEBUG_MEMORY */
-# define FT_MEM_SET_ERROR(cond) ( (error = (cond)) != 0 )
-#endif /* !FT_STRICT_ALIASING */
+#define FT_MEM_SET_ERROR( cond ) ( ( error = (cond) ) != 0 )
+
+#endif /* !FT_STRICT_ALIASING */
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
@@ -472,7 +488,6 @@ FT_BEGIN_HEADER
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
-
/*************************************************************************/
/* */
/* The following functions macros expect that their pointer argument is */
@@ -517,21 +532,19 @@ FT_BEGIN_HEADER
/* */
/* The following macros are variants of their FT_MEM_XXXX equivalents; */
/* they are used to set an _implicit_ `error' variable and return TRUE */
- /* if an error occured (i.e. if 'error != 0'). */
+ /* if an error occured (i.e., if 'error != 0'). */
/* */
-
-
-#define FT_ALLOC( _pointer_, _size_ ) \
+#define FT_ALLOC( _pointer_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
-#define FT_REALLOC( _pointer_, _current_, _size_ ) \
+#define FT_REALLOC( _pointer_, _current_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_REALLOC( _pointer_, _current_, _size_ ) )
-#define FT_QALLOC( _pointer_, _size_ ) \
+#define FT_QALLOC( _pointer_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_QALLOC( _pointer_, _size_ ) )
-#define FT_QREALLOC( _pointer_, _current_, _size_ ) \
+#define FT_QREALLOC( _pointer_, _current_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) )
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index f856de1..7a88294 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -5,7 +5,7 @@
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
/* bitmaps into 8bpp format (body). */
/* */
-/* Copyright 2004, 2005 by */
+/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 4ba53c7..7afd630 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -267,8 +267,8 @@
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
FT_ULong size )
{
- FT_Memory memory = FT_FACE_MEMORY( slot->face );
- FT_Error error;
+ FT_Memory memory = FT_FACE_MEMORY( slot->face );
+ FT_Error error;
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
@@ -1724,10 +1724,10 @@
if ( FT_IS_SCALABLE( face ) )
{
if ( face->height < 0 )
- face->height = (short)-face->height;
+ face->height = (FT_Short)-face->height;
if ( !FT_HAS_VERTICAL( face ) )
- face->max_advance_height = (short)face->height;
+ face->max_advance_height = (FT_Short)face->height;
}
if ( FT_HAS_FIXED_SIZES( face ) )
@@ -1741,9 +1741,9 @@
if ( bsize->height < 0 )
- bsize->height = (FT_Short) -bsize->height;
+ bsize->height = (FT_Short)-bsize->height;
if ( bsize->x_ppem < 0 )
- bsize->x_ppem = (FT_Short) -bsize->x_ppem;
+ bsize->x_ppem = (FT_Short)-bsize->x_ppem;
if ( bsize->y_ppem < 0 )
bsize->y_ppem = -bsize->y_ppem;
}
@@ -2087,8 +2087,8 @@
metrics = &face->size->metrics;
bsize = face->available_sizes + strike_index;
- metrics->x_ppem = (FT_UShort)(( bsize->x_ppem + 32 ) >> 6);
- metrics->y_ppem = (FT_UShort)(( bsize->y_ppem + 32 ) >> 6);
+ metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
+ metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
if ( FT_IS_SCALABLE( face ) )
{
@@ -2199,8 +2199,8 @@
scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
}
- metrics->x_ppem = (FT_UShort)(( scaled_w + 32 ) >> 6);
- metrics->y_ppem = (FT_UShort)(( scaled_h + 32 ) >> 6);
+ metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
+ metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
ft_recompute_scaled_metrics( face, metrics );
}
diff --git a/src/base/ftrfork.c b/src/base/ftrfork.c
index 3b92247..5d44ca4 100644
--- a/src/base/ftrfork.c
+++ b/src/base/ftrfork.c
@@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
-/* Copyright 2004, 2005 by */
+/* Copyright 2004, 2005, 2006 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
diff --git a/src/base/ftutil.c b/src/base/ftutil.c
index 6ed1db2..cb99f88 100644
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -45,6 +45,7 @@
/*************************************************************************/
/*************************************************************************/
+
#ifdef FT_STRICT_ALIASING
@@ -53,9 +54,10 @@
FT_Long size,
FT_Error *p_error )
{
- FT_Error error = 0;
+ FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
+
if ( size > 0 )
{
block = memory->alloc( memory, size );
@@ -64,6 +66,7 @@
else
FT_MEM_ZERO( block, size );
}
+
*p_error = error;
return block;
}
@@ -74,15 +77,17 @@
FT_Long size,
FT_Error *p_error )
{
- FT_Error error = 0;
+ FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
+
if ( size > 0 )
{
block = memory->alloc( memory, size );
if ( block == NULL )
error = FT_Err_Out_Of_Memory;
}
+
*p_error = error;
return block;
}
@@ -95,8 +100,9 @@
void* block,
FT_Error *p_error )
{
- FT_Error error = 0;
+ FT_Error error = FT_Err_Ok;
+
if ( size <= 0 )
{
FT_Free( memory, block );
@@ -112,6 +118,7 @@
{
FT_Pointer block2;
+
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
@@ -122,6 +129,7 @@
FT_MEM_ZERO( (char*)block + current, size-current );
}
}
+
*p_error = error;
return block;
}
@@ -134,8 +142,9 @@
void* block,
FT_Error *p_error )
{
- FT_Error error = 0;
+ FT_Error error = FT_Err_Ok;
+
if ( size <= 0 )
{
FT_Free( memory, block );
@@ -151,15 +160,16 @@
{
FT_Pointer block2;
+
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
else
block = block2;
}
+
*p_error = error;
return block;
-
}
FT_BASE_DEF( void )
@@ -170,8 +180,10 @@
memory->free( memory, (void*)P );
}
+
#else /* !FT_STRICT_ALIASING */
+
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index a4e6b1d..22ec06c 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 5556565..6d73e98 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -2293,8 +2293,6 @@
{
for ( idx = 0; idx < font->num_subfonts; idx++ )
cff_subfont_done( memory, font->subfonts[idx] );
-
- /* FT_FREE( font->subfonts ); -- bug this is a static array !! */
}
cff_encoding_done( &font->encoding );
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index bfbcbf9..ff0753f 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002, 2003, 2004, 2005 by */
+/* Copyright 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/otvalid/otvcommn.c b/src/otvalid/otvcommn.c
index 293960f..d94e4f3 100644
--- a/src/otvalid/otvcommn.c
+++ b/src/otvalid/otvcommn.c
@@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (body). */
/* */
-/* Copyright 2004, 2005 by */
+/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c
index d21d8ea..ed34705 100644
--- a/src/otvalid/otvgpos.c
+++ b/src/otvalid/otvgpos.c
@@ -4,7 +4,7 @@
/* */
/* OpenType GPOS table validation (body). */
/* */
-/* Copyright 2002, 2004, 2005 by */
+/* Copyright 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 1270400..60191e8 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -480,7 +480,7 @@
FT_UInt probe = power * size;
FT_UInt extra = count - power;
FT_Byte* base = stream->cursor;
- FT_Bool twobytes = FT_BOOL(item->flags & 1);
+ FT_Bool twobytes = FT_BOOL( item->flags & 1 );
FT_Byte* p;
FT_UInt32 cpair;
diff --git a/src/psaux/afmparse.c b/src/psaux/afmparse.c
index 27d0c13..33fbded 100644
--- a/src/psaux/afmparse.c
+++ b/src/psaux/afmparse.c
@@ -397,16 +397,17 @@
{
case AFM_VALUE_TYPE_STRING:
case AFM_VALUE_TYPE_NAME:
- {
- FT_Memory memory = parser->memory;
- FT_Error error;
-
- if ( !FT_QALLOC( val->u.s, len + 1 ) )
- {
- ft_memcpy( val->u.s, str, len );
- val->u.s[len] = '\0';
- }
- }
+ {
+ FT_Memory memory = parser->memory;
+ FT_Error error;
+
+
+ if ( !FT_QALLOC( val->u.s, len + 1 ) )
+ {
+ ft_memcpy( val->u.s, str, len );
+ val->u.s[len] = '\0';
+ }
+ }
break;
case AFM_VALUE_TYPE_FIXED:
@@ -880,6 +881,7 @@
{
AFM_ValueRec shared_vals[1];
+
shared_vals[0].type = AFM_VALUE_TYPE_BOOL;
if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )
goto Fail;
diff --git a/src/psaux/psconv.c b/src/psaux/psconv.c
index 0fb19ee..90d8e3e 100644
--- a/src/psaux/psconv.c
+++ b/src/psaux/psconv.c
@@ -352,10 +352,10 @@
break;
if ( r % 2 )
- {
+ {
*buffer = (FT_Byte)(*buffer + c);
- buffer++;
- }
+ buffer++;
+ }
else
*buffer = (FT_Byte)(c << 4);
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 2d5f79a..66196da 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -51,7 +51,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
- FT_Error error;
+ FT_Error error;
len = (FT_UInt)entry->stringLength / 2;
@@ -82,7 +82,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
- FT_Error error;
+ FT_Error error;
len = (FT_UInt)entry->stringLength / 4;
@@ -113,7 +113,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
- FT_Error error;
+ FT_Error error;
len = (FT_UInt)entry->stringLength;
diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c
index d1e8b96..0a8d98b 100644
--- a/src/sfnt/ttsbit0.c
+++ b/src/sfnt/ttsbit0.c
@@ -168,11 +168,11 @@
x_ppem = p[44];
y_ppem = p[45];
- bsize->x_ppem = (FT_Pos)(x_ppem << 6);
- bsize->y_ppem = (FT_Pos)(y_ppem << 6);
+ bsize->x_ppem = (FT_Pos)( x_ppem << 6 );
+ bsize->y_ppem = (FT_Pos)( y_ppem << 6 );
/* XXX: Is this correct? */
- bsize->height = (FT_Short)(ascender - descender);
+ bsize->height = (FT_Short)( ascender - descender );
bsize->width = (FT_Short)( ( avgwidth * y_ppem + em_size / 2 ) /
em_size );
@@ -232,9 +232,9 @@
bsize = ( (FT_Face)face )->available_sizes + strike_index;
strike = face->sbit_table + 8 + strike_index * 48;
- metrics->x_ppem = (FT_UShort)(bsize->x_ppem >> 6);
- metrics->y_ppem = (FT_UShort)(bsize->y_ppem >> 6);
- metrics->height = (FT_UShort)(bsize->height << 6);
+ metrics->x_ppem = (FT_UShort)( bsize->x_ppem >> 6 );
+ metrics->y_ppem = (FT_UShort)( bsize->y_ppem >> 6 );
+ metrics->height = (FT_UShort)( bsize->height << 6 );
metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */