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