[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.
This commit is contained in:
Werner Lemberg 2013-06-25 10:20:53 +02:00
parent ffb8b473ea
commit 8bdc40716a
4 changed files with 12 additions and 49 deletions

View File

@ -1,3 +1,12 @@
2013-06-25 Werner Lemberg <wl@gnu.org>
[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 <wl@gnu.org>
* builds/freetype.mk (dll): Remove target.

View File

@ -1,4 +1,4 @@
# Content (c) 2002, 2004, 2006-2009, 2012
# Content (c) 2002, 2004, 2006-2009, 2012, 2013
# David Turner <david@freetype.org>
#
# 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 )

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python
#
# DocMaker (c) 2002, 2004, 2008 David Turner <david@freetype.org>
# DocMaker (c) 2002, 2004, 2008, 2013 David Turner <david@freetype.org>
#
# 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.
#

View File

@ -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, "&", "&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 ):
@ -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