replace terminal ioctls with tc{g,s}etattr
Improve ^N^W^{F,G} in scmacs.f