from __future__ import print_function from zzipdoc.options import * from zzipdoc.match import Match import os import os.path def short(filename): while filename.startswith("../"): filename = filename[3:] if filename.startswith(os.sep): parts = ["",""] + filename.split(os.sep) return os.path.join(parts[-2], parts[-1]) return filename class FunctionListHtmlPage: """ The main part here is to create a TOC (table of contents) at the start of the page - linking down to the descriptions of the functions. Sure we need to generate anchors on the fly. Additionally, all the non-html (docbook-like) markup needs to be converted for ouput. - each element to be added should implement get_name(), get_head() and get_body() with the latter two having a xml_text() method.""" _null_table100 = '
"+namespec+" "
+callspec+" : "+prespec+"")
except Exception as e:
pass
try:
extraline = ""
title = entry.get_title()
filename = short(entry.get_filename())
if title:
subtitle = ' '+title+''
extraline = (self._null_table100+'Version "+self.o.version+"
" return "" def mainheader_line(self): if self.o.onlymainheader: include = "#include <"+self.o.onlymainheader+">" return ""+include+"
\\1")
def resolve_external(self, func, sect):
x = Match()
if func & x("^zlib(.*)"):
return (''+
""+func+sect+""+'')
if sect & x("[23]"):
return (''+
""+func+sect+""+'')
return ""+func+""+sect+""
def resolve_internal(self, func):
if func in self.anchors:
return ''+func+""
if func not in self.not_found_in_anchors:
self.not_found_in_anchors += [ func ]
return ""+func+""
def sane(self, text):
return (text
.replace("", "")
.replace(" ", ""))