ncurses.xml 12 KB

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