putc() could be implemented as a macro. Use fputc for no side effects.