Run source code through splint, fix warnings.
Add local copy of strcasecmp function.