whitespace
set DOS EOL mode
disable unused variable
fix function prototypes; no need to #if macro here
whitespace; use explicit types and type conversion