summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2005-08-30 00:22:46 +0000
committerWerner Lemberg <wl@gnu.org>2005-08-30 00:22:46 +0000
commita723526ae75fbdbe26f59940c2de994c6c3fb0bb (patch)
treefba4d7a8842ed0b9b1c8415cd31d4d0ffe06a4e3 /src/tools
parent3bfb1c08c16895774533511841275471959ae05d (diff)
downloadfreetype2-a723526ae75fbdbe26f59940c2de994c6c3fb0bb.tar.gz
* include/freetype/freetype.h, include/freetype/ftchapters.h: Add
a preliminary section with some explanations about user allocation. * src/tools/docmaker/tohtml.py (HtmlFormatter.section_enter): Don't abort if there are no data types, functions, etc., in a section. Print synopsis only if we have a data type, function, etc. * docs/INSTALL.ANY, docs/INSTALL, docs/INSTALL.UNX, docs/CUSTOMIZE, docs/INSTALL.GNU, docs/TRUETYPE, docs/DEBUG, docs/UPGRADE.UNX, docs/VERSION.DLL, docs/formats.txt: Revised, formatted.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/docmaker/tohtml.py56
1 files changed, 29 insertions, 27 deletions
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index 2a3cf239b..2b9c547d9 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -410,37 +410,39 @@ class HtmlFormatter(Formatter):
print section.title
print section_title_footer
- # print section synopsys
- print section_synopsis_header
- print "<table align=center cellspacing=5 cellpadding=0 border=0>"
-
maxwidth = 0
for b in section.blocks.values():
- if len(b.name) > maxwidth:
- maxwidth = len(b.name)
+ if len( b.name ) > maxwidth:
+ maxwidth = len( b.name )
width = 70 # XXX magic number
- columns = width / maxwidth
- if columns < 1:
- columns = 1
-
- count = len(section.block_names)
- rows = (count + columns-1)/columns
- for r in range(rows):
- line = "<tr>"
- for c in range(columns):
- i = r + c*rows
- line = line + '<td></td><td>'
- if i < count:
- name = section.block_names[i]
- line = line + '<a href="#' + name + '">' + name + '</a>'
-
- line = line + '</td>'
- line = line + "</tr>"
- print line
-
- print "</table><br><br>"
- print section_synopsis_footer
+ if maxwidth <> 0:
+ # print section synopsis
+ print section_synopsis_header
+ print "<table align=center cellspacing=5 cellpadding=0 border=0>"
+
+ columns = width / maxwidth
+ if columns < 1:
+ columns = 1
+
+ count = len( section.block_names )
+ rows = ( count + columns - 1 ) / columns
+
+ for r in range( rows ):
+ line = "<tr>"
+ for c in range( columns ):
+ i = r + c * rows
+ line = line + '<td></td><td>'
+ if i < count:
+ name = section.block_names[i]
+ line = line + '<a href="#' + name + '">' + name + '</a>'
+
+ line = line + '</td>'
+ line = line + "</tr>"
+ print line
+
+ print "</table><br><br>"
+ print section_synopsis_footer
print description_header
print self.make_html_items( section.description )