From 8bdc40716ace308693a6c0e81bc8e4fcb12426dc Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Tue, 25 Jun 2013 10:20:53 +0200 Subject: [PATCH] [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. --- ChangeLog | 9 +++++++++ src/tools/docmaker/content.py | 19 +------------------ src/tools/docmaker/docmaker.py | 4 ++-- src/tools/docmaker/tohtml.py | 29 ----------------------------- 4 files changed, 12 insertions(+), 49 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5834aa10..f30af2fdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-06-25 Werner Lemberg + + [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 * builds/freetype.mk (dll): Remove target. diff --git a/src/tools/docmaker/content.py b/src/tools/docmaker/content.py index 26087f7b8..98025e67e 100644 --- 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 # # This file contains routines used to parse the content of documentation @@ -268,15 +268,6 @@ class DocMarkup: 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: @@ -555,14 +546,6 @@ class DocBlock: 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: m = self.get_markup( tag_name ) diff --git a/src/tools/docmaker/docmaker.py b/src/tools/docmaker/docmaker.py index 1d9de9fbf..bf75c5d5f 100644 --- 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 +# DocMaker (c) 2002, 2004, 2008, 2013 David Turner # -# 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. # diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py index 2ff44d69c..4b0d0f9bd 100644 --- a/src/tools/docmaker/tohtml.py +++ b/src/tools/docmaker/tohtml.py @@ -210,25 +210,6 @@ def html_quote( line ): return result -# same as 'html_quote', but ignores left and right brackets -def html_quote0( line ): - return string.replace( line, "&", "&" ) - - -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 ): @@ -277,16 +258,6 @@ class HtmlFormatter( Formatter ): 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""" # look for cross-references