PrinterMain: reorder some code to get gcc to produce smaller code