port to freebsd
Code whitespace cleanup, and full malloc removal.