Move switch_printerr prototype to header