MAN=$PUBKIN/MAN
HINT=NO
FUNC=LIST
case $1 in
	-h|help|hint)	HINT=YES;;
	-w)				FUNC=WHAT;;
	*)				;;
esac
if test $HINT = YES
then
more <<\HINT
==========
ksysdoc [-options] [name(s)]
==========
OPTIONS
==========
-w      list the documentation files and subjects
==========
HINT
exit
fi
if test $FUNC = WHAT
then
(cd $MAN;ls -C | more)
exit
fi
FOUND=NO
if test $FUNC = LIST
then
for i in $@
do
if test -r $MAN/$i.doc
then
FOUND=YES
(cd $MAN;kroff $i.doc)
fi
if test -r $MAN/$i.ref
then
khint $i | pager
FOUND=YES
fi
if test FOUND = NO
then
echo 1>&2 "<no documentation for> $i"
fi
done
exit
fi
