########################################################################
# #
# This software is part of the ast package #
# Copyright (c) 1996-2012 AT&T Intellectual Property #
# and is licensed under the #
# Eclipse Public License, Version 1.0 #
# by AT&T Intellectual Property #
# #
# A copy of the License is available at #
# (with md5 checksum b35adb5213ca9657e911e9befb180842) #
# #
# Information and Software Systems Research #
# AT&T Research #
# Florham Park NJ #
# #
# Glenn Fowler <gsf@research.att.com> #
# #
########################################################################
# it keeps going and going ...
#
# \h'0*\w"URL"'HOT-TEXT\h'0' link goto with alternate url
# \h'0*1'HOT-TEXT\h'0' link goto
# \h'0/\w"LABEL"'TEXT\h'0' local link label with alternate text
# \h'0/1'LABEL\h'0' local link label
#
# .xx faq .VL is a FAQ list with all but current answer hidden
# .xx meta.NAME="CONTENT" <meta name="NAME" content="CONTENT">
# .xx label="LABEL" local link label request
# .xx link="URL\tHOT-TEXT" link goto with url request
# .xx linkframe="URL\tHOT-TEXT" link goto with url request (no target=_top)
# .xx link="HOT-TEXT" link goto request
# .xx linkframe="HOT-TEXT" link goto request (no target=_top)
# .xx ref="URL\tMIME-TYPE" head link hint
# .xx begin=internal begin internal text
# .xx end=internal end internal text
# .xx index=0|1 stop|reset header index
# .xx noFOO .xx FOO=0
#
# .sn file like .so but text copied to output
command=mm2html
USAGE=$'
[-?
@(#)$Id: mm2html (AT&T Research) 2012-02-29 $
]
[+DESCRIPTION?\bmm2html\b is a \bsed\b(1)/\bksh\b(1) script (yes!) that
converts input \bmm\b(1) or \bman\b(1) documents to an \bhtml\b
document on the standard output. If \afile\a is omitted then the
standard input is read. \btroff2html\b(1) is similar but does a full
\btroff\b(1) parse. \adir\a operands and directory components of
\afile\a operands are added to the included file search list.]
[f:frame?Generate framed HTML files in:]:[name]
{
[+man documents]
{
[+\aname\a\b.html?The parent frame page.]
[+\aname\a\b-toc.html?The table of contents (link)
frame.]
[+\aname\a\b-man.html?The (also standalone) man page
frame.]
}
[+other documents]
{
[+\aname\a\b.html?The main body.]
[+\aname\a\b-index.html?The frame index (if \b--index\b
specified).]
[+\aname\a\b-temp.html?Temporary frame goto labels.]
}
}
[g:global-index?Generate a standalone \bindex.html\b for framed HTML.]
[h:html?Read html options from \afile\a. Unknown options are silently
ignored. See the \b.xx\b request below for a description of the
options. The file pathname may be followed by URL style \aname=value\a
pairs that are evaluated as if they came from
\afile.\a]:[file[??name=value;...]]]
[l:license?Read license identification options from \afile\a. Unknown
options are silently ignored. See the \b.xx\b request below for a
description of the options. The file pathname may be followed by URL
style \aname=value\a pairs that are evaluated as if they came from
\afile\a.]:[file[??name=value;...]]]
[o:option?Sets a space or \b,\b separated list of \b--license\b
options. Option values with embedded spaces must be
quoted.]:[[no]]name=value]
[t:top?Open non-local urls in the top frame.]
[x:index?Generate a standalone \aname\a\b-index.html\b for framed HTML
where \aname\a is specified by \b--frame\b.]
[ [ dir | file ] ... ]
[+EXTENSIONS?\b.xx\b \aname\a[=\avalue\a]] is a special \bmm2html\b
request that handles program tracing, \bhtml\b extensions and \atroff\a
macro package magic. Supported operations are:]
{
[+author=text?Specifies the contact information for the
document HEAD section.]
[+background=URL?Specifies the document background URL.]
at the top of the document.]
[+mailto=address?Sets the email \aaddress\a to send comments
and suggestions.]
[+meta.name?Emits the \bhtml\b tag \b<META name=\b\aname\a
\bcontent=\b\acontent\a\b>\b.]
[+package=text?\atext\a is prepended to the \bhtml\b document
title.]
[+title=text?Sets the document title.]
}
[+?Local URL links are generated for all top level headings. These can
be referenced by embedding the benign (albeit convoluted) \atroff\a
construct \\h'\'$'0*\\w\"label\"'\'$'text\\h'\'$'0'\'$', where
\alabel\a is the local link label and \atext\a is the hot link text. If
\alabel\a and \atext\a are the same then use
\\h'\'$'0*1'\'$'text\\h'\'$'0'\'$'.]
[+?\bman\b(1) links are generated for bold or italic identifiers that
are immediately followed by a parenthesized number.]
[+FILES]
{
[+$HOME/.2html?Default rendering info.]
}
[+SEE ALSO?\btroff2html\b(1), \bhtml2rtf\b(1)]
'
;;
*) ARGV0=""
USAGE='f:gh:l:o:tx [ file ... ]'
;;
esac
set -o noglob
typeset -u upper
typeset -l OP
typeset -a list type
nl=$'\n'
license=(
)
html=(
BODY=(
bgcolor=#ffffff
)
TABLE=(
bgcolor=#ffd0d0
border=0
bordercolor=#ffffff
frame="void"
rules="none"
)
H1=(
)
FRAMESET=(
rows=80,*
border=0
)
home=(
href=
)
ident=1
index=(
left=
top=
)
labels=0
logo=(
src=
)
magic=(
plain='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">'
frame='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/frameset.dtd">'
)
width=96%
)
code=0
figure=1
file=
font=
hung=
inch=" "
pd=
pm=
primary=".BL|.IX"
ss="verdana,arial,helvetica,geneva,sans-serif"
top=
vg_ps=20
function setmacros
{
case $1 in
[[ ${set[html.labels]} ]] || html.labels=0
;;
*) mark=4
;;
esac
macros=$1
variant=$2
}
function options
{
typeset i o q v
IFS="${IFS},"
set $OPTARG
for i
do case $q in
'') o=${i%%=*}
v=${i#*=}
case $v in
\'*) q=\'; v=${v#?}; continue ;;
\"*) q=\"; v=${v#?}; continue ;;
esac
;;
*) v="$v $i"
case $i in
*$q) v=${v%?} ;;
*) continue ;;
esac
;;
esac
case $o in
no*) o=${o#no}
unset $o
;;
*) case $v in
"") v=1 ;;
esac
case $o in
*.*|[ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
eval $o="'$v'"
;;
*) eval license.$o="'$v'"
;;
esac
;;
esac
set[$o]=1
done
}
fi
{
OPTIND=0
exit 2
}
;;
;;
*\?*) . ${OPTARG%%\?*} || exit 1
eval "html+=( ${OPTARG#*\?} )"
;;
*) . $OPTARG || exit 1
;;
esac
;;
*\?*) . ${OPTARG%%\?*} || exit 1
eval "license+=( ${OPTARG#*\?} )"
;;
. $OPTARG || exit 1
;;
esac
;;
;;
t) top=1
;;
x) index=local
;;
*) usage
;;
esac
done
shift OPTIND-1
case $# in
if [[ ! -f $file ]]
exit 1
fi
x="-m $file"
;;
*) x=
;;
esac
if [[ -d $d ]]
then if [[ -w $d || -x $i/$command ]]
if [[ -x $i/$command ]]
then break
fi
fi
fi
done
function warning
{
}
function getfiles
{
sed \
-e 's%\\".*%%' \
-e 's%\\\.%.%g' \
-e 's%\\:%%g' \
-e 's%\\(>=%>=%g' \
-e 's%\\(<=%<=%g' \
-e 's%&%\&%g' \
-e $'s%\xA2%\\¢%g' \
-e $'s%\xA3%\\£%g' \
-e $'s%\xA7%\\§%g' \
-e $'s%\xA9%\\©%g' \
-e $'s%\xAE%\\®%g' \
-e $'s%\xB6%\\¶%g' \
-e 's%<%\<%g' \
-e 's%>%\>%g' \
-e 's%\[%\[%g' \
-e 's%\]%\]%g' \
-e 's%\\&%<!--NULL-->%g' \
-e 's%\\'\''%'\''%g' \
-e 's%\\`%`%g' \
-e 's%\\-%\-%g' \
-e 's%\\+%+%g' \
-e 's%\\0%\ %g' \
-e 's%\\|%\ %g' \
-e 's%\\\^%\ %g' \
-e 's%\\ %\ %g' \
-e 's%\\(+-%\±%g' \
-e 's%\\(-%=%g' \
-e 's%\\(ap%~%g' \
-e 's%\\(bu%\·%g' \
-e 's%\\(bv%|%g' \
-e 's%\\(co%\©%g' \
-e 's%\\(dg%\§%g' \
-e 's%\\(fm%'\''%g' \
-e 's%\\(rg%\®%g' \
-e 's%\\(sq%\¤%g' \
-e 's%\\(\*\([*`'\'']\)%\1%g' \
-e 's%\\\*\([*`'\'']\)%\1%g' \
-e 's%\\d\([^\\]*\)\\u%<SUB>\1</SUB>%g' \
-e 's%\\u\([^\\]*\)\\d%<SUP>\1</SUP>%g' \
-e 's%\\v\(.\)-\([^\\]*\)\1\(.*\)\\v\1+*\2\1%<SUB>\3</SUB>%g' \
-e 's%\\v\(.\)+*\([^\\]*\)\1\(.*\)\\v\1-\2\1%<SUP>\3</SUP>%g' \
-e 's%\\h'\''0\*\\w"\([abcdefghijklmnopqrstuvwxyz]*:[^"]*\)"'\''\([^'\'']*\)\\h'\''0'\''%<A href="\1" target=_top>\2</A>%g' \
-e 's%\\h'\''0\*\\w"\(/[^"]*\)"'\''\([^'\'']*\)\\h'\''0'\''%<A href="\1" target=_top>\2</A>%g' \
-e 's%\\h'\''0\*\\w"\([^"]*\)"'\''\([^'\'']*\)\\h'\''0'\''%<A href="\1">\2</A>%g' \
-e 's%\\h'\''0\*1'\''\([^:/'\'']*\)\\h'\''0'\''%<A href="#\1">\1</A>%g' \
-e 's%\\h'\''0\*1'\''\([abcdefghijklmnopqrstuvwxyz]*:[^'\'']*\)\\h'\''0'\''%<A href="\1" target=_top>\1</A>%g' \
-e 's%\\h'\''0\*1'\''\(/[^'\'']*\)\\h'\''0'\''%<A href="\1" target=_top>\1</A>%g' \
-e 's%\\h'\''0\*1'\''\([^'\'']*\)\\h'\''0'\''%<A href="\1" target=_parent>\1</A>%g' \
-e 's%\\h'\''0/\\w"\([^"]*\)"'\''\([^'\'']*\)\\h'\''0'\''%<A name="\1">\2</A>%g' \
-e 's%\\h'\''0/1'\''\([^'\'']*\)\\h'\''0'\''%<A name="\1">\1</A>%g' \
-e 's%\\s+\(.\)\([^\\]*\)\\s-\1%<FONT SIZE=+\1>\2</FONT>%g' \
-e 's%\\s+\(.\)\([^\\]*\)\\s0%<FONT SIZE=+\1>\2</FONT>%g' \
-e 's%\\s-\(.\)\([^\\]*\)\\s+\1%<FONT SIZE=-\1>\2</FONT>%g' \
-e 's%\\s-\(.\)\([^\\]*\)\\s0%<FONT SIZE=-\1>\2</FONT>%g' \
-e 's%\\f(\(..\)\([^\\]*\)%<\1>\2</\1>%g' \
-e 's%\\f[PR]%\\fZ%g' \
-e 's%\\f\(.\)\([^\\]*\)%<\1>\2</\1>%g' \
-e 's%<\([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789][-._abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*@[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.]*\)>%<SMALL>\<<A href=mailto:\1>\1</A>\></SMALL>%g' \
-e 's%\[[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]*[0123456789][0123456789][abcdefghijklmnopqrstuvwxyz]*]%<CITE>&</CITE>%g' \
-e 's%</*Z>%%g' \
-e 's%<[146789]>%%g' \
-e 's%</[146789]>%%g' \
-e 's%<2>%<EM>%g' \
-e 's%</2>%</EM>%g' \
-e 's%<3>%<STRONG>%g' \
-e 's%</3>%</STRONG>%g' \
-e 's%<5>%<TT>%g' \
-e 's%</5>%</TT>%g' \
-e 's%<B>%<STRONG>%g' \
-e 's%</B>%</STRONG>%g' \
-e 's%<I>%<EM>%g' \
-e 's%</I>%</EM>%g' \
-e 's%<L>%<TT>%g' \
-e 's%</L>%</TT>%g' \
-e 's%<X>%<TT>%g' \
-e 's%</X>%</TT>%g' \
-e 's%<CW>%<TT>%g' \
-e 's%</CW>%</TT>%g' \
-e 's%<EM>\([^<]*\)</EM>(\([0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*\))%<NOBR><A href="../man\2/\1.html"><EM>\1</EM></A>(\2)</NOBR>%g' \
-e 's%<STRONG>\([^<]*\)</STRONG>(\([0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*\))%<NOBR><A href="../man\2/\1.html"><STRONG>\1</STRONG></A>(\2)</NOBR>%g' \
-e 's%<TT>\([^<]*\)</TT>(\([0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*\))%<NOBR><A href="../man\2/\1.html"><TT>\1</TT></A>(\2)</NOBR>%g' \
-e 's%\\s+\(.\)\(.*\)\\s-\1%<FONT SIZE=+\1>\2</FONT>%g' \
-e 's%\\s-\(.\)\(.*\)\\s+\1%<FONT SIZE=-\1>\2</FONT>%g' \
-e 's%\\c%<JOIN>%g' \
-e 's%\\e%\\%g' \
-e 's,@MAN\([^@]\)EXT@,\1,g' \
-e '/^'\''[abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyz]\>/s%.%.%' \
-e '/^\..*".*\\/s%\\[^\*][^(]%\\&%g' \
"$@"
}
function getline
{
integer i n
typeset data a c d q v x y z
trap 'set -- "${text[@]}"' 0
return
fi
while :
do data=
while :
then eval exec "$fd>&-"
fi
continue
fi
return 1
}
case $a in
*\\) x=${a%%+(\\)}
a=${a#"$x"}
if (( ! ( ${#a} & 1 ) ))
break
fi
;;
break
;;
break
;;
esac
done
*\\[n\*]*)
a= i=0
while :
do c=${data:i++:1}
case $c in
"") break
;;
\\) x=${data:i:1}
case $x in
[n\*]) (( i++ ))
c=${data:i++:1}
case $c in
\() c=${data:i:2}
(( i += 2 ))
;;
\[) c=${data:i}
c=${c%%]*}
(( i += ${#c} + 1 ))
x='*'
;;
esac
case $x in
n) a=$a${nr[$c]} ;;
*) a=$a${ds[$c]} ;;
esac
continue
;;
\\) a=$a$c
while :
do c=${data:i++:1}
case $c in
\\) ;;
*) break ;;
esac
a=$a$c
done
;;
esac
;;
esac
a=$a$c
done
data=$a
;;
esac
;;
*[\"]*)
unset v
a= i=0 n=0 q=
while :
do c=${data:i++:1}
case $c in
"") break ;;
esac
case $c in
$q) q=
case $c in
\>) ;;
*) continue
;;
esac
;;
[\"\<]) case $q in
\<) q=\>
;;
*) q=$c
continue
;;
esac
;;
esac
;;
\ |\ )
case $q in
?*) v[n++]=$a
a=
;;
esac
continue
;;
esac
;;
esac
a=$a$c
done
case $a in
?*) v[n++]=$a ;;
esac
set -A text -- "${v[@]}"
;;
;;
esac
set -- "${text[@]}"
shift
x=$1
shift
then warning "unmatched ${text[0]}"
n=0
fi
;;
.i*) case $x in
!*) x=${x#?}
n=1
;;
*) n=0
;;
esac
case $x in
t|\'@(*)\'\1\'|+([\-+0123456789])=\1)
(( n = ! n ))
;;
+([\-+0123456789])=+([\-+0123456789]))
;;
[0123456789]*[0123456789])
(( n = $x ))
;;
esac
esac
;;
esac
if (( ! n ))
then case $@ in
\\\{*|\{*)
*\\\}|*\}) break ;;
esac
done
;;
esac
continue
fi
IFS=' '
set -A text -- $@
esac
;;
for d in "${dirs[@]}"
do if [[ -f "$d$x" ]]
file=$d$x
continue 2
fi
done
continue
;;
set -- "${text[@]}"
shift
while :
do case $# in
0) break ;;
esac
nam=${1%%=*}
val=0
;;
*) case $1 in
*=*) val=${1#*=}
;;
*) val=1
;;
esac
;;
esac
shift
begin|end)
set -- $val
end) upper=/$1 ;;
esac
shift
case $# in
esac
then print -r -- "$val"
fi
;;
;;
0) labels=-1 ;;
*) labels=0 ;;
esac
;;
*' '*)
;;
*'\\t'*)
;;
;;
esac
*[:/.]*) pfx= ;;
esac
*'${html.'*'}'*)
;;
esac
fi
;;
tar=" target=_top"
;;
esac
;;
esac
;;
esac
then [[ -f $framebody ]] && rm $framebody
fi
;;
esac
case $framelink in
esac
;;
esac
;;
;;
;;
;;
;;
;;
esac
done
'') continue ;;
esac
break
;;
esac
;;
esac
set -- "${text[@]}"
op=$1
shift
2':('[0123456789]*')'*([,.?!:;]))
x=${2#'('*')'}
y=${2%$x}
z=${y#'('}
z=${z%')'}
esac
*) set -A text -- "<NOBR><A href=\"${html.man:=../man}/man$z/$1.html\"><$font1>$1</$font1></A>$y$x</NOBR>" ;;
esac
break
;;
esac
;;
esac
0:*) ;;
*:man:.?)
set -- "$*"
;;
esac
case $# in
0) getline
set -- "$*"
;;
esac
;;
font=
;;
esac
?) font2=R
;;
;;
esac
R) font1= ;;
esac
R) font2= ;;
esac
while :
do case $# in
0) break ;;
esac
esac
case $1 in
"") ;;
*"<FONT SIZE"*)
esac
;;
*"<FONT SIZE"*)
esac
shift
;;
esac
;;
esac
;;
esac
shift
done
font=
;;
*) pd= ;;
esac
continue
;;
;;
.SB) set -- "${text[@]}"
shift
case $# in
0) getline ;;
esac
set -A text -- "<FONT SIZE=-2><B>""$@""</B></FONT>"
;;
.SG) continue
;;
.SM) set -- "${text[@]}"
shift
case $# in
0) getline ;;
esac
set -A text -- "<FONT SIZE=-2>""$@""</FONT>"
;;
case $x in
?*) text[0]=$x ;;
esac
;;
esac
;;
;;
esac
break
done
do z=${tr[$a]}
for (( i = 0; i < ${#text[@]}; i++))
do if [[ $a == \\* ]]
fi
done
done
fi
trap 'set -- "${text[@]}"' 0
}
function ident
{
ident=1
esac
print -r -- "<HTML>"
print -r -- "<HEAD>"
print -r -- "<META name=\"generator\" content=\"${version//'&'/'&'}\">${meta}"
}
function index
{
if [[ ! $indexed ]]
then indexed=1
if [[ ! $frame && ${html.labels} != 0 ]]
then redirect_old=9 redirect_new=8
eval "exec $redirect_old>&1"
eval "exec 1>$t"
eval "exec $redirect_new<$t"
rm -f $t
else print -r -- "<!--INDEX--><!--/INDEX-->"
fi
fi
}
function title
{
esac
print -r -- "<TITLE>" $* "</TITLE>"
case ${license.author} in
esac
esac
print -r -- "<STYLE>
#notes {
position:relative;
text-align:center;
visibility:hidden;
background:#bbbbbb;
}
#tutorial {
position:relative;
text-align:center;
visibility:hidden;
background:papayawhip;
}
</STYLE>
</HEAD>"
return
;;
esac
then print -r -- '<SCRIPT type="text/javascript">
var A, P, Q;
function FAQ_mark(mark) {
P = null;
for (var i = 0; i < A.length; i++)
A[i].className = mark;
}
function FAQ_init() {
Q = document.getElementsByTagName("dt");
A = document.getElementsByTagName("dd");
FAQ_mark("hide");
for (var i = 0; i < Q.length; i++) {
Q[i].onclick=function() {
var next = this.nextSibling;
while (next.nodeType != 1)
next = next.nextSibling;
if (P != null && P != next)
P.className = "hide";
if (next.className == "hide") {
next.className = "show";
P = next;
}
else {
next.className = "hide";
P = null;
}
}
}
}
window.onload = FAQ_init;
</SCRIPT>'
fi
div.FI { padding-left:2em; text-indent:0em; }
div.HI { padding-left:4em; text-indent:-2em; }"
then print -r -- "dt { margin: 15px 40px 5px; cursor: pointer; }
dt:before {
content: \"Q\";
font-family: Georgia, \"Times New Roman\", Times, serif;
margin-right: 7px;
padding: 2px 6px 5px;
color: #FFD87D;
background-color: teal;
font-weight: normal;
margin-left: -35px;
position: relative;
}
dd { margin: 25px 70px 0px; }
li { padding: 2px 0; }
.show { display: block; }
.hide { display: none; }"
else print -r -- "dt { float:left; clear:both; }
dd { margin-left:3em; }"
fi
print -r -- "</STYLE>
</HEAD>"
case ${html.heading} in
?*) case ${html.heading} in
?*) html.toolbar=
hit=
if [[ -f ${html.heading} ]]
then hit=${html.heading}
elif [[ -f $HOME/${html.heading} ]]
then hit=$HOME/${html.heading}
else IFS=:
for i
do if [[ -f ${i%/bin}/lib/${html.heading} ]]
then hit=${i%/bin}/lib/${html.heading}
break
fi
done
fi
code=1
;;
*) eval "cat <<!
!"
;;
esac
;;
esac
;;
case $macros:${html.width} in
man:*|*:)
;;
?*) case ${html.width} in
*%) x="align=center " ;;
*) x="" ;;
esac
print -r -- "<TABLE border=0 ${x}width=${html.width}>$nl<TBODY><TR><TD valign=top align=left>"
;;
esac
case ${html.ident}:${logo} in
*:*"src=''"*|*:)
;;
1:?*) case ${html.home.href} in
?*) html.home.href=${html.home.href%/*.html}/
;;
;;
esac
;;
esac
;;
esac
then index
fi
;;
esac
?*) print -r "$pm"
;;
esac
trailer="${trailer}${nl}</BODY>"
}
function heading
{
integer count
shift
.H) case $# in
0) count=1 ;;
*) count=$1; shift ;;
esac
then lnk=${2#link=}
set -- "$1"
fi
;;
options=" align=center"
;;
*) count=2
options=" align=center"
;;
esac
".H"*" 1")
print -n -r -- "$mm_H1"
mm_H1="<P><HR>"
;;
esac
case $* in
"") print -r -- "<P>"
;;
for i in $o
do case $i in
end="</CENTER>$end"
;;
end="</FONT>$end"
;;
esac
done
txt=$*
if [[ $lnk ]]
fi
then last_level=$count
fi
;;
esac
}
function tbl_attributes
{
typeset d f i u x
typeset -F0 w
case $1 in
esac
case $i in
x=${i##*[wW]\(}
x=${x%%\)*}
u=${x##+([0-9.])}
x=${x%$u}
case $u in
c) (( w=x*75/2.54 )) ;;
i) (( w=x*75 )) ;;
m) (( w=x*75*12/72 )) ;;
n) (( w=x*75*12/72/2 )) ;;
p) (( w=x*75/72 )) ;;
P) (( w=x*75/6 )) ;;
*) (( w=x*75*12/72/2 )) ;;
esac
a="$a width=$w"
;;
esac
case $i in
esac
case X$i in
esac
}
typeset Sm=" "
function mandoc
{
op=$1
shift
while (( $# ))
do case $1 in
shift
continue
;;
shift
p=$*
while getline
do if [[ $p ]]
then set -- $p "$@"
p=
fi
if (( $# ))
then o=$1
shift
case $o in
$c) break
;;
o=${o#.}
t+=$a
;;
esac
fi
done
case $c in
esac
continue
;;
esac
o=$1
shift
then a=""
nsp=""
then a=""
then # NOTE: local 'a' should work here -- might not be possible with nameref #
shift $#
else a=$1
shift
do a+="$sp$1"
shift
done
fi
case $o in
*) t+="$o" ;;
esac
done
then sp=""
t+="<BR>"
else sp="n"
fi
print -${sp}r "$t"
;;
;;
-*) print -nr "$t"
;;
ret=$t
;;
esac
}
function nohang
{
then typeset a=${1//'<'*([^'>'])'>'/}
a=${a//'&'*([^';'])';'/X}
(( ${#a} >= 5 )) && print "<BR>"
fi
}
exec > $framebody || exit
fi
dirs[++ndirs]=""
for i
do if [[ -d $i ]]
then dirs[++ndirs]=$i/
if [[ $i == */* ]]
then dirs[++ndirs]=${i%/*}/
fi
fi
done
document="${files[@]}"
while :
do getline || {
set -- .TL
}
case $1 in
.) : comment
;;
.*) op=$1
shift
;;
;;
.AF) case $mm_AF_cur in
esac
;;
print -r -- "<DIV class=SH>"
print -r -- "<OL>"
;;
[0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ])
print -r -- "<OL type=\"$1\">"
;;
esac
;;
print -r -- "<DL>"
;;
esac
;;
esac
;;
then nf=0
print -r -- "</PRE>"
fi
then ce=0
print -r -- "</CENTER>"
fi
while :
print -rn -- "</${list[lists--]}>"
esac
;;
*) break
;;
esac
done
;;
esac
fi
print -r -- "<P>"
end=
?*) mm_H1="<P><HR>"
case ${mm_AU}${mm.author}${mm.keywords} in
?*) print -r -- "<CENTER>" ;;
esac
do case $i in
end="</CENTER>$end"
;;
end="</FONT>$end"
;;
esac
done
?*) IFS=:
set -- ${mm.author#:} : "$@"
while :
do case $# in
0) break ;;
esac
x=$1
shift
case $x in
:) break ;;
esac
print -r -- "$x<BR>"
done
;;
esac
?*) print -r -- "$mm_AU"
case $mm_AF_cur in
esac
esac
;;
esac
case ${mm_AU}${mm.author}${mm.keywords} in
?*) print -r -- "</CENTER>" ;;
esac
;;
esac
.AS) print -r -- "<P>"
;;
0) count=1 ;;
*) count=$1 ;;
esac
print -r -- "<CENTER>"
do print -r -- "$data<BR>"
done
print -r -- "</CENTER>"
;;
.CE) if [[ $1 != 0 ]]
then ce=1
print -r -- "<CENTER>"
fi
;;
print -r -- "</${list[lists]}>"
done
n=IN
i=FI
if [[ $macros == man && $* == DESCRIPTION && ${html.labels} != 0 ]]
then index
fi
heading .H 2 "$@"
if [[ $* == SYNOPSIS ]]
then i=HI
fi
;;
*) heading .H 3 "$@"
;;
esac
print -r -- "<DIV class=$i>"
;;
;;
esac
;;
;;
.AU) case $mm_AF_cur in
esac
;;
esac
mm_AF="${mm_AF_cur}</I>"
mm_AF_cur=""
;;
esac
mm_AU="${mm_AU}<BR>$1"
;;
i=
do i=$i${list[n]}
done
case $i in
*) i=square ;;
esac
print -r -- "<UL type=$i>"
;;
unset parm
while [[ $1 == *=* ]]
then center=1
else eval parm+="( ${1%%=*}='${1#*=}' )"
fi
shift
done
unset oparm
i=$1
then print "<CENTER>"
fi
for i
do f=
for d in "${dirs[@]}"
do if [[ -f "$d$i" ]]
then f=$d$i
break
fi
done
if [[ ! $f ]]
fi
if [[ ! ${oparm.alt} ]]
then u=${i##*/}
u=${i%.*}
fi
if [[ ! ${oparm.title} ]]
then u=${i##*/}
u=${i%.*}
if [[ ${parm.category} ]]
then u="${parm.category} $u"
elif [[ ${oparm.category} ]]
then u="${oparm.category} $u"
fi
fi
done
then print "</CENTER>"
fi
else i=${i%.*}.gif
esac
f=
for d in "${dirs[@]}"
do if [[ -f "$d$1" ]]
then f=$d$1
break
fi
done
if [[ ! $f ]]
elif [[ $f -nt $i ]]
then ps2gif $f $i
fi
print -r -- "<CENTER><IMG src=\"$i\"></CENTER>"
fi
;;
;;
then nf=0
print -r -- "</PRE>"
fi
;;
then nf=1
print -r -- "<PRE>"
fi
;;
man) ;;
*) print -r -- "${ds[Dt]}" ;;
esac
;;
do print -r -- "</${list[lists]}>"
.EX) break ;;
esac
done
then nf=0
print -r -- "</PRE>"
fi
if [[ $fg ]]
then print -r -- "<H4 align=center>$fg</H4>"
fi
;;
;;
print -r -- "<DIV class=FI>"
then nf=1
print -r -- "<PRE>"
else print "<BR>"
fi
case $# in
2) fg="Figure $1: $2" ;;
*) fg= ;;
esac
;;
.FE) print -r -- ' ] '
;;
;;
.FS) print -r -- ' [ '
;;
;;
.H[01234])
n=${op#.H}
while [[ ${type[lists]} == .H[01234] ]]
do m=${type[lists]#.H}
(( m <= n )) && break
print -r -- "</${list[lists--]}>"
done
print -r -- "<DL>"
fi
fi
;;
while :
print -rn -- "</${list[lists--]}>"
esac
;;
*) break
;;
esac
done
;;
esac
fi
print -r -- "<P>"
;;
;;
esac
print -r -- "<DL>"
fi
set -- "<TT>$*</TT>"
;;
;;
esac
;;
esac
;;
0) getline ;;
esac
then print -rn -- "${pd}"
fi
print -r -- "<DT>$*<DD>$hung"
;;
esac
print -r -- "<LI>$*"
;;
esac
;;
while getline
do case $1 in
.RF) break ;;
esac
done
ds[Rf]="<FONT SIZE=-6>[$reference]</FONT>"
continue
;;
esac
print -r -- "<DIV class=FI>"
;;
do print -r -- "</${list[lists]}>"
$op) break ;;
esac
done
print "<BR>"
;;
;;
case ${type[@]} in
do print -r -- "</${list[lists]}>"
.AL) break ;;
esac
done
;;
;;
esac
;;
;;
then print -r -- "<BR>"
fi
;;
then x="<A href=\"mailto:$*\">$*</A>"
print -nr -- "$*" "$x"
fi
;;
;;
print -r -- "<OL>"
;;
.OK) mm.keywords="$*"
;;
print -nr -- " [<B>$1</B>"
if (( $# > 1 ))
then shift
print -nr -- " <I>$*</I>"
fi
print -nr -- "]"
while [[ ${type[lists]} == .H[01234] ]]
do print -r -- "</${list[lists--]}>"
done
print -r -- "<DL>"
fi
x=""
if [[ $1 != - ]]
then x="$x-<B>$1</B>"
fi
if [[ $2 != - ]]
then if [[ $1 != - ]]
then x="$x, "
fi
x="$x--<B>$2</B>"
if [[ $4 != - ]]
then if [[ $3 == *optional* ]]
then x="$x[=<I>$4</I>]"
else x="$x=<I>$4</I>"
fi
fi
elif [[ $4 != - ]]
then if [[ $3 == *optional* ]]
then x="$x [<I>$4</I>]"
else x="$x <I>$4</I>"
fi
fi
fi
;;
x="$4<STRONG>-$1</STRONG><I>$2</I>"
case $3 in
'[]') x="[ $x ]" ;;
?*) x="$x$3" ;;
esac
;;
esac
print -r -- "$x"
;;
.PM|.pM)case ${html.company} in
esac
case $1 in
esac
.pM) pm="<TABLE align=center cellpadding=2 border=4 bgcolor=lightgrey><TR><TD><FONT face=\"${ss}\"><B>${pm}</B></FONT></TD></TR></TABLE>" ;;
esac
;;
esac
;;
;;
;;
;;
then man_SY=1
print -nr -- "<B>$1</B> "
fi
;;
esac
case ${html.title} in
?*) title=${html.title}
;;
esac
;;
esac
esac
case $4 in
esac
case $5 in
;;
*) sec=$5
;;
esac
if [[ $frame ]]
then TOP="target=_top "
else TOP=
fi
MAN="$1($2)"
print -r -- "<A name=\"$MAN\"></A>"
print -r -- "<H3><TABLE width=100%><TBODY><TR><TH align=left>$MAN</TH><TH align=center><A href=\".\" ${TOP}title=\"Index\">$sec</A></TH><TH align=right>$MAN</TH></TR></TBODY></TABLE></H3>"
print -r -- "<HR>"
;;
case ${html.title} in
esac
;;
esac
;;
;;
.TS) # undent ...
case $1 in
;;
esac
unset opts
eval "opts=${html.TABLE}"
unset opts.width opts.align
tbl_ns=3
tbl_sp=' '
tab=$'\t'
while :
while getline
do set -- ${@//[-\|_=]/ }
case $# in
0) continue ;;
esac
case $1 in
'.T&'*) continue
;;
then warning ".TS H without .TH"
eval "exec $tbl_fd>&-"
trap - 0 1 2 3
then print -r -u$tbl_fd -- "</THEAD><TBODY>"
fi
fi
continue 3
;;
esac
case $* in
for i in ${@//[,\;]/ }
do case $i in
;;
expand) opts.align=center opts.width="99%"
;;
opts.frame="box"
opts.rules="all"
;;
opts.frame="void"
opts.rules="none"
;;
opts.frame="box"
opts.rules="none"
;;
;;
;;
esac
;;
esac
done
;;
*".") break
;;
esac
done
case ${opts.border} in
0) opts.cellpadding=0
unset opts.bgcolor
;;
*) case ${opts.cellpadding} in
esac
case ${opts.cellspacing} in
esac
;;
esac
case ${opts.border} in
esac
print -r -- "<P></P><TABLE border=0 frame=void rules=none width=100%><TBODY><TR><TD>$nl<TABLE" ${opts/'('@(*)')'/\1} ">"
then print -r -u$tbl_fd -- "<THEAD>"
else print -r -u$tbl_fd -- "<TBODY>"
fi
fi
do getline || break
case $1 in
[_=]*) ((n--)); continue ;;
esac
set -- $*
set -A Q ${tbl[n]}
(( q=0 ))
(( s=1 ))
while :
do i=${Q[q++]}
case $i in
''|.) break
;;
x=${i//[[:alpha:]]/}
case $x in
+([0-9]))
then tbl_ns=$x
tbl_sp=''
done
fi
esac
;;
esac
a=
case $q in
1) b='' ;;
*) b=$tbl_sp ;;
esac
case ${Q[q]}:$# in
:*|*:[01]) e='' ;;
*) e=$tbl_sp ;;
esac
case $i in
esac
tbl_attributes "$i"
while [[ ${Q[q]} == *s* ]]
do (( s++ ))
(( q++ ))
done
if (( s > 1 ))
then a="$a colspan=$s"
(( s=1 ))
fi
v=$1
case $i in
*'=>'*) v="<A href=\"${v##*'=>'}\">${v%'=>'}</A>" ;;
*) v="<A href=\"$v\">$v</A>" ;;
esac
esac
case $# in
0|1) break ;;
esac
shift
done
print -r -u$tbl_fd -- "</TR>"
done
prev=
set -A Q ${tbl[n]}
while getline
do case $1 in
continue 2
;;
then print -r -u$tbl_fd -- "</THEAD>"
fi
eval "exec $tbl_fd>&-"
trap - 0 1 2 3
fi
print -r -u$tbl_fd -- "<TBODY>"
continue
;;
then warning ".TS H without .TH"
eval "exec $tbl_fd>&-"
trap - 0 1 2 3
print -r -u$tbl_fd -- "</THEAD><TBODY>"
fi
break
;;
esac
set -- $*
case $* in
;;
IFS=$'\t'
case $* in
set -- '_'
;;
set -- '='
;;
*) rule=0
;;
esac
(( q=0 ))
while :
do i=${Q[q++]}
case $i in
''|.) break
;;
x=${i//[[:alpha:]]/}
case $x in
+([0-9]))
then tbl_ns=$x
tbl_sp=''
done
fi
esac
;;
esac
a=
case $q in
1) b='' ;;
*) b=$tbl_sp ;;
esac
case ${Q[q]}:$# in
:*|*:[01]) e='' ;;
*) e=$tbl_sp ;;
esac
case $1 in
$'\n_'|'_')
;;
$'\n='|'=')
;;
*) tbl_attributes "$i"
;;
esac
case $# in
0|1) break ;;
esac
shift
done
print -r -u$tbl_fd -- "</TR>"
prev=
;;
esac
done
break
done
print -r -- "</TBODY></TABLE></TD></TR></TBODY></TABLE>"
# ... indent
;;
;;
;;
.UE) if [[ $1 ]]
then getline
fi
print -r -- "$*"
;;
.UR) x="<A href=\"$*\">$*</A>"
print -nr -- "$*" "$x"
;;
;;
;;
then man_SY=0
print -r -- "$*"
fi
;;
;;
;;
;;
then print "<P>"
else print "<BR>"
fi
;;
;;
;;
t=
while getline
do case $1:$2 in
$op:) break ;;
esac
t=$t$nl$*
done
then ds[$x]=${t#?}
fi
;;
end=..
0:*) ;;
*:.ig) end=$1 ;;
esac
while getline
do case $1 in
$end) break ;;
esac
done
;;
;;
shift
;;
;;
;;
.f[tBILPR])
.f[BILPR])
set -- ${op#.f}
;;
esac
case $1 in
print -n -r -- "<$font>"
;;
print -n -r -- "<$font>"
;;
?*) print -n -r -- "</$font>"
font=
;;
esac
;;
esac
;;
;;
;;
;;
;;
;;
do print -r -- "</${list[lists]}>"
.in) break ;;
esac
done
;;
print -r -- "<DIV class=HI>"
;;
esac
print "<BR>"
;;
;;
;;
;;
;;
;;
shift
;;
;;
;;
[-+][0123456789])
print -r -- "<FONT SIZE=$1>"
;;
esac
;;
;;
'') ;;
#( eval PATH=$HTMLPATH "$*" ) > $file
file=$1
;;
esac
;;
do if [[ -f "$d$1" ]]
then cat "$d$1"
continue 2
fi
done
;;
while [[ ${type[lists]} == .H[01234] ]]
do print -r -- "</${list[lists--]}>"
done
case $1 in
[0123456789]*)
count=$1
print -r -- "<BR>"
done
;;
*) print -r -- "<P>"
;;
esac
;;
;;
;;
.tr) x=$1
while [[ $x ]]
do if [[ $x == '\('??* ]]
then f=${x:0:4}
x=${x#????}
else f=${x:0:1}
x=${x#?}
fi
i=${x#?}
t=${x%$i}
x=$i
tr_chars+=\\$f
done
;;
;;
;;
inch=" "
set +o noglob
rm -f [0123456789][0123456789].html index.html outline.html
set -o noglob
header='<BASEFONT face="geneva,arial,helvetica" size=5>'
title "${2//\<*([!>])\>/}"
print "<BODY bgcolor='#ffffff'>"
print "${pm}<CENTER>"
print "<BR><H1><FONT color=red>$2</FONT></H1><BR>"
case $# in
0|1|2) ;;
*) shift 2
for name
print -- "<BR>$name"
done
;;
esac
print "</CENTER>"
print "<P>"
;;
.vH) print -r -- "<CENTER>
<BR>
<H1><FONT color=red> $1 </FONT></H1>
<BR>
</CENTER>"
;;
do print -r -- "</${list[lists--]}>"
done
print -r -- "${trailer}
</HTML>"
title "${1//\<*([!>])\>/}"
print "<BODY bgcolor='#ffffff'>"
print "${pm}<CENTER>"
print "<BR><H1><FONT color=red>$1</FONT></H1>"
print "</CENTER>"
print "<P>"
;;
.nS) print -r -- "<DIV id='notes'>"
;;
.tS) print -r -- "<DIV id='tutorial'>"
;;
;;
.A[cdoqrt]|.B[coqx]|.C[dm]|.D[coqvx]|.E[mrvx]|.F[acdlnotx]|.I[cnx]|.L[bi]|.N[ox]|.Ox|.P[acfoq]|.Q[cloq]|.Rv|.S[coqty]|.T[an]|.Ux|.V[at]|.Xo)
;;
;;
-nosplit)
;;
-*) ;;
*) if (( $# >= 2 ))
then print -nr -- "$1 $2 "
shift 2
else print -r -- "$1"
fi
;;
esac
;;
;;
.Bl) i=
for o
do case $o in
esac
done
case $i in
print -r -- "<OL>"
;;
print -r -- "<UL $i>"
;;
print -r -- "<DIV class=FI>"
print -r -- "<DL>"
;;
esac
;;
print -r -- "<DL><DT><DD>$*</DL>"
;;
print -r -- "<DL><DT><DD><TT>$*</TT></DL>"
;;
;;
;;
then getline
then x=$1
shift
set -- "${x#.}" "$@"
fi
fi
peek=1
;;
;;
print -nr -- "<B>${ds[Nm]}</B> "
;;
;;
;;
;;
.Pp) print -r -- "<P>"
;;
.Re) print -r -- ".<P>"
;;
.Rs) print -r -- "<P>"
Rs_sep=''
;;
esac
;;
esac
;;
.Sx) print -r -- "<NOBR><A href=\"#$1\">$1</A>$2</NOBR>"
;;
;;
Rs_sep=", "
;;
Rs_sep=", "
;;
Rs_sep=", "
;;
Rs_sep=", "
;;
Rs_sep=", "
;;
;;
esac
;;
[\ \ ]*)
prefix="<TT><PRE>"
while :
do case $1 in
*([\ \ ]))
1) leading= ;;
esac
;;
[\ \ ]*)
;;
break
;;
esac
getline || break
done
"") print -r -- "</PRE></TT>" ;;
esac
;;
*) print -r -- "$*"
;;
esac
;;
*) print -r -- "$*" ;;
esac
;;
*) print -r -- "$*"
;;
esac
done
do print -r -- "</${list[lists--]}>"
done
case $references in
?*) heading .H 1 References
print "<P>"
print "<DL compact>"
print -r -- "$references"
print "</DL>"
;;
esac
then print -r "<TABLE cellpadding=4>
<TR>
<TD bgcolor=teal><A href='#' onclick='FAQ_mark(\"show\")'><FONT color=\"#FFD87D\">show all answers</FONT></A></TD>
<TD bgcolor=teal><A href='#' onclick='FAQ_mark(\"hide\")'><FONT color=\"#FFD87D\">hide all answers</FONT></A></TD>
</TR>
</TABLE>"
fi
print -r -- "<P>"
print -r -- "<HR>"
print -r -- "<TABLE border=0 align=center width=96%>"
case ${html.ident} in
1) case ${license.author} in
?*) IFS=',+'
set -- ${license.author}
d=""
sp=""
for a
do v=${contributor[$a]}
case $v in
?*) a=$v ;;
esac
IFS='<>'
set -- $a
case $2 in
sp=", "
set -- $1
d="$d$*</A>"
;;
esac
done
;;
*) case ${html.MAILTO} in
esac
;;
esac
for i in "${license.organization}" "${license.corporation} ${license.company}" "${license.address}" "${license.location}" "${license.phone}"
do case $i in
''|' ') ;;
esac
done
;;
esac
do print -r -- "<TR>$nl<TD align=left>${dl[dls]}</TD>$nl<TD align=center>${dc[dls]}</TD>$nl<TD align=right>${dr[dls]}</TD>$nl</TR>"
done
print -r -- "</TABLE>"
print -r -- "<P>"
case ${html.footing} in
?*) html.toolbar=
hit=
if [[ -f ${html.footing} ]]
then hit=${html.footing}
elif [[ -f $HOME/${html.footing} ]]
then hit=$HOME/${html.footing}
else IFS=:
for i
do if [[ -f ${i%/bin}/lib/${html.footing} ]]
then hit=${i%/bin}/lib/${html.footing}
break
fi
done
fi
code=1
;;
*) eval "cat <<!
!"
;;
esac
;;
esac
case ${html.toolbar} in
?*) hit=
if [[ -f ${html.toolbar} ]]
then hit=${html.toolbar}
elif [[ -f $HOME/${html.toolbar} ]]
then hit=$HOME/${html.toolbar}
else IFS=:
for i
do if [[ -f ${i%/bin}/lib/${html.toolbar} ]]
then hit=${i%/bin}/lib/${html.toolbar}
break
fi
done
fi
code=1
;;
*) eval "cat <<!
!"
;;
esac
;;
esac
print -r -- "$trailer"
then mv $framebody $frame-man.html
{
print -r -- "<TITLE>$file table of contents</TITLE>"
[[ ${html.menu.style} ]] && print -r -- "${html.menu.style}"
[[ ${html.menu.script} ]] && print -r -- "${html.menu.script}"
print -r -- "</HEAD>"
[[ ${html.menu.id} ]] && print -r -- "<DIV id=${html.menu.id}>"
print -r -- "<UL>"
print -r -- "<UL>"
done
print -r -- "</UL>"
done
done
print -r -- "</UL>"
done
print -r -- "</UL>"
[[ ${html.menu.id} ]] && print -r -- "</DIV>"
print -r -- "</BODY>"
print -r -- "</HTML>"
{
print -r -- "<BASE>"
print -r -- "</HEAD>"
print -r -- "<FRAMESET cols=\"20%,80%\" framespacing=0 frameborder=0 border=0>"
print -r -- "</FRAMESET>"
print -r -- "</HTML>"
} > $framebody
else exec > $frame-temp.html || exit
print -r -- "<B><FONT size=-1 face=\"${ss}\">"
print -r -- "<TABLE align=center cellpadding=2 border=4 bgcolor=lightgrey><TR>"
do print -r -- "<TD><A href=\"#${label[n]}\">${label[n]}</A></TD>"
done
print -r -- "</TR></TABLE>"
print -r -- "</FONT></B>"
ed $framebody <<!
/<!--INDEX-->/r $frame-temp.html
w
q
!
fi
fi
local) exec > $frame-index.html || exit ;;
global) exec > index.html || exit ;;
esac
case $framelink in
esac
print -r -- "<TITLE>$title</TITLE>$framerefs
</HEAD>"
if [[ ${html.frameindex} && -f ${html.frameindex} ]]
else print -r -- " <FRAMESET" ${html.FRAMESET/'('@(*)')'/\1} ${html.index.top.FRAMESET/'('@(*)')'/\1} ">
<FRAME" marginwidth=0 marginheight=0 ${html.FRAME/'('@(*)')'/\1} ${html.index.top.FRAME/'('@(*)')'/\1} "scrolling=no>
<FRAME" marginwidth=0 marginheight=0 ${html.FRAME/'('@(*)')'/\1} src="'$framelink'" "scrolling=auto>
</FRAMESET>"
fi
print -r -- "</HTML>"
;;
esac
;;
*) if [[ $redirect_old ]]
then eval "exec 1>&$redirect_old $redirect_old>&-"
fi
then html.labels=7
fi
print -r -- "<!--LABELS-->"
print -r -- "<B><FONT size=-1 face=\"${ss}\">"
print -r -- "<TABLE align=center cellpadding=2 border=4 bgcolor=lightgrey width=90%><TR>"
do print -r -- "<TD align=center valign=center><A href=\"#${label[n]}\">${label[n]}</A></TD>"
then print -r -- "</TR><TR>"
fi
done
print -r -- "</TR></TABLE>"
print -r -- "</FONT></B>"
print -r -- "<!--/LABELS-->"
fi
if [[ $redirect_new ]]
then eval "cat <&$redirect_new"
fi
;;
esac
exec > index.html
title "${outline[01]//\<*([!>])\>/}"
print -r -- "<FRAMESET marginheight=0 marginwidth=0 cols='135,*,66' border=0 noresize onload='goto_slide(1)'>
<FRAME src=../lib/start.html name='slide' noresize scrolling=auto marginwidth=0 marginheight=0>
</FRAMESET>
</HTML>"
exec > outline.html
title "${title} outline"
print -r -- "<BODY bgcolor='#ffffff'>
${pm}<CENTER>
<BR><H1><FONT color=red>outline</FONT></H1>
<P>
<TABLE cellspacing=1 cellpadding=1 border=1 class=box>"
do print "<TR><TD><A href='javascript:goto_slide(${page#0})'><CENTER>${outline[$page]}</CENTER></A></TD></TR>"
done
print "</TABLE>
</CENTER>
</BODY>
</HTML>"
;;
esac
exit $code