Brett's fixes for various bugs and coding issues.  Closes SF patch #
593560, with some minor cleanups, line folding and whitespace
normalization by Barry.
2 files changed