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