4590289 [rkeene@sledge /home/rkeene/projects/rivet-cgi/rivet-tcl]$ cat -n rivet_command_document.tcl
   1: proc rivet_command_document {list} {
   2:     array set info $list
   3: 
   4:     puts "<HEAD>"
   5:     puts "<TITLE>$info(name) Documentation</TITLE>"
   6:     puts "</HEAD>"
   7:     puts "<BODY BGCOLOR=WHITE VLINK=blue>"
   8: 
   9:     puts "<CENTER>"
  10:     puts {<FONT SIZE="+3">}
  11:     puts "$info(name) - $info(package)"
  12:     puts "</FONT>"
  13:     puts "<BR>"
  14:     puts "<B>"
  15:     puts {<A HREF="#synopsis">Synopsis</A>}
  16:     puts " * "
  17:     puts {<A HREF="#description">Description</A>}
  18:     if {[info exists info(seealso)]} {
  19: 	puts " * "
  20: 	puts {<A HREF="#seealso">See Also</A>}
  21:     }
  22:     puts "</B>"
  23:     puts "</CENTER>"
  24: 
  25:     puts {<H3><A NAME="name" HREF="#name">Name</A></H3>}
  26:     puts "<B>$info(name) - $info(short)</B>"
  27: 
  28:     if {![info exists info(command)]} { set info(command) $info(name) }
  29: 
  30:     puts {<H3><A NAME="synopsis" HREF="#synopsis">Synopsis</A></H3>}
  31:     puts "$info(command)"
  32:     if {[info exists info(arguments)]} { puts "<I>$info(arguments)</I>" }
  33: 
  34:     puts {<H3><A NAME="description" HREF="#description">Description</A></H3>}
  35:     puts $info(description)
  36: 
  37:     if {[info exists info(seealso)]} {
  38: 	puts {<H3><A NAME="seealso" HREF="#seealso">See Also</A></H3>}
  39: 	puts $info(seealso)
  40:     }
  41: }
4590290 [rkeene@sledge /home/rkeene/projects/rivet-cgi/rivet-tcl]$

Click here to go back to the directory listing.
Click here to download this file.
last modified: 2002-04-17 19:05:45