ncurses.xml 13 KB

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