make cshputchar a macro; some reformatting