Ticket #2 (new enhancement)

Opened 6 years ago

Last modified 6 years ago

Allow fallbacks for getting the terminal size on POSIX

Reported by: judah Owned by:
Priority: minor Milestone:
Version: 0.1 Keywords:
Cc:

Description

Currently, the POSIX backend requires TIOCGWINSZ for ioctl to get the terminal size. On systems which don't have that, we should fall back to either:

  • Use the terminfo capabilities termlines/termColumns
  • Use the environmental variables LINES/COLUMNS
  • Default to 80x24 if the above aren't defined, or if they're bad values (negative or too small)

This will require some configure-time hacks, though, so before I implement this I'll need to see a machine that actually doesn't provide TIOCGWINSZ (preferably one that I can test on).

Change History

Changed 6 years ago by judah

  • type changed from defect to enhancement

Changed 6 years ago by judah

  • priority changed from major to minor

Changed 6 years ago by judah

We still need TIOCGWINSZ for compilation, but now if the call doesn't succeed for some reason then we fall back as detailed above:

Wed Sep 10 11:50:55 EDT 2008  judah.jacobson@gmail.com
  * Get the window size from terminfo or the environment if the ioctl call fails. (POSIX)

Changed 6 years ago by judah

See also #68 (requiring nl_langinfo(CODESET)).

Note: See TracTickets for help on using tickets.