1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/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 | <sect1info condition="script">
|
---|
12 | <productname>ncurses</productname>
|
---|
13 | <productnumber>&ncurses-version;</productnumber>
|
---|
14 | <address>&ncurses-url;</address>
|
---|
15 | </sect1info>
|
---|
16 |
|
---|
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/>
|
---|
25 |
|
---|
26 | <para>The Ncurses package contains libraries for terminal-independent
|
---|
27 | handling of character screens.</para>
|
---|
28 |
|
---|
29 | <segmentedlist>
|
---|
30 | <segtitle>&buildtime;</segtitle>
|
---|
31 | <segtitle>&diskspace;</segtitle>
|
---|
32 |
|
---|
33 | <seglistitem>
|
---|
34 | <seg>&ncurses-ch6-sbu;</seg>
|
---|
35 | <seg>&ncurses-ch6-du;</seg>
|
---|
36 | </seglistitem>
|
---|
37 | </segmentedlist>
|
---|
38 |
|
---|
39 | </sect2>
|
---|
40 |
|
---|
41 | <sect2 role="installation">
|
---|
42 | <title>Installation of Ncurses</title>
|
---|
43 |
|
---|
44 | <!-- FIXME: Uncomment if using a dated ncurses release instead of a numbered
|
---|
45 | one.
|
---|
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>
|
---|
50 |
|
---|
51 | <screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
|
---|
52 | -->
|
---|
53 |
|
---|
54 | <para>Prepare Ncurses for compilation:</para>
|
---|
55 |
|
---|
56 | <screen><userinput remap="configure">./configure --prefix=/usr \
|
---|
57 | --mandir=/usr/share/man \
|
---|
58 | --with-shared \
|
---|
59 | --without-debug \
|
---|
60 | --enable-pc-files \
|
---|
61 | --enable-widec</userinput></screen>
|
---|
62 |
|
---|
63 | <variablelist>
|
---|
64 | <title>The meaning of the new configure options:</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 | <varlistentry>
|
---|
81 | <term><parameter>--enable-pc-files</parameter></term>
|
---|
82 | <listitem>
|
---|
83 | <para>This switch generates and installs .pc files for pkg-config.
|
---|
84 | </para>
|
---|
85 | </listitem>
|
---|
86 | </varlistentry>
|
---|
87 |
|
---|
88 | </variablelist>
|
---|
89 |
|
---|
90 | <para>Compile the package:</para>
|
---|
91 |
|
---|
92 | <screen><userinput remap="make">make</userinput></screen>
|
---|
93 |
|
---|
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>
|
---|
99 |
|
---|
100 | <para>Install the package:</para>
|
---|
101 |
|
---|
102 | <screen><userinput remap="install">make install</userinput></screen>
|
---|
103 |
|
---|
104 | <para>Move the shared libraries to the
|
---|
105 | <filename class="directory">/lib</filename> directory, where they are
|
---|
106 | expected to reside:</para>
|
---|
107 |
|
---|
108 | <screen><userinput remap="install">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 remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /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 remap="install">for lib in 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 | ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc
|
---|
124 | done
|
---|
125 |
|
---|
126 | ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
|
---|
127 |
|
---|
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>
|
---|
131 |
|
---|
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>
|
---|
137 |
|
---|
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 |
|
---|
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 or to be compliant with LSB, build
|
---|
148 | the package again with the following commands:</para>
|
---|
149 |
|
---|
150 | <screen role="nodump"><userinput>make distclean
|
---|
151 | ./configure --prefix=/usr \
|
---|
152 | --with-shared \
|
---|
153 | --without-normal \
|
---|
154 | --without-debug \
|
---|
155 | --without-cxx-binding
|
---|
156 | make sources libs
|
---|
157 | cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
|
---|
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>
|
---|
168 | <segtitle>Installed directories</segtitle>
|
---|
169 |
|
---|
170 | <seglistitem>
|
---|
171 | <seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
|
---|
172 | ncursesw5-config, reset (link to tset), tabs, tic, toe, tput, and tset</seg>
|
---|
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"
|
---|
176 | in the library names.</seg>
|
---|
177 | <seg>/usr/share/tabset, /usr/share/terminfo,
|
---|
178 | /usr/share/doc/ncurses-&ncurses-version;</seg>
|
---|
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 |
|
---|
227 | <varlistentry id="ncursesw5-config">
|
---|
228 | <term><command>ncursesw5-config</command></term>
|
---|
229 | <listitem>
|
---|
230 | <para>Provides configuration information for ncurses</para>
|
---|
231 | <indexterm zone="ch-system-ncurses ncursesw5-config">
|
---|
232 | <primary sortas="b-ncursesw5-config">ncursesw5-config</primary>
|
---|
233 | </indexterm>
|
---|
234 | </listitem>
|
---|
235 | </varlistentry>
|
---|
236 |
|
---|
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>
|
---|
246 |
|
---|
247 | <varlistentry id="tabs">
|
---|
248 | <term><command>tabs</command></term>
|
---|
249 | <listitem>
|
---|
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>
|
---|
253 | </indexterm>
|
---|
254 | </listitem>
|
---|
255 | </varlistentry>
|
---|
256 |
|
---|
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="libcursesw">
|
---|
304 | <term><filename class="libraryfile">libcursesw</filename></term>
|
---|
305 | <listitem>
|
---|
306 | <para>A link to <filename>libncursesw</filename></para>
|
---|
307 | <indexterm zone="ch-system-ncurses libcursesw">
|
---|
308 | <primary sortas="c-libcursesw">libcursesw</primary>
|
---|
309 | </indexterm>
|
---|
310 | </listitem>
|
---|
311 | </varlistentry>
|
---|
312 |
|
---|
313 | <varlistentry id="libncursesw">
|
---|
314 | <term><filename class="libraryfile">libncursesw</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 libncursesw">
|
---|
321 | <primary sortas="c-libncursesw">libncursesw</primary>
|
---|
322 | </indexterm>
|
---|
323 | </listitem>
|
---|
324 | </varlistentry>
|
---|
325 |
|
---|
326 | <varlistentry id="libformw">
|
---|
327 | <term><filename class="libraryfile">libformw</filename></term>
|
---|
328 | <listitem>
|
---|
329 | <para>Contains functions to implement forms</para>
|
---|
330 | <indexterm zone="ch-system-ncurses libformw">
|
---|
331 | <primary sortas="c-libformw">libformw</primary>
|
---|
332 | </indexterm>
|
---|
333 | </listitem>
|
---|
334 | </varlistentry>
|
---|
335 |
|
---|
336 | <varlistentry id="libmenuw">
|
---|
337 | <term><filename class="libraryfile">libmenuw</filename></term>
|
---|
338 | <listitem>
|
---|
339 | <para>Contains functions to implement menus</para>
|
---|
340 | <indexterm zone="ch-system-ncurses libmenuw">
|
---|
341 | <primary sortas="c-libmenuw">libmenuw</primary>
|
---|
342 | </indexterm>
|
---|
343 | </listitem>
|
---|
344 | </varlistentry>
|
---|
345 |
|
---|
346 | <varlistentry id="libpanelw">
|
---|
347 | <term><filename class="libraryfile">libpanelw</filename></term>
|
---|
348 | <listitem>
|
---|
349 | <para>Contains functions to implement panels</para>
|
---|
350 | <indexterm zone="ch-system-ncurses libpanelw">
|
---|
351 | <primary sortas="c-libpanelw">libpanelw</primary>
|
---|
352 | </indexterm>
|
---|
353 | </listitem>
|
---|
354 | </varlistentry>
|
---|
355 |
|
---|
356 | </variablelist>
|
---|
357 |
|
---|
358 | </sect2>
|
---|
359 |
|
---|
360 | </sect1>
|
---|