[673b0d8] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[b06ca36] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[673b0d8] | 4 | <!ENTITY % general-entities SYSTEM "../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 | ]>
|
---|
[2fa922f] | 7 |
|
---|
[81fd230] | 8 | <sect1 id="ch-system-ncurses" role="wrap">
|
---|
[2fa922f] | 9 | <?dbhtml filename="ncurses.html"?>
|
---|
| 10 |
|
---|
[e747759] | 11 | <sect1info condition="script">
|
---|
| 12 | <productname>ncurses</productname>
|
---|
| 13 | <productnumber>&ncurses-version;</productnumber>
|
---|
| 14 | <address>&ncurses-url;</address>
|
---|
| 15 | </sect1info>
|
---|
| 16 |
|
---|
[2fa922f] | 17 | <title>Ncurses-&ncurses-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="ch-system-ncurses">
|
---|
| 20 | <primary sortas="a-Ncurses">Ncurses</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title/>
|
---|
[6370fa6] | 25 |
|
---|
[2fa922f] | 26 | <para>The Ncurses package contains libraries for terminal-independent
|
---|
| 27 | handling of character screens.</para>
|
---|
[673b0d8] | 28 |
|
---|
[2fa922f] | 29 | <segmentedlist>
|
---|
| 30 | <segtitle>&buildtime;</segtitle>
|
---|
| 31 | <segtitle>&diskspace;</segtitle>
|
---|
[5888299] | 32 |
|
---|
[2fa922f] | 33 | <seglistitem>
|
---|
[e4a5635] | 34 | <seg>&ncurses-ch6-sbu;</seg>
|
---|
| 35 | <seg>&ncurses-ch6-du;</seg>
|
---|
[2fa922f] | 36 | </seglistitem>
|
---|
| 37 | </segmentedlist>
|
---|
[673b0d8] | 38 |
|
---|
[2fa922f] | 39 | </sect2>
|
---|
| 40 |
|
---|
| 41 | <sect2 role="installation">
|
---|
| 42 | <title>Installation of Ncurses</title>
|
---|
[004616a] | 43 |
|
---|
| 44 | <!-- FIXME: Uncomment if using a dated ncurses release instead of a numbered
|
---|
| 45 | one.
|
---|
[2fa922f] | 46 |
|
---|
| 47 | <para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
|
---|
| 48 | and features added. The most important news are .......
|
---|
| 49 | To get these fixes and features, apply the rollup patch:</para>
|
---|
[fa21b3d] | 50 |
|
---|
| 51 | <screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
|
---|
[2fa922f] | 52 | -->
|
---|
[fa21b3d] | 53 |
|
---|
[1aba30d] | 54 | <para>Apply the following patch to fix a number of issues uncovered by the
|
---|
| 55 | static code analysis tool, Coverity:</para>
|
---|
| 56 |
|
---|
[0445a3d] | 57 | <screen><userinput remap="pre">patch -Np1 -i ../&ncurses-coverity-patch;</userinput></screen>
|
---|
[1aba30d] | 58 |
|
---|
[2fa922f] | 59 | <para>Prepare Ncurses for compilation:</para>
|
---|
[73aedd1d] | 60 |
|
---|
[0445a3d] | 61 | <screen><userinput remap="configure">./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
|
---|
[fa21b3d] | 62 |
|
---|
[2fa922f] | 63 | <variablelist>
|
---|
| 64 | <title>The meaning of the configure option:</title>
|
---|
| 65 |
|
---|
| 66 | <varlistentry>
|
---|
| 67 | <term><parameter>--enable-widec</parameter></term>
|
---|
| 68 | <listitem>
|
---|
| 69 | <para>This switch causes wide-character libraries (e.g., <filename
|
---|
| 70 | class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
---|
| 71 | to be built instead of normal ones (e.g., <filename
|
---|
| 72 | class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
---|
| 73 | These wide-character libraries are usable in both multibyte and
|
---|
| 74 | traditional 8-bit locales, while normal libraries work properly
|
---|
| 75 | only in 8-bit locales. Wide-character and normal libraries are
|
---|
| 76 | source-compatible, but not binary-compatible.</para>
|
---|
| 77 | </listitem>
|
---|
| 78 | </varlistentry>
|
---|
| 79 |
|
---|
| 80 | <!--
|
---|
| 81 | <varlistentry>
|
---|
| 82 | <term><parameter>- -without-cxx-binding</parameter></term>
|
---|
| 83 | <listitem>
|
---|
| 84 | <para>This optional switch causes the
|
---|
| 85 | <filename class="libraryfile">libncurses++w.a</filename> library
|
---|
| 86 | not to be built. Nothing in LFS and BLFS uses this library.</para>
|
---|
| 87 | </listitem>
|
---|
| 88 | </varlistentry>
|
---|
| 89 | -->
|
---|
| 90 |
|
---|
| 91 | </variablelist>
|
---|
| 92 |
|
---|
| 93 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 94 |
|
---|
[0445a3d] | 95 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 96 |
|
---|
[49ae4c6] | 97 | <para>This package has a test suite, but it can only be run after the
|
---|
| 98 | package has been installed. The tests reside in the
|
---|
| 99 | <filename class="directory">test/</filename> directory. See the
|
---|
| 100 | <filename>README</filename> file in that directory for further details.
|
---|
| 101 | </para>
|
---|
[81fd230] | 102 |
|
---|
[2fa922f] | 103 | <para>Install the package:</para>
|
---|
[73aedd1d] | 104 |
|
---|
[0445a3d] | 105 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 106 |
|
---|
[2c69ed4] | 107 | <para>Correct the permissions of a library that should not be executable:
|
---|
| 108 | </para>
|
---|
[73aedd1d] | 109 |
|
---|
[0445a3d] | 110 | <screen><userinput remap="install">chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
|
---|
[73aedd1d] | 111 |
|
---|
[2fa922f] | 112 | <para>Move the libraries to the <filename class="directory">/lib</filename> directory,
|
---|
| 113 | where they are expected to reside:</para>
|
---|
[73aedd1d] | 114 |
|
---|
[0445a3d] | 115 | <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
|
---|
[fa21b3d] | 116 |
|
---|
[2fa922f] | 117 | <para>Because the libraries have been moved, one symlink points to
|
---|
| 118 | a non-existent file. Recreate it:</para>
|
---|
[fa21b3d] | 119 |
|
---|
[0445a3d] | 120 | <screen><userinput remap="install">ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
|
---|
[fa21b3d] | 121 |
|
---|
[2fa922f] | 122 | <para>Many applications still expect the linker to be able to find
|
---|
| 123 | non-wide-character Ncurses libraries. Trick such applications into linking with
|
---|
| 124 | wide-character libraries by means of symlinks and linker scripts:</para>
|
---|
[fa21b3d] | 125 |
|
---|
[0445a3d] | 126 | <screen><userinput remap="install">for lib in curses ncurses form panel menu ; do \
|
---|
[2fa922f] | 127 | rm -vf /usr/lib/lib${lib}.so ; \
|
---|
| 128 | echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
|
---|
| 129 | ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
|
---|
[ad83f72] | 130 | done
|
---|
[fa21b3d] | 131 | ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
---|
| 132 |
|
---|
[2fa922f] | 133 | <para>Finally, make sure that old applications that look for
|
---|
| 134 | <filename class="libraryfile">-lcurses</filename> at build time are still
|
---|
| 135 | buildable:</para>
|
---|
[fa21b3d] | 136 |
|
---|
[0445a3d] | 137 | <screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
|
---|
[0014bff] | 138 | echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
|
---|
[ad83f72] | 139 | ln -sfv libncurses.so /usr/lib/libcurses.so
|
---|
| 140 | ln -sfv libncursesw.a /usr/lib/libcursesw.a
|
---|
[fa21b3d] | 141 | ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
|
---|
| 142 |
|
---|
[2fa922f] | 143 | <note>
|
---|
| 144 | <para>The instructions above don't create non-wide-character Ncurses
|
---|
| 145 | libraries since no package installed by compiling from sources would
|
---|
| 146 | link against them at runtime. If you must have such libraries because
|
---|
| 147 | of some binary-only application, build them with the following
|
---|
| 148 | commands:</para>
|
---|
| 149 |
|
---|
[ad83f72] | 150 | <screen role="nodump"><userinput>make distclean
|
---|
[fa21b3d] | 151 | ./configure --prefix=/usr --with-shared --without-normal \
|
---|
[ad83f72] | 152 | --without-debug --without-cxx-binding
|
---|
| 153 | make sources libs
|
---|
[fa21b3d] | 154 | cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
---|
[2fa922f] | 155 | </note>
|
---|
| 156 |
|
---|
| 157 | </sect2>
|
---|
| 158 |
|
---|
| 159 | <sect2 id="contents-ncurses" role="content">
|
---|
| 160 | <title>Contents of Ncurses</title>
|
---|
| 161 |
|
---|
| 162 | <segmentedlist>
|
---|
| 163 | <segtitle>Installed programs</segtitle>
|
---|
| 164 | <segtitle>Installed libraries</segtitle>
|
---|
| 165 |
|
---|
| 166 | <seglistitem>
|
---|
| 167 | <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
|
---|
[9058aa1] | 168 | ncurses5-config, reset (link to tset), tack, tic, toe, tput, and tset</seg>
|
---|
[0090db5] | 169 | <seg>libcursesw.{a,so} (symlink and linker script to libncursesw.{a,so}),
|
---|
| 170 | libformw.{a,so}, libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
|
---|
| 171 | libpanelw.{a,so} and their non-wide-character counterparts without "w"
|
---|
[2fa922f] | 172 | in the library names.</seg>
|
---|
| 173 | </seglistitem>
|
---|
| 174 | </segmentedlist>
|
---|
| 175 |
|
---|
| 176 | <variablelist>
|
---|
| 177 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 178 | <?dbfo list-presentation="list"?>
|
---|
| 179 | <?dbhtml list-presentation="table"?>
|
---|
| 180 |
|
---|
| 181 | <varlistentry id="captoinfo">
|
---|
| 182 | <term><command>captoinfo</command></term>
|
---|
| 183 | <listitem>
|
---|
| 184 | <para>Converts a termcap description into a terminfo description</para>
|
---|
| 185 | <indexterm zone="ch-system-ncurses captoinfo">
|
---|
| 186 | <primary sortas="b-captoinfo">captoinfo</primary>
|
---|
| 187 | </indexterm>
|
---|
| 188 | </listitem>
|
---|
| 189 | </varlistentry>
|
---|
| 190 |
|
---|
| 191 | <varlistentry id="clear">
|
---|
| 192 | <term><command>clear</command></term>
|
---|
| 193 | <listitem>
|
---|
| 194 | <para>Clears the screen, if possible</para>
|
---|
| 195 | <indexterm zone="ch-system-ncurses clear">
|
---|
| 196 | <primary sortas="b-clear">clear</primary>
|
---|
| 197 | </indexterm>
|
---|
| 198 | </listitem>
|
---|
| 199 | </varlistentry>
|
---|
| 200 |
|
---|
| 201 | <varlistentry id="infocmp">
|
---|
| 202 | <term><command>infocmp</command></term>
|
---|
| 203 | <listitem>
|
---|
| 204 | <para>Compares or prints out terminfo descriptions</para>
|
---|
| 205 | <indexterm zone="ch-system-ncurses infocmp">
|
---|
| 206 | <primary sortas="b-infocmp">infocmp</primary>
|
---|
| 207 | </indexterm>
|
---|
| 208 | </listitem>
|
---|
| 209 | </varlistentry>
|
---|
| 210 |
|
---|
| 211 | <varlistentry id="infotocap">
|
---|
| 212 | <term><command>infotocap</command></term>
|
---|
| 213 | <listitem>
|
---|
| 214 | <para>Converts a terminfo description into a termcap description</para>
|
---|
| 215 | <indexterm zone="ch-system-ncurses infotocap">
|
---|
| 216 | <primary sortas="b-infotocap">infotocap</primary>
|
---|
| 217 | </indexterm>
|
---|
| 218 | </listitem>
|
---|
| 219 | </varlistentry>
|
---|
| 220 |
|
---|
[9058aa1] | 221 | <varlistentry id="ncurses5-config">
|
---|
| 222 | <term><command>ncurses5-config</command></term>
|
---|
| 223 | <listitem>
|
---|
| 224 | <para>Provides configuration information for ncurses</para>
|
---|
| 225 | <indexterm zone="ch-system-ncurses ncurses5-config">
|
---|
| 226 | <primary sortas="b-ncurses5-config">ncurses5-config</primary>
|
---|
| 227 | </indexterm>
|
---|
| 228 | </listitem>
|
---|
| 229 | </varlistentry>
|
---|
| 230 |
|
---|
[2fa922f] | 231 | <varlistentry id="reset">
|
---|
| 232 | <term><command>reset</command></term>
|
---|
| 233 | <listitem>
|
---|
| 234 | <para>Reinitializes a terminal to its default values</para>
|
---|
| 235 | <indexterm zone="ch-system-ncurses reset">
|
---|
| 236 | <primary sortas="b-reset">reset</primary>
|
---|
| 237 | </indexterm>
|
---|
| 238 | </listitem>
|
---|
| 239 | </varlistentry>
|
---|
| 240 |
|
---|
| 241 | <varlistentry id="tack">
|
---|
| 242 | <term><command>tack</command></term>
|
---|
| 243 | <listitem>
|
---|
| 244 | <para>The terminfo action checker; it is mainly used to test the
|
---|
| 245 | accuracy of an entry in the terminfo database</para>
|
---|
| 246 | <indexterm zone="ch-system-ncurses tack">
|
---|
| 247 | <primary sortas="b-tack">tack</primary>
|
---|
| 248 | </indexterm>
|
---|
| 249 | </listitem>
|
---|
| 250 | </varlistentry>
|
---|
| 251 |
|
---|
| 252 | <varlistentry id="tic">
|
---|
| 253 | <term><command>tic</command></term>
|
---|
| 254 | <listitem>
|
---|
| 255 | <para>The terminfo entry-description compiler that translates a
|
---|
| 256 | terminfo file from source format into the binary format needed for the
|
---|
| 257 | ncurses library routines. A terminfo file contains information on the
|
---|
| 258 | capabilities of a certain terminal</para>
|
---|
| 259 | <indexterm zone="ch-system-ncurses tic">
|
---|
| 260 | <primary sortas="b-tic">tic</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
| 265 | <varlistentry id="toe">
|
---|
| 266 | <term><command>toe</command></term>
|
---|
| 267 | <listitem>
|
---|
| 268 | <para>Lists all available terminal types, giving the primary name and
|
---|
| 269 | description for each</para>
|
---|
| 270 | <indexterm zone="ch-system-ncurses toe">
|
---|
| 271 | <primary sortas="b-toe">toe</primary>
|
---|
| 272 | </indexterm>
|
---|
| 273 | </listitem>
|
---|
| 274 | </varlistentry>
|
---|
| 275 |
|
---|
| 276 | <varlistentry id="tput">
|
---|
| 277 | <term><command>tput</command></term>
|
---|
| 278 | <listitem>
|
---|
| 279 | <para>Makes the values of terminal-dependent capabilities available to
|
---|
| 280 | the shell; it can also be used to reset or initialize a terminal or
|
---|
| 281 | report its long name</para>
|
---|
| 282 | <indexterm zone="ch-system-ncurses tput">
|
---|
| 283 | <primary sortas="b-tput">tput</primary>
|
---|
| 284 | </indexterm>
|
---|
| 285 | </listitem>
|
---|
| 286 | </varlistentry>
|
---|
| 287 |
|
---|
| 288 | <varlistentry id="tset">
|
---|
| 289 | <term><command>tset</command></term>
|
---|
| 290 | <listitem>
|
---|
| 291 | <para>Can be used to initialize terminals</para>
|
---|
| 292 | <indexterm zone="ch-system-ncurses tset">
|
---|
| 293 | <primary sortas="b-tset">tset</primary>
|
---|
| 294 | </indexterm>
|
---|
| 295 | </listitem>
|
---|
| 296 | </varlistentry>
|
---|
| 297 |
|
---|
| 298 | <varlistentry id="libcurses">
|
---|
| 299 | <term><filename class="libraryfile">libcurses</filename></term>
|
---|
| 300 | <listitem>
|
---|
| 301 | <para>A link to <filename>libncurses</filename></para>
|
---|
| 302 | <indexterm zone="ch-system-ncurses libcurses">
|
---|
| 303 | <primary sortas="c-libcurses">libcurses</primary>
|
---|
| 304 | </indexterm>
|
---|
| 305 | </listitem>
|
---|
| 306 | </varlistentry>
|
---|
| 307 |
|
---|
| 308 | <varlistentry id="libncurses">
|
---|
| 309 | <term><filename class="libraryfile">libncurses</filename></term>
|
---|
| 310 | <listitem>
|
---|
| 311 | <para>Contains functions to display text in many complex ways on a
|
---|
| 312 | terminal screen; a good example of the use of these functions is the
|
---|
| 313 | menu displayed during the kernel's <command>make
|
---|
| 314 | menuconfig</command></para>
|
---|
| 315 | <indexterm zone="ch-system-ncurses libncurses">
|
---|
| 316 | <primary sortas="c-libncurses">libncurses</primary>
|
---|
| 317 | </indexterm>
|
---|
| 318 | </listitem>
|
---|
| 319 | </varlistentry>
|
---|
| 320 |
|
---|
| 321 | <varlistentry id="libform">
|
---|
| 322 | <term><filename class="libraryfile">libform</filename></term>
|
---|
| 323 | <listitem>
|
---|
| 324 | <para>Contains functions to implement forms</para>
|
---|
| 325 | <indexterm zone="ch-system-ncurses libform">
|
---|
| 326 | <primary sortas="c-libform">libform</primary>
|
---|
| 327 | </indexterm>
|
---|
| 328 | </listitem>
|
---|
| 329 | </varlistentry>
|
---|
| 330 |
|
---|
| 331 | <varlistentry id="libmenu">
|
---|
| 332 | <term><filename class="libraryfile">libmenu</filename></term>
|
---|
| 333 | <listitem>
|
---|
| 334 | <para>Contains functions to implement menus</para>
|
---|
| 335 | <indexterm zone="ch-system-ncurses libmenu">
|
---|
| 336 | <primary sortas="c-libmenu">libmenu</primary>
|
---|
| 337 | </indexterm>
|
---|
| 338 | </listitem>
|
---|
| 339 | </varlistentry>
|
---|
| 340 |
|
---|
| 341 | <varlistentry id="libpanel">
|
---|
| 342 | <term><filename class="libraryfile">libpanel</filename></term>
|
---|
| 343 | <listitem>
|
---|
| 344 | <para>Contains functions to implement panels</para>
|
---|
| 345 | <indexterm zone="ch-system-ncurses libpanel">
|
---|
| 346 | <primary sortas="c-libpanel">libpanel</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
| 351 | </variablelist>
|
---|
| 352 |
|
---|
| 353 | </sect2>
|
---|
[673b0d8] | 354 |
|
---|
| 355 | </sect1>
|
---|