fix const correctness of some print facilities