Bring mtest putc() into common code