pub fn use_tioctl(flag: bool)
Expand description

Determine how to compute terminal size. The use_tioctl() routine, if used, should be called before initscr() or newterm() are called (because those compute the screen size).

After use_tioctl() is called with true as an argument, NCurses modifies the last step in its computation of screen size as follows:

  • Checks if the $LINES and $COLUMNS environment variables are set to a number greater than zero.
  • for each, NCurses updates the corresponding environment variable with the value that it has obtained via operating system call or from the terminal database.
  • NCurses re-fetches the value of the environment variables so that it is still the environment variables which set the screen size.

The use_env() and use_tioctl() routines combine as summarized here:

use_env use_tioctl Summary

true false This is the default behavior. NCurses uses operating system calls unless overridden by $LINES or $COLUMNS environment variables. true true NCurses updates $LINES and $COLUMNS based on operating system calls. false true NCurses ignores $LINES and $COLUMNS, uses operating system calls to obtain size. false false NCurses relies on the terminal database to determine size.