* builds/module.mk: Replaced `xxx #' with `xxx$(space). * builds/os2/detekt.mk, builds/win32/detekt.mk: Moved comment to avoid trailing spaces in variable. * builds/freetype.mk: Use $(D) instead of $D to make statement more readable. * docs/docmaker.py: Formatting. * src/psaux/psauxmod.c: Fixed a broken inclusion of component header files (an FT_FLAT_COMPILE test was missing). * src/cache/ftcmanag.c (FTC_Manager_Done): Fixed a bug that caused an occasional crash when the function was called (due to a dangling pointer). * src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug: The ANSI "free()" function was called instead of "memory->free()". * docs/docmaker.py: Added section filtering, multi-page generation (index page generation is still missing though). * builds/unix/install.mk, builds/unix/ft2unix.h: The file "ft2unix.h" is now installed as <ft2build.h> for Unix systems. Note that we still use the "freetype2/freetype" installation path for now. * many files: Now using <ft2build.h> as the default build and setup configuration file in all public headers. Internal source files still need some changes though. * builds/devel/ft2build.h, builds/devel/ftoption.h: Created a new Win32 developer builds. builds/win32/w32-dev.mk: Changed the developer build targets to "devel-gcc" and "devel-bcc" in order to be able to develop with the Borland C++ compiler.
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 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094
diff --git a/ChangeLog b/ChangeLog
index 01139f5..0da40ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,36 +1,46 @@
+2000-12-06 Werner Lemberg <wl@gnu.org>
+
+ * builds/module.mk: Replaced `xxx #' with `xxx$(space).
+ * builds/os2/detekt.mk, builds/win32/detekt.mk: Moved comment to
+ avoid trailing spaces in variable.
+ * builds/freetype.mk: Use $(D) instead of $D to make statement more
+ readable.
+
+ * docs/docmaker.py: Formatting.
+
2000-12-05 David Turner <david.turner@freetype.org>
- * src/psaux/psauxmod.c: fixed a broken inclusion of component
- header files (a FT_FLAT_COMPILE test was missing)
+ * src/psaux/psauxmod.c: Fixed a broken inclusion of component
+ header files (an FT_FLAT_COMPILE test was missing).
- * src/cache/ftcmanag.c (FTC_Manager_Done): fixed a bug that caused
- an occasional crash when the function was called (due to a dangling
- pointer)
+ * src/cache/ftcmanag.c (FTC_Manager_Done): Fixed a bug that caused
+ an occasional crash when the function was called (due to a dangling
+ pointer).
- * src/base/ftsystem.c (FT_Done_Memory): fixed an obvious bug,
- the ANSI "free" function was called, instead of "memory->free()"
+ * src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug:
+ The ANSI "free()" function was called instead of "memory->free()".
- * docs/docmaker.py: added section filtering, multi-page generation
- (index page generation is still missing though)
+ * docs/docmaker.py: Added section filtering, multi-page generation
+ (index page generation is still missing though).
2000-12-04 David Turner <david.turner@freetype.org>
- * builds/unix/install.mk, builds/unix/ft2unix.h: the file "ft2unix.h"
- is now installed as <ft2build.h> for Unix systems. Note that we still
- use the "freetype2/freetype" installation path for now..
+ * builds/unix/install.mk, builds/unix/ft2unix.h: The file "ft2unix.h"
+ is now installed as <ft2build.h> for Unix systems. Note that we
+ still use the "freetype2/freetype" installation path for now.
- * many files: now using <ft2build.h> as the default build and setup
- configuration file in all public headers. Internal source files still
- need some changes though..
+ * many files: Now using <ft2build.h> as the default build and setup
+ configuration file in all public headers. Internal source files
+ still need some changes though.
- * builds/devel/ft2build.h, builds/devel/ftoption.h: created a new
+ * builds/devel/ft2build.h, builds/devel/ftoption.h: Created a new
directory to hold all development options for both the Unix and
- Win32 developer builds..
+ Win32 developer builds.
* builds/win32/detect.mk, builds/win32/w32-bccd.mk,
- builds/win32/w32-dev.mk: changed the developer build targets to
- "devel-gcc" and "devel-bcc" in order to be able to develop with
- the Borland C++ compiler.
+ builds/win32/w32-dev.mk: Changed the developer build targets to
+ "devel-gcc" and "devel-bcc" in order to be able to develop with the
+ Borland C++ compiler.
2000-12-01 David Turner <david.turner@freetype.org>
diff --git a/builds/freetype.mk b/builds/freetype.mk
index c3fe68d..a1419cd 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -92,13 +92,13 @@ SRC := $(TOP)$(SEP)src
BASE_DIR := $(SRC)$(SEP)base
# The build header file used to define all public header file names
-# as macro
+# as macro.
#
ifndef FT_BUILD_H
-FT_BUILD_H := $(TOP)$(SEP)include$(SEP)ft2build.h
-FTBUILD_CMD :=
+ FT_BUILD_H := $(TOP)$(SEP)include$(SEP)ft2build.h
+ FTBUILD_CMD :=
else
-FTBUILD_CMD = $DFT_BUILD_H=$(FT_BUILD_H)
+ FTBUILD_CMD = $(D)FT_BUILD_H=$(FT_BUILD_H)
endif
# A few short-cuts in order to avoid typing $(SEP) all the time for the
diff --git a/builds/modules.mk b/builds/modules.mk
index 68f3d6b..2ff0e50 100644
--- a/builds/modules.mk
+++ b/builds/modules.mk
@@ -51,7 +51,7 @@ make_module_list: clean_module_list
# removing.
#
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
- OPEN_MODULE := @echo #
+ OPEN_MODULE := @echo$(space)
CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
else
OPEN_MODULE := @echo "
@@ -64,7 +64,7 @@ endif
OPEN_DRIVER := $(OPEN_MODULE)FT_USE_MODULE(
CLOSE_DRIVER := )$(CLOSE_MODULE)
-ECHO_DRIVER := @echo "* module: #
+ECHO_DRIVER := @echo "* module:$(space)
ECHO_DRIVER_DESC := (
ECHO_DRIVER_DONE := )"
diff --git a/builds/os2/detect.mk b/builds/os2/detect.mk
index 4e47576..ac457ae 100644
--- a/builds/os2/detect.mk
+++ b/builds/os2/detect.mk
@@ -21,7 +21,8 @@ ifeq ($(PLATFORM),ansi)
COPY := copy
DELETE := del
- CONFIG_FILE := os2-gcc.mk # gcc-emx by default
+ # gcc-emx by default
+ CONFIG_FILE := os2-gcc.mk
SEP := /
# additionally, we provide hooks for various other compilers
diff --git a/builds/win32/detect.mk b/builds/win32/detect.mk
index 9c87470..f202799 100644
--- a/builds/win32/detect.mk
+++ b/builds/win32/detect.mk
@@ -46,7 +46,8 @@ ifeq ($(PLATFORM),ansi)
DELETE := del
COPY := copy
- CONFIG_FILE := w32-gcc.mk # gcc Makefile by default
+ # gcc Makefile by default
+ CONFIG_FILE := w32-gcc.mk
SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
diff --git a/docs/docmaker.py b/docs/docmaker.py
index d5441ef..d961c20 100644
--- a/docs/docmaker.py
+++ b/docs/docmaker.py
@@ -97,7 +97,7 @@ current_section = None
# /* */
# /**************************/
#
-# Each block contains a list of markers, each one can be followed by
+# Each block contains a list of markers; each one can be followed by
# some arbitrary text or a list of fields. Here's an example:
#
# <Struct>
@@ -111,18 +111,18 @@ current_section = None
# y :: vertical coordinate
#
#
-# This example defines three markers: 'Struct', 'Description' & 'Fields'
+# This example defines three markers: 'Struct', 'Description' & 'Fields'.
# The first two markers contain arbitrary text, while the last one contains
-# a list of field
+# a list of fields.
#
-# each field is simple of the format: WORD :: TEXT....
+# Each field is simple of the format: WORD :: TEXT...
#
-# Note that typically, each comment block is followed by some source
-# code declaration that may need to be kept in the reference..
+# Note that typically each comment block is followed by some source
+# code declaration that may need to be kept in the reference.
#
# Note that markers can alternatively be written as "@MARKER:"
-# instead of "<MAKRER>". All marker identifiers are converted to
-# lower case during parsing, in order to simply sorting..
+# instead of "<MARKER>". All marker identifiers are converted to
+# lower case during parsing in order to simply sorting.
#
# We associate with each block the following source lines that do not
# begin with a comment. For example, the following:
@@ -142,7 +142,7 @@ current_section = None
#
#
# will only keep the first two lines of sources with
-# the "blabla" block
+# the "blabla" block.
#
# However, the comment will be kept, with following source lines
# if it contains a starting '#' or '@' as in:
@@ -155,16 +155,16 @@ current_section = None
-##############################################################################
+#############################################################################
#
# The DocCode class is used to store source code lines
#
-# self.lines contains a set of source code lines that will
+# 'self.lines' contains a set of source code lines that will
# be dumped as HTML in a <PRE> tag.
#
-# the object is filled line by line by the parser, it strips the
+# The object is filled line by line by the parser; it strips the
# leading "margin" space from each input line before storing it
-# in self.lines
+# in 'self.lines'.
#
class DocCode:
@@ -172,8 +172,10 @@ class DocCode:
self.lines = []
self.margin = margin
+
def add( self, line ):
# remove margin whitespace
+ #
if string.strip( line[: self.margin] ) == "":
line = line[self.margin :]
self.lines.append( line )
@@ -184,13 +186,16 @@ class DocCode:
print "--" + line
print ""
+
def get_identifier( self ):
# this function should never be called
- return "UNKNOWN_CODE_IDENTIFIER!!"
+ #
+ return "UNKNOWN_CODE_IDENTIFIER!"
- def dump_html( self ):
+ def dump_html( self ):
# clean the last empty lines
+ #
l = len( self.lines ) - 1
while l > 0 and string.strip( self.lines[l - 1] ) == "":
l = l - 1
@@ -201,48 +206,50 @@ class DocCode:
print code_footer
-##############################################################################
+#############################################################################
#
-# The DocParagraph is used to store text paragraphs
-# self.words is simply a list of words for the paragraph
+# The DocParagraph is used to store text paragraphs.
+# 'self.words' is simply a list of words for the paragraph.
#
-# the paragraph is filled line by line by the parser..
+# The paragraph is filled line by line by the parser.
#
class DocParagraph:
def __init__( self ):
self.words = []
+
def add( self, line ):
- # get rid of unwanted spaces in the paragraph
+ # Get rid of unwanted spaces in the paragraph.
#
- # the following line is the same as
+ # The following line is the same as
#
# self.words.extend( string.split( line ) )
#
- # but older Python versions don't have the `extend' attribute
+ # but older Python versions don't have the `extend' attribute.
#
last = len(self.words)
self.words[last:last] = string.split( line )
- # this function is used to retrieve the first word of a given
- # paragraph..
+
+ # This function is used to retrieve the first word of a given
+ # paragraph.
+ #
def get_identifier( self ):
if self.words:
return self.words[0]
# should never happen
- return "UNKNOWN_PARA_IDENTIFIER!!"
+ #
+ return "UNKNOWN_PARA_IDENTIFIER!"
def dump( self ):
-
max_width = 50
cursor = 0
line = ""
for word in self.words:
-
if cursor + len( word ) + 1 > max_width:
print line
cursor = 0
@@ -254,7 +261,7 @@ class DocParagraph:
if cursor > 0:
print line
- #print "§" #for debugging only
+ # print "§" # for debugging only
def dump_string( self ):
@@ -268,43 +275,43 @@ class DocParagraph:
def dump_html( self ):
-
print para_header
self.dump()
print para_footer
-###########################################################################
+#############################################################################
#
# DocContent is used to store the content of a given marker.
#
-# the "self.items" list contains (field,elements) record, where
+# The "self.items" list contains (field,elements) records, where
# "field" corresponds to a given structure fields or function
# parameter (indicated by a "::"), or NULL for a normal section
-# of text/code
+# of text/code.
#
-# hence, the following example:
+# Hence, the following example:
#
# <MyMarker>
-# this is an example of what can be put in a content section,
+# This is an example of what can be put in a content section,
#
-# a second line of example text
+# A second line of example text.
#
-# x :: a simple test field, with some content
-# y :: even before, this field has some code content
+# x :: A simple test field, with some contents.
+# y :: Even before, this field has some code contents.
# {
# y = x+2;
# }
#
# should be stored as
+#
# [ ( None, [ DocParagraph, DocParagraph] ),
# ( "x", [ DocParagraph ] ),
# ( "y", [ DocParagraph, DocCode ] ) ]
#
-# in self.items
+# in 'self.items'.
#
-# the DocContent object is entirely built at creation time, you must
-# pass a list of input text lines lin the "lines_list" parameter..
+# The DocContent object is entirely built at creation time; you must
+# pass a list of input text lines in the "lines_list" parameter.
#
#
class DocContent:
@@ -323,7 +330,6 @@ class DocContent:
field = None # the current field
for aline in lines_list:
-
if code_mode == 0:
line = string.lstrip( aline )
l = len( line )
@@ -331,8 +337,8 @@ class DocContent:
# if the line is empty, this is the end of the current
# paragraph
+ #
if l == 0 or line == '{':
-
if paragraph:
elements.append( paragraph )
paragraph = None
@@ -351,21 +357,24 @@ class DocContent:
# the token `::'
#
if len( words ) >= 2 and words[1] == "::":
-
# start a new field - complete current paragraph if any
+ #
if paragraph:
elements.append( paragraph )
paragraph = None
# append previous "field" to self.items
+ #
self.items.append( ( field, elements ) )
# start new field and elements list
+ #
field = words[0]
elements = []
words = words[2 :]
# append remaining words to current paragraph
+ #
if len( words ) > 0:
line = string.join( words )
if not paragraph:
@@ -373,14 +382,15 @@ class DocContent:
paragraph.add( line )
else:
- # we're in code mode..
+ # we're in code mode...
+ #
line = aline
- # the code block ends with a line that has a single '}' on it
- # that is located at the same column that the opening
- # accolade..
+ # the code block ends with a line that has a single '}' on
+ # it that is located at the same column that the opening
+ # accolade...
+ #
if line == " " * code_margin + '}':
-
if code:
elements.append( code )
code = None
@@ -389,6 +399,7 @@ class DocContent:
code_margin = 0
# otherwise, add the line to the current paragraph
+ #
else:
if not code:
code = DocCode()
@@ -410,7 +421,8 @@ class DocContent:
return element.get_identifier()
# should never happen
- return "UNKNOWN_CONTENT_IDENTIFIER!!"
+ #
+ return "UNKNOWN_CONTENT_IDENTIFIER!"
def get_title( self ):
@@ -420,7 +432,8 @@ class DocContent:
return element.dump_string()
# should never happen
- return "UNKNOWN_CONTENT_TITLE"
+ #
+ return "UNKNOWN_CONTENT_TITLE!"
def dump( self ):
@@ -435,8 +448,8 @@ class DocContent:
if field:
print "</field> "
- def dump_html( self ):
+ def dump_html( self ):
n = len( self.items )
in_table = 0
@@ -445,13 +458,13 @@ class DocContent:
field = item[0]
if not field:
-
if in_table:
print "</td></tr></table>"
in_table = 0
for element in item[1]:
element.dump_html()
+
else:
if not in_table:
print "<table cellpadding=4><tr valign=top><td>"
@@ -474,15 +487,15 @@ class DocContent:
# The DocBlock class is used to store a given comment block. It contains
# a list of markers, as well as a list of contents for each marker.
#
-# "self.items" is a list of ( marker, contents ) elements, where
+# "self.items" is a list of (marker, contents) elements, where
# 'marker' is a lowercase marker string, and 'contents' is a DocContent
-# object
+# object.
#
# "self.source" is simply a list of text lines taken from the
-# uncommented source itself..
+# uncommented source itself.
#
-# finally, "self.identifier" is a simple identifier used to
-# uniquely identify the block
+# Finally, "self.identifier" is a simple identifier used to
+# uniquely identify the block.
#
class DocBlock:
@@ -529,19 +542,20 @@ class DocBlock:
self.source = source_line_list
# now retrieve block name when possible
+ #
if self.items:
first = self.items[0]
self.name = first[1].get_identifier()
- # this function is used to add a new element to self.items
- # 'marker' is a marker string, or None
- # 'lines' is a list of text lines used to compute a list of
- # DocContent objects
+ # This function adds a new element to 'self.items'.
+ # 'marker' is a marker string, or None.
+ # 'lines' is a list of text lines used to compute a list of
+ # DocContent objects.
#
def add( self, marker, lines ):
-
# remove the first and last empty lines from the content list
+ #
l = len( lines )
if l > 0:
i = 0
@@ -552,10 +566,12 @@ class DocBlock:
lines = lines[i : l]
l = len( lines )
- # add a new marker only if its marker and its content list aren't empty
+ # add a new marker only if its marker and its content list
+ # aren't empty
+ #
if l > 0 and marker:
- content = DocContent(lines)
- self.items.append( ( string.lower(marker), content ) )
+ content = DocContent( lines )
+ self.items.append( ( string.lower( marker ), content ) )
if not self.identifier:
self.identifier = content.get_identifier()
@@ -567,27 +583,28 @@ class DocBlock:
return None
-
def dump( self ):
for i in range( len( self.items ) ):
print "[" + self.items[i][0] + "]"
content = self.items[i][1]
content.dump()
- def dump_html( self ):
- types = [ 'type', 'struct', 'functype', 'function', 'constant',
+ def dump_html( self ):
+ types = [ 'type', 'struct', 'functype', 'function', 'constant',
'enum', 'macro' ]
if not self.items:
- return
+ return
# start of a block
+ #
print block_header
print "<h2>" + self.identifier + "</h2>"
# print source code
+ #
if not self.source:
return
@@ -601,8 +618,8 @@ class DocBlock:
print source_footer
# dump each (marker,content) element
+ #
for element in self.items:
-
marker = element[0]
content = element[1]
@@ -611,7 +628,7 @@ class DocBlock:
content.dump_html()
print "</ul>"
- elif not (marker in types):
+ elif not ( marker in types ):
print "<h4>" + marker + "</h4>"
print "<ul>"
content.dump_html()
@@ -624,10 +641,9 @@ class DocBlock:
######################################################################################
#
+# The DocSection class is used to store a given documentation section.
#
-# The DocSection class is used to store a given documentation section
-#
-# Each section is made of an identifier, an abstract and a description
+# Each section is made of an identifier, an abstract and a description.
#
# For example, look at:
#
@@ -638,29 +654,31 @@ class DocBlock:
#
# <Description>
# FreeType defines several basic data types for all its
-# operations....
+# operations...
#
class DocSection:
def __init__( self, block ):
self.block = block
- self.name = string.lower(block.name)
- self.abstract = block.find_content("abstract")
- self.description = block.find_content("description")
- title_content = block.find_content("title")
+ self.name = string.lower( block.name )
+ self.abstract = block.find_content( "abstract" )
+ self.description = block.find_content( "description" )
+ title_content = block.find_content( "title" )
if title_content:
- self.title = title_content.get_title()
+ self.title = title_content.get_title()
else:
- self.title = "UNKNOWN SECTION TITLE !!"
+ self.titles = "UNKNOWN_SECTION_TITLE!"
self.elements = {}
self.list = []
self.filename = self.name + ".html"
- #sys.stderr.write( "new section '"+self.name+"'" )
+ # sys.stderr.write( "new section '" + self.name + "'" )
+
def add_element( self, block ):
# check that we don't have a duplicate element in this
- # section..
+ # section
+ #
if self.elements.has_key( block.name ):
sys.stderr.write( "ERROR - duplicate element definition for " +
"'" + block.name + "' in section '" +
@@ -675,60 +693,65 @@ class DocSection:
"""make an HTML page from a given DocSection"""
# print HTML header
+ #
print html_header
# print title
+ #
print section_title_header
print self.title
print section_title_footer
# print description
+ #
print block_header
self.description.dump_html()
print block_footer
# print elements
+ #
for element in self.list:
element.dump_html()
print html_footer
-
-
-
class DocSectionList:
- def __init__( self ):
+ def __init__( self ):
self.sections = {}
self.list = []
self.current_section = None
- def append_section( self, block ):
- name = block.name
- abstract = block.find_content( "abstract" )
+ def append_section( self, block ):
+ name = block.name
+ abstract = block.find_content( "abstract" )
- if self.sections.has_key(name):
- # there is already a section with this name in our
+ if self.sections.has_key( name ):
+ # There is already a section with this name in our
# list. We'll try to complete it.
-
+ #
section = self.sections[name]
if section.abstract:
- # this section already has an abstract defined,
+ # This section already has an abstract defined;
# simply check that the new section doesn't
# provide a new one.
+ #
if abstract:
stderr.write( "ERROR - duplicate section definition" +
" for '" + name + "'" )
sys.quit()
else:
- # the old section didn't contain an abstract, we're
- # now going to replace it
+ # The old section didn't contain an abstract; we're
+ # now going to replace it.
+ #
section.abstract = abstract
section.description = block.find_content( "description" )
+
else:
# a new section
+ #
section = DocSection( block )
self.sections[name] = section
self.list.append( section )
@@ -743,12 +766,13 @@ class DocSectionList:
self.append_section( block )
elif self.current_section:
- #sys.stderr.write( " new block" )
+ # sys.stderr.write( " new block" )
self.current_section.add_element( block )
def dump_html_toc( self ):
# dump an html table of contents
+ #
print html_header
print "<center><h1>Table of Contents</h1></center>"
@@ -756,7 +780,7 @@ class DocSectionList:
print "<center><table cellpadding=5>"
for section in self.list:
print "<tr valign=top><td>"
- print '<a href="'+section.filename+'">'
+ print '<a href="' + section.filename + '">'
print section.title
print "</a></td><td>"
section.abstract.dump_html()
@@ -779,12 +803,11 @@ class DocSectionList:
-# filter a given list of DocBlocks. Returns a new list
+# Filter a given list of DocBlocks. Returns a new list
# of DocBlock objects that only contains element whose
-# "type" (i.e. first marker) is in the "types" parameter
+# "type" (i.e. first marker) is in the "types" parameter.
#
def filter_blocks( block_list, types ):
-
new_list = []
for block in block_list:
if block.items:
@@ -796,8 +819,8 @@ def filter_blocks( block_list, types ):
return new_list
-# perform a lexicographical comparison of two DocBlock
-# objects. Returns -1, 0 or 1
+# Perform a lexicographical comparison of two DocBlock
+# objects. Returns -1, 0 or 1.
#
def block_lexicographical_compare( b1, b2 ):
if not b1.identifier:
@@ -805,8 +828,9 @@ def block_lexicographical_compare( b1, b2 ):
if not b2.identifier:
return 1
- id1 = string.lower(b1.identifier)
- id2 = string.lower(b2.identifier)
+ id1 = string.lower( b1.identifier )
+ id2 = string.lower( b2.identifier )
+
if id1 < id2:
return -1
elif id1 == id2:
@@ -828,7 +852,6 @@ def block_make_list( source_block_list ):
# dump a list block as a single HTML page
#
def dump_html_1( block_list ):
-
print html_header
for block in block_list:
@@ -846,7 +869,7 @@ def make_block_list():
block = []
format = 0
- # we use "format" to store the state of our parser:
+ # We use "format" to store the state of our parser:
#
# 0 - wait for beginning of comment
# 1 - parse comment format 1
@@ -855,18 +878,17 @@ def make_block_list():
# 4 - wait for beginning of source (or comment ??)
# 5 - process source
#
-
comment = []
source = []
state = 0
for line in fileinput.input():
-
l = len( line )
if l > 0 and line[l - 1] == '\012':
line = line[0 : l - 1]
# stripped version of the line
+ #
line2 = string.strip( line )
l = len( line2 )
@@ -888,7 +910,6 @@ def make_block_list():
format = 0
if format == 0: #### wait for beginning of comment ####
-
if l > 3 and line2[0 : 3] == '/**':
i = 3
while i < l and line2[i] == '*':
@@ -916,20 +937,23 @@ def make_block_list():
#
elif format == 1:
- # if the line doesn't begin with a "*", something went
- # wrong, and we must exit, and forget the current block..
+ # If the line doesn't begin with a "*", something went
+ # wrong, and we must exit, and forget the current block.
+ #
if l == 0 or line2[0] != '*':
block = []
format = 0
- # otherwise, we test for an end of block, which is an
- # arbitrary number of '*', followed by '/'
+ # Otherwise, we test for an end of block, which is an
+ # arbitrary number of '*', followed by '/'.
+ #
else:
i = 1
while i < l and line2[i] == '*':
i = i + 1
# test for the end of the block
+ #
if i < l and line2[i] == '/':
if block != []:
format = 4
@@ -937,6 +961,7 @@ def make_block_list():
format = 0
else:
# otherwise simply append line to current block
+ #
block.append( line2[i:] )
continue
@@ -947,8 +972,9 @@ def make_block_list():
#
elif format == 2:
- # if the line doesn't begin with '/*' and end with '*/',
- # this is the end of the format 2 format
+ # If the line doesn't begin with '/*' and end with '*/',
+ # this is the end of the format 2 format.
+ #
if l < 4 or line2[: 2] != '/*' or line2[-2 :] != '*/':
if block != []:
format = 4
@@ -957,9 +983,11 @@ def make_block_list():
else:
# remove the start and end comment delimiters, then
# right-strip the line
+ #
line2 = string.rstrip( line2[2 : -2] )
# check for end of a format2 block, i.e. a run of '*'
+ #
if string.count( line2, '*' ) == l - 4:
if block != []:
format = 4
@@ -967,28 +995,24 @@ def make_block_list():
format = 0
else:
# otherwise, add the line to the current block
+ #
block.append( line2 )
continue
-
-
if format >= 4: #### source processing ####
-
if l > 0:
format = 5
if format == 5:
source.append( line )
-
if format >= 4:
list.append( [block, source] )
return list
-
# This function is only used for debugging
#
def dump_block_list( list ):
@@ -1003,7 +1027,6 @@ def dump_block_list( list ):
print "---------the end-----------------------"
-
def main( argv ):
"""main program loop"""
sys.stderr.write( "extracting comment blocks from sources...\n" )
@@ -1017,14 +1040,14 @@ def main( argv ):
section_list.dump_html_toc()
section_list.dump_html_sections()
- #list2 = filter_blocks( list, ['type','macro','enum','constant', 'functype'] )
- #list2 = list
- #list2.sort( block_lexicographical_compare )
+ # list2 = filter_blocks( list, ['type','macro','enum','constant', 'functype'] )
+ # list2 = list
+ # list2.sort( block_lexicographical_compare )
- #dump_html_1( list2 )
- #dump_doc_blocks( list )
- #dump_block_lists( list )
- #dump_html_1( list )
+ # dump_html_1( list2 )
+ # dump_doc_blocks( list )
+ # dump_block_lists( list )
+ # dump_html_1( list )
# If called from the command line
diff --git a/include/freetype/config/ft2build.h b/include/freetype/config/ft2build.h
index 9e84461..672e3ef 100644
--- a/include/freetype/config/ft2build.h
+++ b/include/freetype/config/ft2build.h
@@ -162,19 +162,19 @@
/* */
/*************************************************************************/
- /* don't add spaces around arguments to FT_CONFIG_FILE! */
+ /* don't add spaces around arguments to FT2_CONFIG_FILE! */
/* configuration files */
-#ifndef FT_CONFIG_CONFIG_H
-# define FT_CONFIG_CONFIG_H FT2_CONFIG_FILE(ftconfig.h)
+#ifndef FT_CONFIG_CONFIG_H
+#define FT_CONFIG_CONFIG_H FT2_CONFIG_FILE(ftconfig.h)
#endif
-#ifndef FT_CONFIG_OPTIONS_H
-# define FT_CONFIG_OPTIONS_H FT2_CONFIG_FILE(ftoption.h)
+#ifndef FT_CONFIG_OPTIONS_H
+#define FT_CONFIG_OPTIONS_H FT2_CONFIG_FILE(ftoption.h)
#endif
-#ifndef FT_CONFIG_MODULES_H
-# define FT_CONFIG_MODULES_H FT2_CONFIG_FILE(ftmodule.h)
+#ifndef FT_CONFIG_MODULES_H
+#define FT_CONFIG_MODULES_H FT2_CONFIG_FILE(ftmodule.h)
#endif
/* public headers */
diff --git a/include/ft2build.h b/include/ft2build.h
index 17f61ee..563b1b8 100644
--- a/include/ft2build.h
+++ b/include/ft2build.h
@@ -16,14 +16,13 @@
/* */
/* */
/* This file corresponds to the default "ft2build.h" file for */
-/* FreeType 2. It uses the "freetype" include root. */
+/* FreeType 2. It uses the "freetype" include root. */
/* */
/* Note that specific platforms might use a different configurations. */
/* For example, on Unix, the "freetype2" include root is used, with */
/* a specific "ft2build.h" used to take care of this. The latter */
/* looks like the following: */
/* */
-/* */
/* #ifndef __FT_BUILD_UNIX_H__ */
/* #define __FT_BUILD_UNIX_H__ */
/* */
@@ -32,7 +31,6 @@
/* */
/* #endif // __FT_BUILD_UNIX_H__ */
/* */
-/* */
/***************************************************************************/
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index cad74a9..0c8ae95 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -17,13 +17,17 @@
#ifdef FT_FLAT_COMPILE
-# include "psauxmod.h"
-# include "psobjs.h"
-# include "t1decode.h"
+
+#include "psauxmod.h"
+#include "psobjs.h"
+#include "t1decode.h"
+
#else
-# include <psaux/psauxmod.h>
-# include <psaux/psobjs.h>
-# include <psaux/t1decode.h>
+
+#include <psaux/psauxmod.h>
+#include <psaux/psobjs.h>
+#include <psaux/t1decode.h>
+
#endif
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 9cfe8a4..589cd68 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -21,9 +21,13 @@
#include <freetype/internal/ftdebug.h>
#ifdef FT_FLAT_COMPILE
-# include "psobjs.h"
+
+#include "psobjs.h"
+
#else
-# include <psaux/psobjs.h>
+
+#include <psaux/psobjs.h>
+
#endif
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 86a5bd0..40e4f4e 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -23,11 +23,15 @@
#ifdef FT_FLAT_COMPILE
-# include "t1decode.h"
-# include "psobjs.h"
+
+#include "t1decode.h"
+#include "psobjs.h"
+
#else
-# include <psaux/t1decode.h>
-# include <psaux/psobjs.h>
+
+#include <psaux/t1decode.h>
+#include <psaux/psobjs.h>
+
#endif