ncurses.xml 13 KB

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