- [listed in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>]. The <STRONG>terminfo</STRONG> variables <STRONG>lines</STRONG> and
- <STRONG>columns</STRONG> are initialized by <STRONG>setupterm</STRONG> as follows:
-
- If <STRONG>use_env(FALSE)</STRONG> has been called, values for <STRONG>lines</STRONG>
- and <STRONG>columns</STRONG> specified in <STRONG>terminfo</STRONG> are used.
-
- Otherwise, if the environment variables <STRONG>LINES</STRONG> and
- <STRONG>COLUMNS</STRONG> exist, their values are used. If these en-
- vironment variables do not exist and the program is
- running in a window, the current window size is
- used. Otherwise, if the environment variables do
- not exist, the values for <STRONG>lines</STRONG> and <STRONG>columns</STRONG> speci-
- fied in the <STRONG>terminfo</STRONG> database are used.
-
- The header files <STRONG>curses.h</STRONG> and <STRONG>term.h</STRONG> should be included
- (in this order) to get the definitions for these strings,
- numbers, and flags. Parameterized strings should be
- passed through <STRONG>tparm</STRONG> to instantiate them. All <STRONG>terminfo</STRONG>
- strings [including the output of <STRONG>tparm</STRONG>] should be printed
- with <STRONG>tputs</STRONG> or <STRONG>putp</STRONG>. Call the <STRONG>reset_shell_mode</STRONG> to restore
- the tty modes before exiting [see <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>]. Pro-
- grams which use cursor addressing should output <STRONG>en-</STRONG>
- <STRONG>ter_ca_mode</STRONG> upon startup and should output <STRONG>exit_ca_mode</STRONG>
- before exiting. Programs desiring shell escapes should
- call
-
- <STRONG>reset_shell_mode</STRONG> and output <STRONG>exit_ca_mode</STRONG> before the shell
- is called and should output <STRONG>enter_ca_mode</STRONG> and call <STRONG>re-</STRONG>
- <STRONG>set_prog_mode</STRONG> after returning from the shell.
+ [listed in <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>].
+
+ Each initialization routine provides applications with the
+ terminal capabilities either directly (via header defini-
+ tions), or by special functions. The header files <STRONG>curs-</STRONG>
+ <STRONG>es.h</STRONG> and <STRONG>term.h</STRONG> should be included (in this order) to get
+ the definitions for these strings, numbers, and flags.
+
+ The <STRONG>terminfo</STRONG> variables <STRONG>lines</STRONG> and <STRONG>columns</STRONG> are initialized
+ by <STRONG>setupterm</STRONG> as follows:
+
+ <STRONG>o</STRONG> If <STRONG>use_env(FALSE)</STRONG> has been called, values for <STRONG>lines</STRONG>
+ and <STRONG>columns</STRONG> specified in <STRONG>terminfo</STRONG> are used.
+
+ <STRONG>o</STRONG> Otherwise, if the environment variables <STRONG>LINES</STRONG> and <STRONG>COL-</STRONG>
+ <STRONG>UMNS</STRONG> exist, their values are used. If these environ-
+ ment variables do not exist and the program is running
+ in a window, the current window size is used. Other-
+ wise, if the environment variables do not exist, the
+ values for <STRONG>lines</STRONG> and <STRONG>columns</STRONG> specified in the <STRONG>terminfo</STRONG>
+ database are used.
+
+ Parameterized strings should be passed through <STRONG>tparm</STRONG> to
+ instantiate them. All <STRONG>terminfo</STRONG> strings [including the
+ output of <STRONG>tparm</STRONG>] should be printed with <STRONG>tputs</STRONG> or <STRONG>putp</STRONG>.
+ Call <STRONG>reset_shell_mode</STRONG> to restore the tty modes before ex-
+ iting [see <STRONG><A HREF="curs_kernel.3x.html">curs_kernel(3x)</A></STRONG>].
+
+ Programs which use cursor addressing should
+
+ <STRONG>o</STRONG> output <STRONG>enter_ca_mode</STRONG> upon startup and
+
+ <STRONG>o</STRONG> output <STRONG>exit_ca_mode</STRONG> before exiting.
+
+ Programs which execute shell subprocesses should
+
+ <STRONG>o</STRONG> call <STRONG>reset_shell_mode</STRONG> and output <STRONG>exit_ca_mode</STRONG> before
+ the shell is called and
+
+ <STRONG>o</STRONG> output <STRONG>enter_ca_mode</STRONG> and call <STRONG>reset_prog_mode</STRONG> after
+ returning from the shell.