ncurses.xml 18 KB

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