ncurses.xml 13 KB

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