#!/bin/rc -e # htwrap -- create standalone HTML document flagfmt='t, c charset, d dir, l lang, v doctype' args='[file ...]' if(! ifs=() eval `{aux/getflags $*}){ aux/usage exit usage } switch($flagv){ case 5 echo '' case 4 echo '' case 4s echo '' case x xhtml echo '' case xs xhtmls echo '' case '' echo '' case * echo error: unknown doctype $flagv >[1=2] aux/usage exit usage } echo -n '' if(! ~ $#flagc 0) echo '' fn source{ if(! ~ $#* 0) cat $* if not cat } if(! ~ $#flagt 0) # try to retrieve title from