ncurses.xml 13 KB

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