uniform code in print.c