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