1
0

ncurses.xml 12 KB

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