PR: 6903 Reviewed by: phk Submitted by: Josh Gilliam <josh@quick.net>
some buffer overflow guards and some stylistic cleanups. Also adds manpages. Obtained from: NetBSD