this is a needed step for our sshd in tty mode as we ask clients to send
us CRLF as command terminator. But we must reset the mode when the tty
session ends so that sftp running after it does not encounter CRLF mode.
Linux openssh sftp client otherwise would show two lines for each
command typed when run after an ssh session to our server.
This is needed so that sftp running after a ssh session from a Linux
client does not see two lines for each line typed. CRLF is set by win32
sshd server but we have to set mode to the previous way in the client
when an interactive session has ended.
Functions not declared before use, are define as returning an int.
Under 64-bit this can result in corrupted pointers being returned.
Also, Visual studio doesn't like it when you use variables to declare
array sizes, static values always work though.