if $11 = 1 goto usage
if $22 = 2 goto default
if ! -r  /usr/man/man$2/$1.$2 goto nofile
roff /usr/man/man0/aa /usr/man/man$2/$1.$2
exit

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

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

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