ncurses.xml 13 KB

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