Mostly tab-to-space conversion plus a few style nits. Dropped the register keywords as I'm pretty sure modern compilers can be trusted to do the right thing.