Brett's fixes for various bugs and coding issues. Closes SF patch #
593560, with some minor cleanups, line folding and whitespace normalization by Barry.
B
Barry Warsaw committed
4d895fa1258205e01073f0f9c2aba9a57843ae21
Parent: 02669a3