AZero13
AZero13
Add intrin.h for _BitScanReverse. This makes the operations being done much clearer and also faster as well.
Some operations, like assigning to 0, or breaking after a non-returning function, are redundant and can be removed.
The return value is never used, so let's change it to void.
We can avoid a branch by not comparing with 0.
If it is known that an int is either 1 or 0, doing an exclusive or to switch instead of a modulus makes more sense and is more efficient. cc:...
fputc is meant for single characters, fputs is for strings. We are better off inserting sole \n characters as characters, not whole strings.
GetVersion has its behavior changed in Windows 8 and above anyway, so this is the right way to do it now. The previous way returns the wrong value in Windows...
cc: Eric Sunshine
The headers for the die and usage functions have different parameter names or are missing the "NORETURN" attribute