tools/unused-symbols-report.py
def Output(iter):
  """Print HTML given an iterable of (target, path, symbol) tuples."""
  targets = {}
  for target, path, symbol in iter:
    entries = targets.setdefault(target, [])
    entries.append((symbol, path))

  print(TEMPLATE_HEADER)
  print("<p>jump to target:")
  print("<select onchange='document.location.hash = this.value'>")
  for target in sorted(targets.keys()):
    print("<option>%s</option>" % target)
  print("</select></p>")

  for target in sorted(targets.keys()):
    print("<h2>%s" % target)
    print("<a class=permalink href='#%s' name='%s'>#</a>" % (target, target))
    print("</h2>")
    print("<table width=100% cellspacing=0>")
    for symbol, path in sorted(targets[target]):
      htmlsymbol = cgi.escape(symbol).replace('::', '::<wbr>')
      print("<tr><td><div class=symbol>%s</div></td>" % htmlsymbol)
      print("<td valign=top><div class=file>%s</div></td></tr>" % path)
    print("</table>")
Print HTML given an iterable of (target, path, symbol) tuples.
Print HTML given an iterable of (target, path, symbol) tuples.
Print HTML given an iterable of ( target path symbol ) tuples .
def Output(iter):
  targets = {}
  for target, path, symbol in iter:
    entries = targets.setdefault(target, [])
    entries.append((symbol, path))
  print(TEMPLATE_HEADER)
  print("<p>jump to target:")
  print("<select onchange='document.location.hash = this.value'>")
  for target in sorted(targets.keys()):
    print("<option>%s</option>" % target)
  print("</select></p>")
  for target in sorted(targets.keys()):
    print("<h2>%s" % target)
    print("<a class=permalink href='#%s' name='%s'>#</a>" % (target, target))
    print("</h2>")
    print("<table width=100% cellspacing=0>")
    for symbol, path in sorted(targets[target]):
      htmlsymbol = cgi.escape(symbol).replace('::', '::<wbr>')
      print("<tr><td><div class=symbol>%s</div></td>" % htmlsymbol)
      print("<td valign=top><div class=file>%s</div></td></tr>" % path)
    print("</table>")
def Output ( iter ) : targets = { } for target , path , symbol in iter : entries = targets . setdefault ( target , [ ] ) entries . append ( ( symbol , path ) ) print ( TEMPLATE_HEADER ) print ( "<p>jump to target:" ) print ( "<select onchange='document.location.hash = this.value'>" ) for target in sorted ( targets . keys ( ) ) : print ( "<option>%s</option>" % target ) print ( "</select></p>" ) for target in sorted ( targets . keys ( ) ) : print ( "<h2>%s" % target ) print ( "<a class=permalink href='#%s' name='%s'>#</a>" % ( target , target ) ) print ( "</h2>" ) print ( "<table width=100% cellspacing=0>" ) for symbol , path in sorted ( targets [ target ] ) : htmlsymbol = cgi . escape ( symbol ) . replace ( '::' , '::<wbr>' ) print ( "<tr><td><div class=symbol>%s</div></td>" % htmlsymbol ) print ( "<td valign=top><div class=file>%s</div></td></tr>" % path ) print ( "</table>" )
Print HTML given an iterable of (target, path, symbol) tuples.
Print HTML given an iterable of ( target path symbol ) tuples .
"""Print HTML given an iterable of (target, path, symbol) tuples."""
iter