ncurses.xml 13 KB

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