ncurses.xml 12 KB

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