shithub: freetype+ttf2subf

Download patch

ref: 8bdc40716ace308693a6c0e81bc8e4fcb12426dc
parent: ffb8b473eae4b320c168329b4429dc31ccad515e
author: Werner Lemberg <[email protected]>
date: Tue Jun 25 06:20:53 EDT 2013

[docmaker] Remove unused functions.

* src/tools/docmaker/content.py (DocMarkup.get_start,
DocBlock.get_markup_name): Removed.
* src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
HtmlFormatter.make_html_words): Removed.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2013-06-25  Werner Lemberg  <[email protected]>
 
+	[docmaker] Remove unused functions.
+
+	* src/tools/docmaker/content.py (DocMarkup.get_start,
+	DocBlock.get_markup_name): Removed.
+	* src/tools/docmaker/tohtml.py (html_quote0, dump_html_code,
+	HtmlFormatter.make_html_words): Removed.
+
+2013-06-25  Werner Lemberg  <[email protected]>
+
 	* builds/freetype.mk (dll): Remove target.
 
 	Problem reported by Jörg Günnewig <[email protected]>.
--- a/src/tools/docmaker/content.py
+++ b/src/tools/docmaker/content.py
@@ -1,4 +1,4 @@
-#  Content (c) 2002, 2004, 2006-2009, 2012
+#  Content (c) 2002, 2004, 2006-2009, 2012, 2013
 #    David Turner <[email protected]>
 #
 #  This file contains routines used to parse the content of documentation
@@ -268,15 +268,6 @@
         except:
             return None
 
-    def  get_start( self ):
-        try:
-            result = ""
-            for word in self.fields[0].items[0].words:
-                result = result + " " + word
-            return result[1:]
-        except:
-            return "ERROR"
-
     def  dump( self, margin ):
         print " " * margin + "<" + self.tag + ">"
         for f in self.fields:
@@ -554,14 +545,6 @@
             if m.tag == string.lower( tag_name ):
                 return m
         return None
-
-    def  get_markup_name( self, tag_name ):
-        """return the name of a given primary markup in a block"""
-        try:
-            m = self.get_markup( tag_name )
-            return m.get_name()
-        except:
-            return None
 
     def  get_markup_words( self, tag_name ):
         try:
--- a/src/tools/docmaker/docmaker.py
+++ b/src/tools/docmaker/docmaker.py
@@ -1,8 +1,8 @@
 #!/usr/bin/env python
 #
-#  DocMaker (c) 2002, 2004, 2008 David Turner <[email protected]>
+#  DocMaker (c) 2002, 2004, 2008, 2013 David Turner <[email protected]>
 #
-# This program is a re-write of the original DocMaker took used
+# This program is a re-write of the original DocMaker tool used
 # to generate the API Reference of the FreeType font engine
 # by converting in-source comments into structured HTML.
 #
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -210,26 +210,7 @@
     return result
 
 
-# same as 'html_quote', but ignores left and right brackets
-def  html_quote0( line ):
-    return string.replace( line, "&", "&amp;" )
 
-
-def  dump_html_code( lines, prefix = "" ):
-    # clean the last empty lines
-    l = len( self.lines )
-    while l > 0 and string.strip( self.lines[l - 1] ) == "":
-        l = l - 1
-
-    # The code footer should be directly appended to the last code
-    # line to avoid an additional blank line.
-    print prefix + code_header,
-    for line in self.lines[0 : l + 1]:
-        print '\n' + prefix + html_quote( line ),
-    print prefix + code_footer,
-
-
-
 class  HtmlFormatter( Formatter ):
 
     def  __init__( self, processor, project_title, file_prefix ):
@@ -276,16 +257,6 @@
 
     def  make_block_url( self, block ):
         return self.make_section_url( block.section ) + "#" + block.name
-
-    def  make_html_words( self, words ):
-        """ convert a series of simple words into some HTML text """
-        line = ""
-        if words:
-            line = html_quote( words[0] )
-            for w in words[1:]:
-                line = line + " " + html_quote( w )
-
-        return line
 
     def  make_html_word( self, word ):
         """analyze a simple word to detect cross-references and styling"""