[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 |
|
---|
[2fa922f] | 54 | <para>Prepare Ncurses for compilation:</para>
|
---|
[73aedd1d] | 55 |
|
---|
[0445a3d] | 56 | <screen><userinput remap="configure">./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
|
---|
[fa21b3d] | 57 |
|
---|
[2fa922f] | 58 | <variablelist>
|
---|
| 59 | <title>The meaning of the configure option:</title>
|
---|
| 60 |
|
---|
| 61 | <varlistentry>
|
---|
| 62 | <term><parameter>--enable-widec</parameter></term>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>This switch causes wide-character libraries (e.g., <filename
|
---|
| 65 | class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
|
---|
| 66 | to be built instead of normal ones (e.g., <filename
|
---|
| 67 | class="libraryfile">libncurses.so.&ncurses-version;</filename>).
|
---|
| 68 | These wide-character libraries are usable in both multibyte and
|
---|
| 69 | traditional 8-bit locales, while normal libraries work properly
|
---|
| 70 | only in 8-bit locales. Wide-character and normal libraries are
|
---|
| 71 | source-compatible, but not binary-compatible.</para>
|
---|
| 72 | </listitem>
|
---|
| 73 | </varlistentry>
|
---|
| 74 |
|
---|
| 75 | <!--
|
---|
| 76 | <varlistentry>
|
---|
| 77 | <term><parameter>- -without-cxx-binding</parameter></term>
|
---|
| 78 | <listitem>
|
---|
| 79 | <para>This optional switch causes the
|
---|
| 80 | <filename class="libraryfile">libncurses++w.a</filename> library
|
---|
| 81 | not to be built. Nothing in LFS and BLFS uses this library.</para>
|
---|
| 82 | </listitem>
|
---|
| 83 | </varlistentry>
|
---|
| 84 | -->
|
---|
| 85 |
|
---|
| 86 | </variablelist>
|
---|
| 87 |
|
---|
| 88 | <para>Compile the package:</para>
|
---|
[73aedd1d] | 89 |
|
---|
[0445a3d] | 90 | <screen><userinput remap="make">make</userinput></screen>
|
---|
[73aedd1d] | 91 |
|
---|
[49ae4c6] | 92 | <para>This package has a test suite, but it can only be run after the
|
---|
| 93 | package has been installed. The tests reside in the
|
---|
| 94 | <filename class="directory">test/</filename> directory. See the
|
---|
| 95 | <filename>README</filename> file in that directory for further details.
|
---|
| 96 | </para>
|
---|
[81fd230] | 97 |
|
---|
[2fa922f] | 98 | <para>Install the package:</para>
|
---|
[73aedd1d] | 99 |
|
---|
[0445a3d] | 100 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
[73aedd1d] | 101 |
|
---|
[bc5f39a] | 102 | <para>Move the shared libraries to the
|
---|
| 103 | <filename class="directory">/lib</filename> directory, where they are
|
---|
| 104 | expected to reside:</para>
|
---|
[73aedd1d] | 105 |
|
---|
[0445a3d] | 106 | <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
|
---|
[fa21b3d] | 107 |
|
---|
[2fa922f] | 108 | <para>Because the libraries have been moved, one symlink points to
|
---|
| 109 | a non-existent file. Recreate it:</para>
|
---|
[fa21b3d] | 110 |
|
---|
[0445a3d] | 111 | <screen><userinput remap="install">ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
|
---|
[fa21b3d] | 112 |
|
---|
[2fa922f] | 113 | <para>Many applications still expect the linker to be able to find
|
---|
| 114 | non-wide-character Ncurses libraries. Trick such applications into linking with
|
---|
| 115 | wide-character libraries by means of symlinks and linker scripts:</para>
|
---|
[fa21b3d] | 116 |
|
---|
[71b1c20] | 117 | <screen><userinput remap="install">for lib in ncurses form panel menu ; do \
|
---|
[2fa922f] | 118 | rm -vf /usr/lib/lib${lib}.so ; \
|
---|
| 119 | echo "INPUT(-l${lib}w)" >/usr/lib/lib${lib}.so ; \
|
---|
| 120 | ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
|
---|
[ad83f72] | 121 | done
|
---|
[fa21b3d] | 122 | ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
---|
| 123 |
|
---|
[2fa922f] | 124 | <para>Finally, make sure that old applications that look for
|
---|
| 125 | <filename class="libraryfile">-lcurses</filename> at build time are still
|
---|
| 126 | buildable:</para>
|
---|
[fa21b3d] | 127 |
|
---|
[0445a3d] | 128 | <screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so
|
---|
[0014bff] | 129 | echo "INPUT(-lncursesw)" >/usr/lib/libcursesw.so
|
---|
[ad83f72] | 130 | ln -sfv libncurses.so /usr/lib/libcurses.so
|
---|
| 131 | ln -sfv libncursesw.a /usr/lib/libcursesw.a
|
---|
[fa21b3d] | 132 | ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
|
---|
| 133 |
|
---|
[2e1fb0ca] | 134 | <para>If desired, install the Ncurses documentation:</para>
|
---|
| 135 |
|
---|
| 136 | <screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;
|
---|
| 137 | cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
|
---|
| 138 |
|
---|
[2fa922f] | 139 | <note>
|
---|
| 140 | <para>The instructions above don't create non-wide-character Ncurses
|
---|
| 141 | libraries since no package installed by compiling from sources would
|
---|
| 142 | link against them at runtime. If you must have such libraries because
|
---|
[a26951e] | 143 | of some binary-only application or to be compliant with LSB, build
|
---|
| 144 | the package again with the following commands:</para>
|
---|
[2fa922f] | 145 |
|
---|
[ad83f72] | 146 | <screen role="nodump"><userinput>make distclean
|
---|
[fa21b3d] | 147 | ./configure --prefix=/usr --with-shared --without-normal \
|
---|
[ad83f72] | 148 | --without-debug --without-cxx-binding
|
---|
| 149 | make sources libs
|
---|
[fa21b3d] | 150 | cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
---|
[2fa922f] | 151 | </note>
|
---|
| 152 |
|
---|
| 153 | </sect2>
|
---|
| 154 |
|
---|
| 155 | <sect2 id="contents-ncurses" role="content">
|
---|
| 156 | <title>Contents of Ncurses</title>
|
---|
| 157 |
|
---|
| 158 | <segmentedlist>
|
---|
| 159 | <segtitle>Installed programs</segtitle>
|
---|
| 160 | <segtitle>Installed libraries</segtitle>
|
---|
[fe05b08] | 161 | <segtitle>Installed directories</segtitle>
|
---|
[2fa922f] | 162 |
|
---|
| 163 | <seglistitem>
|
---|
| 164 | <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
|
---|
[8601b59] | 165 | ncursesw5-config, reset (link to tset), <!--tabs,--> tic, toe, tput, and tset</seg>
|
---|
[0090db5] | 166 | <seg>libcursesw.{a,so} (symlink and linker script to libncursesw.{a,so}),
|
---|
| 167 | libformw.{a,so}, libmenuw.{a,so}, libncurses++w.a, libncursesw.{a,so},
|
---|
| 168 | libpanelw.{a,so} and their non-wide-character counterparts without "w"
|
---|
[2fa922f] | 169 | in the library names.</seg>
|
---|
[fe05b08] | 170 | <seg>/usr/share/tabset, /usr/share/terminfo</seg>
|
---|
[2fa922f] | 171 | </seglistitem>
|
---|
| 172 | </segmentedlist>
|
---|
| 173 |
|
---|
| 174 | <variablelist>
|
---|
| 175 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 176 | <?dbfo list-presentation="list"?>
|
---|
| 177 | <?dbhtml list-presentation="table"?>
|
---|
| 178 |
|
---|
| 179 | <varlistentry id="captoinfo">
|
---|
| 180 | <term><command>captoinfo</command></term>
|
---|
| 181 | <listitem>
|
---|
| 182 | <para>Converts a termcap description into a terminfo description</para>
|
---|
| 183 | <indexterm zone="ch-system-ncurses captoinfo">
|
---|
| 184 | <primary sortas="b-captoinfo">captoinfo</primary>
|
---|
| 185 | </indexterm>
|
---|
| 186 | </listitem>
|
---|
| 187 | </varlistentry>
|
---|
| 188 |
|
---|
| 189 | <varlistentry id="clear">
|
---|
| 190 | <term><command>clear</command></term>
|
---|
| 191 | <listitem>
|
---|
| 192 | <para>Clears the screen, if possible</para>
|
---|
| 193 | <indexterm zone="ch-system-ncurses clear">
|
---|
| 194 | <primary sortas="b-clear">clear</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 | </listitem>
|
---|
| 197 | </varlistentry>
|
---|
| 198 |
|
---|
| 199 | <varlistentry id="infocmp">
|
---|
| 200 | <term><command>infocmp</command></term>
|
---|
| 201 | <listitem>
|
---|
| 202 | <para>Compares or prints out terminfo descriptions</para>
|
---|
| 203 | <indexterm zone="ch-system-ncurses infocmp">
|
---|
| 204 | <primary sortas="b-infocmp">infocmp</primary>
|
---|
| 205 | </indexterm>
|
---|
| 206 | </listitem>
|
---|
| 207 | </varlistentry>
|
---|
| 208 |
|
---|
| 209 | <varlistentry id="infotocap">
|
---|
| 210 | <term><command>infotocap</command></term>
|
---|
| 211 | <listitem>
|
---|
| 212 | <para>Converts a terminfo description into a termcap description</para>
|
---|
| 213 | <indexterm zone="ch-system-ncurses infotocap">
|
---|
| 214 | <primary sortas="b-infotocap">infotocap</primary>
|
---|
| 215 | </indexterm>
|
---|
| 216 | </listitem>
|
---|
| 217 | </varlistentry>
|
---|
| 218 |
|
---|
[90aae6b] | 219 | <varlistentry id="ncursesw5-config">
|
---|
| 220 | <term><command>ncursesw5-config</command></term>
|
---|
[9058aa1] | 221 | <listitem>
|
---|
| 222 | <para>Provides configuration information for ncurses</para>
|
---|
[90aae6b] | 223 | <indexterm zone="ch-system-ncurses ncursesw5-config">
|
---|
| 224 | <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
|
---|
[9058aa1] | 225 | </indexterm>
|
---|
| 226 | </listitem>
|
---|
| 227 | </varlistentry>
|
---|
| 228 |
|
---|
[2fa922f] | 229 | <varlistentry id="reset">
|
---|
| 230 | <term><command>reset</command></term>
|
---|
| 231 | <listitem>
|
---|
| 232 | <para>Reinitializes a terminal to its default values</para>
|
---|
| 233 | <indexterm zone="ch-system-ncurses reset">
|
---|
| 234 | <primary sortas="b-reset">reset</primary>
|
---|
| 235 | </indexterm>
|
---|
| 236 | </listitem>
|
---|
| 237 | </varlistentry>
|
---|
[db78da7] | 238 | <!--
|
---|
[90aae6b] | 239 | <varlistentry id="tabs">
|
---|
| 240 | <term><command>tabs</command></term>
|
---|
[2fa922f] | 241 | <listitem>
|
---|
[90aae6b] | 242 | <para>Clears and sets tab stops on a terminal</para>
|
---|
| 243 | <indexterm zone="ch-system-ncurses tabs">
|
---|
| 244 | <primary sortas="b-tabs">tabs</primary>
|
---|
[2fa922f] | 245 | </indexterm>
|
---|
| 246 | </listitem>
|
---|
| 247 | </varlistentry>
|
---|
[db78da7] | 248 | -->
|
---|
[2fa922f] | 249 | <varlistentry id="tic">
|
---|
| 250 | <term><command>tic</command></term>
|
---|
| 251 | <listitem>
|
---|
| 252 | <para>The terminfo entry-description compiler that translates a
|
---|
| 253 | terminfo file from source format into the binary format needed for the
|
---|
| 254 | ncurses library routines. A terminfo file contains information on the
|
---|
| 255 | capabilities of a certain terminal</para>
|
---|
| 256 | <indexterm zone="ch-system-ncurses tic">
|
---|
| 257 | <primary sortas="b-tic">tic</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
| 262 | <varlistentry id="toe">
|
---|
| 263 | <term><command>toe</command></term>
|
---|
| 264 | <listitem>
|
---|
| 265 | <para>Lists all available terminal types, giving the primary name and
|
---|
| 266 | description for each</para>
|
---|
| 267 | <indexterm zone="ch-system-ncurses toe">
|
---|
| 268 | <primary sortas="b-toe">toe</primary>
|
---|
| 269 | </indexterm>
|
---|
| 270 | </listitem>
|
---|
| 271 | </varlistentry>
|
---|
| 272 |
|
---|
| 273 | <varlistentry id="tput">
|
---|
| 274 | <term><command>tput</command></term>
|
---|
| 275 | <listitem>
|
---|
| 276 | <para>Makes the values of terminal-dependent capabilities available to
|
---|
| 277 | the shell; it can also be used to reset or initialize a terminal or
|
---|
| 278 | report its long name</para>
|
---|
| 279 | <indexterm zone="ch-system-ncurses tput">
|
---|
| 280 | <primary sortas="b-tput">tput</primary>
|
---|
| 281 | </indexterm>
|
---|
| 282 | </listitem>
|
---|
| 283 | </varlistentry>
|
---|
| 284 |
|
---|
| 285 | <varlistentry id="tset">
|
---|
| 286 | <term><command>tset</command></term>
|
---|
| 287 | <listitem>
|
---|
| 288 | <para>Can be used to initialize terminals</para>
|
---|
| 289 | <indexterm zone="ch-system-ncurses tset">
|
---|
| 290 | <primary sortas="b-tset">tset</primary>
|
---|
| 291 | </indexterm>
|
---|
| 292 | </listitem>
|
---|
| 293 | </varlistentry>
|
---|
| 294 |
|
---|
| 295 | <varlistentry id="libcurses">
|
---|
| 296 | <term><filename class="libraryfile">libcurses</filename></term>
|
---|
| 297 | <listitem>
|
---|
| 298 | <para>A link to <filename>libncurses</filename></para>
|
---|
| 299 | <indexterm zone="ch-system-ncurses libcurses">
|
---|
| 300 | <primary sortas="c-libcurses">libcurses</primary>
|
---|
| 301 | </indexterm>
|
---|
| 302 | </listitem>
|
---|
| 303 | </varlistentry>
|
---|
| 304 |
|
---|
| 305 | <varlistentry id="libncurses">
|
---|
| 306 | <term><filename class="libraryfile">libncurses</filename></term>
|
---|
| 307 | <listitem>
|
---|
| 308 | <para>Contains functions to display text in many complex ways on a
|
---|
| 309 | terminal screen; a good example of the use of these functions is the
|
---|
| 310 | menu displayed during the kernel's <command>make
|
---|
| 311 | menuconfig</command></para>
|
---|
| 312 | <indexterm zone="ch-system-ncurses libncurses">
|
---|
| 313 | <primary sortas="c-libncurses">libncurses</primary>
|
---|
| 314 | </indexterm>
|
---|
| 315 | </listitem>
|
---|
| 316 | </varlistentry>
|
---|
| 317 |
|
---|
| 318 | <varlistentry id="libform">
|
---|
| 319 | <term><filename class="libraryfile">libform</filename></term>
|
---|
| 320 | <listitem>
|
---|
| 321 | <para>Contains functions to implement forms</para>
|
---|
| 322 | <indexterm zone="ch-system-ncurses libform">
|
---|
| 323 | <primary sortas="c-libform">libform</primary>
|
---|
| 324 | </indexterm>
|
---|
| 325 | </listitem>
|
---|
| 326 | </varlistentry>
|
---|
| 327 |
|
---|
| 328 | <varlistentry id="libmenu">
|
---|
| 329 | <term><filename class="libraryfile">libmenu</filename></term>
|
---|
| 330 | <listitem>
|
---|
| 331 | <para>Contains functions to implement menus</para>
|
---|
| 332 | <indexterm zone="ch-system-ncurses libmenu">
|
---|
| 333 | <primary sortas="c-libmenu">libmenu</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="libpanel">
|
---|
| 339 | <term><filename class="libraryfile">libpanel</filename></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>Contains functions to implement panels</para>
|
---|
| 342 | <indexterm zone="ch-system-ncurses libpanel">
|
---|
| 343 | <primary sortas="c-libpanel">libpanel</primary>
|
---|
| 344 | </indexterm>
|
---|
| 345 | </listitem>
|
---|
| 346 | </varlistentry>
|
---|
| 347 |
|
---|
| 348 | </variablelist>
|
---|
| 349 |
|
---|
| 350 | </sect2>
|
---|
[673b0d8] | 351 |
|
---|
| 352 | </sect1>
|
---|