Re-ordered putchar clauses for clarity.