The
telnet standard
says that
LF should be considered to move the printer to
the next line in the same horizontal position
and that CR should be considered to move the printer
to beginning of the current line, and that...
the sequence "CR LF" must be treated as a single "new
line" character and used whenever their combined action is intended
Implying that CR LF is going to be the
only newline
sequence you will recieve in a telnet stream which is
presumably being used here.
So there is no need to check for just CR or LF/NL.
Also, note that \r\n is not portable between
platforms -- \n and \r are
swapped on Macs (because CR is used to terminate lines on
Macs, not LF/NL.)