[Xorg-commit] xc/extras/freetype2/src/tools/docmaker sources.py,1.1,1.1.4.1 tohtml.py,1.1,1.1.4.1

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Wed May 9 17:30:30 EEST 2007


Committed by: kaleb

Update of /cvs/xorg/xc/extras/freetype2/src/tools/docmaker
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/extras/freetype2/src/tools/docmaker

Modified Files:
      Tag: XORG-CURRENT
	sources.py tohtml.py 
Log Message:
merge most of XFree86 RC3 (4.3.99.903) from vendor branch.
bug #214


Index: sources.py
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/tools/docmaker/sources.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/sources.py	25 Nov 2003 19:27:23 -0000	1.1
+++ b/sources.py	23 Feb 2004 21:33:11 -0000	1.1.4.1
@@ -130,7 +130,7 @@
 #
 # used to detect a cross-reference, after markup tags have been stripped
 #
-re_crossref = re.compile( r'@(\w*)' )
+re_crossref = re.compile( r'@(\w*)(.*)' )
 
 #
 # used to detect italic and bold styles in paragraph text

Index: tohtml.py
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/src/tools/docmaker/tohtml.py,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/tohtml.py	25 Nov 2003 19:27:23 -0000	1.1
+++ b/tohtml.py	23 Feb 2004 21:33:11 -0000	1.1.4.1
@@ -7,23 +7,38 @@
 # The following defines the HTML header used by all generated pages.
 #
 html_header_1 = """\
+<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
 <html>
-<header>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>"""
 
 html_header_2= """ API Reference</title>
-<basefont face="Verdana,Geneva,Arial,Helvetica">
-<style content="text/css">
-  P { text-align=justify }
-  H1 { text-align=center }
-  LI { text-align=justify }
+<style type="text/css">
+  body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+         color: #000000;
+         background: #FFFFFF; }
+
+  p { text-align: justify; }
+  h1 { text-align: center; }
+  li { text-align: justify; }
+
+  a:link { color: #0000EF; }
+  a:visited { color: #51188E; }
+  a:hover { color: #FF0000; }
+
+  span.keyword { font-family: monospace;
+                 text-align: left;
+                 white-space: pre;
+                 color: darkblue; }
+
+  pre.colored { color: blue; }
+
+  ul.empty { list-style-type: none; }
 </style>
-</header>
-<body text=#000000
-      bgcolor=#FFFFFF
-      link=#0000EF
-      vlink=#51188E
-      alink=#FF0000>
+</head>
+<body>
 <center><h1>"""
 
 html_header_3=""" API Reference</h1></center>
@@ -44,8 +59,8 @@
 
 # The header and footer used for code segments.
 #
-code_header = "<font color=blue><pre>"
-code_footer = "</pre></font>"
+code_header = '<pre class="colored">'
+code_footer = '</pre>'
 
 # Paragraph header and footer.
 #
@@ -54,39 +69,39 @@
 
 # Block header and footer.
 #
-block_header = "<center><table width=75%><tr><td>"
-block_footer = "</td></tr></table><hr width=75%></center>"
+block_header = '<table align=center width="75%"><tr><td>'
+block_footer = '</td></tr></table><hr width="75%">'
 
 # Description header/footer.
 #
-description_header = "<center><table width=87%><tr><td>"
-description_footer = "</td></tr></table></center><br>"
+description_header = '<table align=center width="87%"><tr><td>'
+description_footer = "</td></tr></table><br>"
 
 # Marker header/inter/footer combination.
 #
-marker_header = "<center><table width=87% cellpadding=5><tr bgcolor=#EEEEFF><td><em><b>"
+marker_header = '<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>'
 marker_inter  = "</b></em></td></tr><tr><td>"
-marker_footer = "</td></tr></table></center>"
+marker_footer = "</td></tr></table>"
 
 # Source code extracts header/footer.
 #
-source_header = "<center><table width=87%><tr bgcolor=#D6E8FF width=100%><td><pre>\n"
-source_footer = "\n</pre></table></center><br>"
+source_header = '<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>\n'
+source_footer = "\n</pre></table><br>"
 
 # Chapter header/inter/footer.
 #
-chapter_header = "<br><center><table width=75%><tr><td><h2>"
-chapter_inter  = "</h2><ul>"
-chapter_footer = "</ul></td></tr></table></center>"
+chapter_header = '<br><table align=center width="75%"><tr><td><h2>'
+chapter_inter  = '</h2><ul class="empty"><li>'
+chapter_footer = '</li></ul></td></tr></table>'
 
 
 # source language keyword coloration/styling
 #
-keyword_prefix = '<font color="darkblue">'
-keyword_suffix = '</font>'
+keyword_prefix = '<span class="keyword">'
+keyword_suffix = '</span>'
 
-section_synopsis_header = '<h2>Synopsys</h2><font color="cyan">'
-section_synopsis_footer = '</font>'
+section_synopsis_header = '<h2>Synopsis</h2>'
+section_synopsis_footer = ''
 
 # Translate a single line of source to HTML.  This will convert
 # a "<" into "&lt.", ">" into "&gt.", etc.
@@ -139,9 +154,9 @@
         self.html_header   = html_header_1 + project_title + html_header_2 + \
                              project_title + html_header_3
 
-        self.html_footer = "<p><center><font size=""-2"">generated on " +   \
+        self.html_footer = "<center><font size=""-2"">generated on " +   \
                             time.asctime( time.localtime( time.time() ) ) + \
-                           "</font></p></center>" + html_footer
+                           "</font></center>" + html_footer
 
         self.columns = 3
 
@@ -172,11 +187,12 @@
         if m:
             try:
                 name = m.group(1)
+                rest = m.group(2)
                 block = self.identifiers[ name ]
                 url   = self.make_block_url( block )
-                return '<a href="' + url + '">' + name + '</a>'
+                return '<a href="' + url + '">' + name + '</a>' + rest
             except:
-                return '?' + name + '?'
+                return '?' + name + '?' + rest
 
         # look for italics and bolds
         m = re_italic.match( word )
@@ -230,7 +246,7 @@
 
     def print_html_field( self, field ):
         if field.name:
-            print "<table valign=top><tr><td><b>"+field.name+"</b></td><td>"
+            print "<table><tr valign=top><td><b>"+field.name+"</b></td><td>"
 
         print self.make_html_items( field.items )
 
@@ -272,7 +288,7 @@
 
 
     def print_html_field_list( self, fields ):
-        print "<table valign=top cellpadding=3>"
+        print "<table cellpadding=3>"
         for field in fields:
             print "<tr valign=top><td><b>" + field.name + "</b></td><td>"
             self.print_html_items( field.items )
@@ -319,7 +335,7 @@
         count = len( self.block_index )
         rows  = (count + self.columns - 1)/self.columns
 
-        print "<center><table border=0 cellpadding=0 cellspacing=0>"
+        print "<table align=center border=0 cellpadding=0 cellspacing=0>"
         for r in range(rows):
             line = "<tr>"
             for c in range(self.columns):
@@ -333,7 +349,7 @@
             line = line + "</tr>"
             print line
 
-        print "</table></center>"
+        print "</table>"
         print self.html_footer
         self.index_items = {}
 
@@ -373,7 +389,6 @@
         print chapter_header + '<a href="' + index_filename + '">Global Index</a>' + chapter_inter + chapter_footer
 
     def  toc_exit( self ):
-        print "</table></center>"
         print self.html_footer
 
     def  toc_dump( self, toc_filename = None, index_filename = None ):
@@ -397,7 +412,7 @@
 
         # print section synopsys
         print section_synopsis_header
-        print "<center><table cellspacing=5 cellpadding=0 border=0>"
+        print "<table align=center cellspacing=5 cellpadding=0 border=0>"
 
         maxwidth = 0
         for b in section.blocks.values():
@@ -424,7 +439,7 @@
             line = line + "</tr>"
             print line
 
-        print "</table></center><br><br>"
+        print "</table><br><br>"
         print section_synopsis_footer
 
         print description_header
@@ -436,9 +451,7 @@
 
         # place html anchor if needed
         if block.name:
-            print '<a name="' + block.name + '">'
-            print "<h4>" + block.name + "</h4>"
-            print "</a>"
+            print '<h4><a name="' + block.name + '">' + block.name + '</a></h4>'
 
         # dump the block C source lines now
         if block.code:
@@ -473,4 +486,4 @@
     def section_dump_all( self ):
         for section in self.sections:
             self.section_dump( section, self.file_prefix + section.name + '.html' )
-        
\ No newline at end of file
+        





More information about the xorg-commit mailing list