clean up

removed routine that relate to VT102/ANSI escape sequences
change to return count of characters output.
removed '\r\n\' according to standard function definition