Made a script to trim trailing whiteapce from source files, and executed the script.  Also fixed some minor issues in src/local/err/platform.