if $1x = x goto usage
if $2x = x goto default
if ! -r /crp/man/man$2/$1.$2 goto nofile
roff -h /crp/man/man0/aa /crp/man/man$2/$1.$2
exit

: default
if ! -r /crp/man/man1/$1.1 goto nofile
roff -h /crp/man/man0/aa /crp/man/man1/$1.1
exit

: usage
echo usage: man title "[section]"
exit

: nofile
echo file \'$1\' not in section
