ncurses.xml 16 KB

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