- Move termios-related functionality to its own package
- Reimplement stty calls using ioctl calls
- Add per-platform constants for linux and non-linux because the ioctl
enums are different. The enums in Darwin seem to come from BSD and so
I'm assuming they might also work for other operating systems. If not,
we'll need to add other build-constrained const files.
This code has been tested on Darwin and will be tested on Linux before
This keeps proper spaces, including multiple spaces in a row, when wrapping text. This is a big improvement.
TODO in a future PR:
- Wrap long lines with no spaces properly
- Handle multispace characters (unicode) properly
- Handle tabs
- Handle extra indent of wrapped link lines on gophermaps