program to be compiled on machines with unsigned chars.
and lots of other cleanup.
Originally written by Alexey Zelkin <phantom@FreeBSD.org>. So, obtained from FreeBSD with gratitude. (suggested by wiz.)