• Home
Name Date Size #Lines LOC

..--

Ada95/22-Oct-2025-55,57741,696

c++/22-Oct-2025-7,8475,257

doc/22-Oct-2025-66,28849,965

form/22-Oct-2025-15,9119,396

include/22-Oct-2025-12,32110,754

man/22-Oct-2025-33,00828,377

menu/22-Oct-2025-7,6204,392

misc/22-Oct-2025-33,50031,363

ncurses/22-Oct-2025-89,76764,461

package/22-Oct-2025-10,72010,184

panel/22-Oct-2025-2,5641,461

progs/22-Oct-2025-12,6539,628

test/22-Oct-2025-83,78068,321

ANNOUNCED22-Oct-202530.5 KiB734600

AUTHORSD22-Oct-20252.6 KiB4139

COPYINGD22-Oct-20251.4 KiB3024

INSTALLD22-Oct-202597.1 KiB2,5401,955

MANIFESTD22-Oct-202536.5 KiB1,2511,250

Makefile.inD22-Oct-20254.7 KiB13378

Makefile.os2D22-Oct-20258.6 KiB261115

NEWSD22-Oct-2025696.2 KiB15,66314,134

OAT.xmlD22-Oct-20256.6 KiB8465

READMED22-Oct-202510.1 KiB222175

README.MinGWD22-Oct-20256.6 KiB149127

README.OpenSourceD22-Oct-2025608 1111

README.emxD22-Oct-20254 KiB7461

README.mdD22-Oct-20256.4 KiB151108

README_zh.mdD22-Oct-20253.1 KiB8571

TO-DOD22-Oct-20259.5 KiB215161

VERSIOND22-Oct-202520 21

aclocal.m4D22-Oct-2025293.1 KiB10,2619,683

announce.html.inD22-Oct-202552.1 KiB1,7551,365

backport-0002-CVE-2023-29491-env-access.patchD22-Oct-2025416 1716

config.guessD22-Oct-202549.5 KiB1,8131,586

config.subD22-Oct-202536 KiB1,9721,765

configureD22-Oct-2025825 KiB31,57926,898

configure.inD22-Oct-202580.1 KiB2,6362,320

cross_compile_support_ohos.patchD22-Oct-20251.2 KiB3836

dist.mkD22-Oct-20257.3 KiB17994

install-shD22-Oct-202515 KiB542352

mk-0th.awkD22-Oct-20255.8 KiB176127

mk-1st.awkD22-Oct-202520.4 KiB609521

mk-2nd.awkD22-Oct-20255.4 KiB15595

mk-hdr.awkD22-Oct-20254.1 KiB11674

ncurses-config.patchD22-Oct-20251.6 KiB6058

ncurses-kbs.patchD22-Oct-2025901 2220

ncurses-libs.patchD22-Oct-20252 KiB6454

ncurses-urxvt.patchD22-Oct-20254.5 KiB181179

ncurses.specD22-Oct-2025441 1311

ncurses.yamlD22-Oct-202576 54

README

1-------------------------------------------------------------------------------
2-- Copyright 2020-2021,2023 Thomas E. Dickey                                 --
3-- Copyright 1998-2012,2018 Free Software Foundation, Inc.                   --
4--                                                                           --
5-- Permission is hereby granted, free of charge, to any person obtaining a   --
6-- copy of this software and associated documentation files (the             --
7-- "Software"), to deal in the Software without restriction, including       --
8-- without limitation the rights to use, copy, modify, merge, publish,       --
9-- distribute, distribute with modifications, sublicense, and/or sell copies --
10-- of the Software, and to permit persons to whom the Software is furnished  --
11-- to do so, subject to the following conditions:                            --
12--                                                                           --
13-- The above copyright notice and this permission notice shall be included   --
14-- in all copies or substantial portions of the Software.                    --
15--                                                                           --
16-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
17-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
18-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
19-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
20-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
21-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
22-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
23--                                                                           --
24-- Except as contained in this notice, the name(s) of the above copyright    --
25-- holders shall not be used in advertising or otherwise to promote the      --
26-- sale, use or other dealings in this Software without prior written        --
27-- authorization.                                                            --
28-------------------------------------------------------------------------------
29-- $Id: README,v 1.31 2023/10/28 14:49:04 tom Exp $
30-------------------------------------------------------------------------------
31		README file for the ncurses package
32
33See the file ANNOUNCE for a summary of ncurses features and ports.
34See the file INSTALL for instructions on how to build and install ncurses.
35See the file NEWS for a release history and bug-fix notes.
36See the file TO-DO for things that still need doing, including known bugs.
37
38Browse the file doc/html/ncurses-intro.html for narrative descriptions of how
39to use ncurses and the panel, menu, and form libraries.
40
41Browse the file doc/html/hackguide.html for a tour of the package internals.
42
43Find plain text versions of both of these documents in doc/.
44
45ROADMAP AND PACKAGE OVERVIEW:
46
47You should be reading this file in a directory called:  ncurses-d.d, where d.d
48is the current version number (see the dist.mk file in this directory for
49that).  There should be a number of subdirectories, including `c++', `form',
50`man', `menu', `misc', `ncurses', `panel', `progs', `test', and `Ada95'.
51
52A full build/install of this package typically installs several libraries, a
53handful of utilities, and a database hierarchy.  Here is an inventory of the
54pieces:
55
56The libraries are:
57
58	libncurses.a       (normal)
59	libncurses.so      (shared)
60	libncurses_g.a     (debug and trace code enabled)
61	libncurses_p.a     (profiling enabled)
62
63	libpanel.a         (normal)
64	libpanel.so        (shared)
65	libpanel_g.a       (debug and trace code enabled)
66
67	libmenu.a          (normal)
68	libmenu.so         (shared)
69	libmenu_g.a        (debug enabled)
70
71	libform.a          (normal)
72	libform.so         (shared)
73	libform_g.a        (debug enabled)
74
75If you configure using the --enable-widec option, a "w" is appended to the
76library names (e.g., libncursesw.a), and the resulting libraries support
77wide-characters, e.g., via a UTF-8 locale.  The corresponding header files
78are compatible with the non-wide-character configuration; wide-character
79features are provided by ifdef's in the header files.  The wide-character
80library interfaces are not binary-compatible with the non-wide-character
81version.
82
83If you configure using the --enable-reentrant option, a "t" is appended to the
84library names (e.g., libncursest.a) and the resulting libraries have a
85different binary interface, making the ncurses interface more opaque.
86
87The ncurses libraries implement the curses API.  The panel, menu and forms
88libraries implement clones of the SVr4 panel, menu and forms APIs.  The source
89code for these lives in the `ncurses', `panel', `menu', and `form' directories
90respectively.
91
92In the `c++' directory, you'll find code that defines an interface to the
93curses, forms, menus and panels library packaged as C++ classes, and a demo
94program in C++ to test it.  These class definition modules are not installed
95by the 'make install.libs' rule as libncurses++.
96
97In the `Ada95' directory, you'll find code and documentation for an
98Ada95 binding of the curses API, to be used with the GNAT compiler.
99This binding is built by a normal top-level `make' if configure detects
100an usable version of GNAT (3.11 or above). It is not installed automatically.
101See the Ada95 directory for more build and installation instructions and
102for documentation of the binding.
103
104To do its job, the ncurses code needs your terminal type to be set in the
105environment variable TERM (normally set by your OS; under UNIX, getty(1)
106typically does this, but you can override it in your .profile); and, it needs
107a database of terminal descriptions in which to look up your terminal type's
108capabilities.
109
110In older (V7/BSD) versions of curses, the database was a flat text file,
111/etc/termcap; in newer (USG/USL) versions, the database is a hierarchy of
112fast-loading binary description blocks under /usr/lib/terminfo.  These binary
113blocks are compiled from an improved editable text representation called
114`terminfo' format (documented in man/terminfo.5).  The ncurses library can use
115either /etc/termcap or the compiled binary terminfo blocks, but prefers the
116second form.
117
118In the `misc' directory, there is a text file terminfo.src, in editable
119terminfo format, which can be used to generate the terminfo binaries (that's
120what make install.data does).  If the package was built with the
121--enable-termcap option enabled, and the ncurses library cannot find a
122terminfo description for your terminal, it will fall back to the termcap file
123supplied with your system (which the ncurses package installation leaves
124strictly alone).
125
126The utilities are as follows:
127
128	tic             -- terminfo source to binary compiler
129	infocmp         -- terminfo binary to source decompiler/comparator
130	clear           -- emits clear-screen for current terminal
131	tabs            -- set tabs on a terminal
132	tput            -- shell-script access to terminal capabilities.
133	toe             -- table of entries utility
134	tset            -- terminal-initialization utility
135
136The first two (tic and infocmp) are used for manipulating terminfo
137descriptions; the next two (clear and tput) are for use in shell scripts.  The
138last (tset) is provided for 4.4BSD compatibility.  The source code for all of
139these lives in the `progs' directory.
140
141Detailed documentation for all libraries and utilities can be found in the
142`man' and `doc' directories.  An HTML introduction to ncurses, panels, and
143menus programming lives in the `doc/html' directory.  Manpages in HTML format
144are under `doc/html/man'.
145
146The `test' directory contains programs that can be used to verify or
147demonstrate the functions of the ncurses libraries.  See test/README for
148descriptions of these programs.  Notably, the `ncurses' utility is designed to
149help you systematically exercise the library functions.
150
151AUTHORS:
152
153Pavel Curtis:
154	wrote the original ncurses
155
156Zeyd M. Ben-Halim:
157	port of original to Linux and many enhancements.
158
159Thomas Dickey (maintainer for 1.9.9g through 4.1, resuming with FSF's 5.0):
160	configuration scripts, porting, mods to adhere to XSI Curses in the
161	areas of background color, terminal modes.  Also memory leak testing,
162	the wresize, default colors and key definition extensions and numerous
163	bug fixes -- more than half of those enumerated in NEWS beginning with
164	the internal release 1.8.9, see
165
166		https://invisible-island.net/personal/changelogs.html
167
168Florian La Roche (official maintainer for FSF's ncurses 4.2)
169	Beginning with release 4.2, ncurses is distributed under an MIT-style
170	license.
171
172Eric S. Raymond:
173	the man pages, infocmp(1), tput(1), clear(1), captoinfo(1), tset(1),
174	toe(1), most of tic(1), trace levels, the HTML intro, wgetnstr() and
175	many other entry points, the cursor-movement optimization, the
176	scroll-pack optimizer for vertical motions, the mouse interface and
177	xterm mouse support, and the ncurses test program.
178
179Juergen Pfeifer
180	The menu and form libraries, C++ bindings for ncurses, menus, forms
181	and panels, as well as the Ada95 binding.  Ongoing support for panel.
182
183CONTRIBUTORS:
184
185Alexander V. Lukyanov
186	for numerous fixes and improvements to the optimization logic.
187
188David MacKenzie
189	for first-class bug-chasing and methodical testing.
190
191Ross Ridge
192	for the code that hacks termcap parameterized strings into terminfo.
193
194Warren Tucker and Gerhard Fuernkranz,
195	for writing and sending the panel library.
196
197Hellmuth Michaelis,
198	for many patches and testing the optimization code.
199
200Eric Newton, Ulrich Drepper, and Anatoly Ivasyuk:
201	the C++ code.
202
203Jonathan Ross,
204	for lessons in using sed.
205
206Keith Bostic (maintainer of 4.4BSD curses)
207	for help, criticism, comments, bug-finding, and being willing to
208	deep-six BSD curses for this one when it grew up.
209
210Richard Stallman,
211	for his commitment to making ncurses free software.
212
213Countless other people have contributed by reporting bugs, sending fixes,
214suggesting improvements, and generally whining about ncurses :-)
215
216BUGS:
217	See the INSTALL file for bug and developer-list addresses.
218	The Hacker's Guide in the doc directory includes some guidelines
219	on how to report bugs in ways that will get them fixed most quickly.
220
221-- vile:txtmode fc=78
222

README.MinGW

1-------------------------------------------------------------------------------
2-- Copyright 2020 Thomas E. Dickey                                           --
3-- Copyright 2008-2011,2012 Free Software Foundation, Inc.                   --
4--                                                                           --
5-- Permission is hereby granted, free of charge, to any person obtaining a   --
6-- copy of this software and associated documentation files (the             --
7-- "Software"), to deal in the Software without restriction, including       --
8-- without limitation the rights to use, copy, modify, merge, publish,       --
9-- distribute, distribute with modifications, sublicense, and/or sell copies --
10-- of the Software, and to permit persons to whom the Software is furnished  --
11-- to do so, subject to the following conditions:                            --
12--                                                                           --
13-- The above copyright notice and this permission notice shall be included   --
14-- in all copies or substantial portions of the Software.                    --
15--                                                                           --
16-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
17-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
18-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
19-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
20-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
21-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
22-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
23--                                                                           --
24-- Except as contained in this notice, the name(s) of the above copyright    --
25-- holders shall not be used in advertising or otherwise to promote the      --
26-- sale, use or other dealings in this Software without prior written        --
27-- authorization.                                                            --
28-------------------------------------------------------------------------------
29-- $Id: README.MinGW,v 1.14 2020/09/06 22:22:44 tom Exp $
30-- Author: Juergen Pfeifer
31-------------------------------------------------------------------------------
32
33This is work in progress, but it is in an state where one can see it
34works at least on the Windows Console.
35
36You should install the MSYS2 package, so that you have a shell environment that
37allows you to run scripts, especially configure, etc.  You can get that
38from
39	https://www.msys2.org/
40
41or the individual packages from
42
43	https://sourceforge.net/projects/msys2/files/
44
45You may also use a hosted MinGW cross-compile toolchain, e.g., on Ubuntu or
46ArchLinux to build the libraries and tools.
47
48To build ncurses for native Windows with support for the new Windows 10 Virtual
49Terminal and PseudoConsole support, you should install at least version 8.0 of
50the mingw-w64-x86_64-headers package as it appears to have support for the
51required Windows SDK level.  Please note that some of the Linux distributions
52are a bit behind with respect to the required MinGW header versions and you may
53not be able to properly build the libraries for current Windows 10 using these
54toolchains.  Although it is a bit slow, MSYS2 on Windows 10 64-Bit is the
55authoritative build environment for the MinGW version of ncurses.
56
57Using MinGW is a pragmatic decision, it is the easiest way to port this
58heavily UNIX based sourcebase to native Windows. The goal is of course
59to provide the includes, libraries and DLLs to be used with the more
60common traditional development environments on Windows, mainly with
61Microsoft Visual Studio.
62
63The TERM environment variable must be set especially to activate the Windows
64console-driver.  The driver checks if TERM is set to "#win32con" (explicit
65use) or if TERM is unset or empty (implicit).
66
67Beginning with build 17763 (Fall 2018 update), Windows 10 supports ANSI escape
68sequences (Virtual Terminal support). If ncurses detects this or a later
69Windows 10 version, the interpretation of the implicit TERM setting (which
70means: TERM is not set or empty) changes. In this case, TERM is to be assumed
71to be "ms-terminal" and ncurses acts using the regular terminfo based driver,
72thus acting like a regular Terminal we all know from UNIX like environments.
73
74This code requires WindowsNT 6.0 or better, which means on the client
75Windows Vista or better, on the server Windows Server 2008 or better.
76
77If running on Windows 10 Build 17763 or later is detected, any program
78spawning a subprocess running a ncurses program should use the new
79PseudoConsole support, which provides what we know as pty from the UNIX
80world also for Windows. Using the CreatePseudoConsole API
81(see https://docs.microsoft.com/en-us/windows/console/createpseudoconsole)
82in the calling process, it is guaranteed that the called ncurses program has
83a console that is required by its implementation, even if the calling program
84is NOT a console program, e.g., MSYS2's own mintty Terminal emulator.
85
86In the current MSYS2/minGW setup, building MinGW shared libraries with
87libtool for ncurses seems to be broken, so I recommend NOT to use libtool.
88
89To build a modern but still small footprint ncurses that provides
90hooks for interop, I recommend using these options:
91
92	--without-libtool
93	--disable-home-terminfo
94	--enable-database
95	--disable-termcap
96	--enable-sp-funcs
97	--enable-term-driver
98	--enable-interop
99
100This is the configuration command line which I am using at the moment
101(assuming environment variable MINGW_ROOT holds the root directory name of
102your MinGW build):
103
104./configure \
105	--prefix=/mingw64 \
106	--without-cxx \
107	--without-ada \
108	--enable-warnings \
109	--enable-assertions \
110	--enable-exp-win32 \
111	--enable-ext-funcs \
112	--disable-home-terminfo \
113	--disable-echo \
114	--disable-getcap \
115	--disable-hard-tabs \
116	--disable-leaks \
117	--disable-macros \
118	--disable-overwrite \
119	--enable-opaque-curses \
120	--enable-opaque-panel \
121	--enable-opaque-menu \
122	--enable-opaque-form \
123	--enable-database \
124	--enable-sp-funcs \
125	--enable-term-driver \
126	--enable-interop \
127	--disable-termcap \
128	--enable-database \
129	--with-progs \
130	--without-libtool \
131	--enable-pc-files \
132	--with-shared \
133	--with-normal \
134	--without-debug \
135	--with-fallbacks=ms-terminal \
136	--without-manpages
137
138Please note that it is also necessary to set this environment variable:
139
140export PATH_SEPARATOR=";"
141
142in order to parse the terminfo paths correctly. Terminfo paths should
143always be separated by a semicolon, even when running under MSYS2.
144
145All the options above are - like the whole Windows support -
146experimental.
147
148-- vile:txtmode
149

README.OpenSource

1[
2  {
3    "Name": "ncurses",
4    "License": "MIT",
5    "License File": "COPYING",
6    "Version Number": "6.5",
7    "Owner": "liyiming13@huawei.com",
8    "Upstream URL": "https://invisible-mirror.net/archives/ncurses/ncurses-6.5.tar.gz",
9    "Description": "The ncurses (new curses) library is a free software emulation of curses in System V Release 4.0 (SVr4), and more. It uses terminfo format, supports pads and color and multiple highlights and forms characters and function-key mapping, and has all the other SVr4-curses enhancements over BSD curses. SVr4 curses became the basis of X/Open Curses."
10  }
11]

README.emx

1-------------------------------------------------------------------------------
2-- Copyright 2020,2021 Thomas E. Dickey                                      --
3-- Copyright 1998-2006,2018 Free Software Foundation, Inc.                   --
4--                                                                           --
5-- Permission is hereby granted, free of charge, to any person obtaining a   --
6-- copy of this software and associated documentation files (the             --
7-- "Software"), to deal in the Software without restriction, including       --
8-- without limitation the rights to use, copy, modify, merge, publish,       --
9-- distribute, distribute with modifications, sublicense, and/or sell copies --
10-- of the Software, and to permit persons to whom the Software is furnished  --
11-- to do so, subject to the following conditions:                            --
12--                                                                           --
13-- The above copyright notice and this permission notice shall be included   --
14-- in all copies or substantial portions of the Software.                    --
15--                                                                           --
16-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
17-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
18-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
19-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
20-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
21-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
22-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
23--                                                                           --
24-- Except as contained in this notice, the name(s) of the above copyright    --
25-- holders shall not be used in advertising or otherwise to promote the      --
26-- sale, use or other dealings in this Software without prior written        --
27-- authorization.                                                            --
28-------------------------------------------------------------------------------
29-- $Id: README.emx,v 1.12 2021/06/17 21:20:30 tom Exp $
30-- Author: Thomas Dickey
31-------------------------------------------------------------------------------
32
33You can build ncurses on OS/2 in the EMX environment.  But you must build and
34acquire tools.  Not all of the tools distributed with EMX work properly, and
35some additional ones are required.
36
37First, the configure script distributed with ncurses will not run as-is in EMX.
38You can generate a new one if you have autoconf built for EMX.  You will need
39the EMX development tools, of course.  Get these programs to start:
40
41	GNU m4 program (version 1.4)
42	GNU autoconf (version 2.13).
43	GNU patch (version 2.5)
44
45Apply the autoconf patches from
46
47	https://invisible-island.net/autoconf
48	ftp://ftp.invisible-island.net/autoconf
49
50These are ordered by date:
51
52	autoconf-2.13-20030927.patch.gz
53	autoconf-2.13-20030927-emx.patch.gz
54
55I built my development environment for ncurses using EMX 0.9c at the end of
561997.  Much of the EMX patch for autoconf was done originally by J.J.G.Ripoll,
57using a similar environment (he prefers using the 'ash' shell).  Newer versions
58may fix these problems:
59
60	+ The pdksh program distributed at Hobbes and Leo (with a 1996 date) is
61	  defective.  It does not process "here documents" correctly (which
62	  renders it useless for running the autoconf script).  I built my own
63	  copy of pdksh 5.2.13, which does have the bug corrected (documented
64	  in the change log for pdksh).
65
66	+ I also built from sources (because the distributed binaries did not
67	  work) the cmp, diff programs.
68
69	  Other required utilities such as ar, cat, chmod, cp, gawk, grep, mv,
70	  ls, rm, mkdir, sed, sort and tr worked.
71
72Once you have autoconf patched and installed, run 'autoconf' from the top-level
73directory of ncurses to generate the EMX-specific configure script.
74

README.md

1INSTALLATION PROCEDURE:
2----------------------
3
41.  First, decide whether you want ncurses to replace your existing library (in
5    which case you'll need super-user privileges) or be installed in parallel
6    with it.
7
8    The --prefix option to configure changes the root directory for installing
9    ncurses.  The default is normally in subdirectories of /usr/local, except
10    for systems where ncurses is normally installed as a system library (see
11    "IF YOU ARE A SYSTEM INTEGRATOR").  Use --prefix=/usr to replace your
12    default curses distribution.
13
14    The package gets installed beneath the --prefix directory as follows:
15
16    In $(prefix)/bin:          tic, infocmp, captoinfo, tset,
17				reset, clear, tput, toe, tabs
18    In $(prefix)/lib:          libncurses*.* libcurses.a
19    In $(prefix)/share/terminfo: compiled terminal descriptions
20    In $(prefix)/include:      C header files
21    Under $(prefix)/man:       the manual pages
22
23    Note that the configure script attempts to locate previous installation of
24    ncurses, and will set the default prefix according to where it finds the
25    ncurses headers.
26
27    Do not use commands such as
28
29	make install prefix=XXX
30
31    to change the prefix after configuration, since the prefix value is used
32    for some absolute pathnames such as TERMINFO.  Instead do this
33
34	make install DESTDIR=XXX
35
36    See also the discussion of --with-install-prefix.
37
382.  Type `./configure' in the top-level directory of the distribution to
39    configure ncurses for your operating system and create the Makefiles.
40    Besides --prefix, various configuration options are available to customize
41    the installation; use `./configure --help' to list the available options.
42
43    If your operating system is not supported, read the PORTABILITY section in
44    the file ncurses/README for information on how to create a configuration
45    file for your system.
46
47    The `configure' script generates makefile rules for one or more object
48    models and their associated libraries:
49
50	libncurses.a (normal)
51
52	libcurses.a (normal, a link to libncurses.a)
53		This gets left out if you configure with --disable-overwrite.
54
55	libncurses.so (shared)
56
57	libncurses_g.a (debug)
58
59	libncurses_p.a (profile)
60
61	libncurses.la (libtool)
62
63    If you configure using the --enable-widec option, a "w" is appended to the
64    library names (e.g., libncursesw.a), and the resulting libraries support
65    wide-characters, e.g., via a UTF-8 locale.  The corresponding header files
66    are compatible with the non-wide-character configuration; wide-character
67    features are provided by ifdef's in the header files.  The wide-character
68    library interfaces are not binary-compatible with the non-wide-character
69    version.  Building and running the wide-character code relies on a fairly
70    recent implementation of libiconv.  We have built this configuration on
71    various systems using libiconv, sometimes requiring libutf8.
72
73    If you configure using the --with-pthread option, a "t" is appended to
74    the library names (e.g., libncursest.a, libncursestw.a).
75
76    If you do not specify any models, the normal and debug libraries will be
77    configured.  Typing `configure' with no arguments is equivalent to:
78
79	./configure --with-normal --with-debug --enable-overwrite
80
81    Typing
82
83	./configure --with-shared
84
85    makes the shared libraries the default, resulting in
86
87	./configure --with-shared --with-normal --with-debug --enable-overwrite
88
89    If you want only shared libraries, type
90
91	./configure --with-shared --without-normal --without-debug
92
93    Rules for generating shared libraries are highly dependent upon the choice
94    of host system and compiler.  We've been testing shared libraries on
95    several systems, but more work needs to be done to make shared libraries
96    work on other systems.
97
98    If you have libtool installed, you can type
99
100	./configure --with-libtool
101
102    to generate the appropriate static and/or shared libraries for your
103    platform using libtool.
104
105    You can make curses and terminfo fall back to an existing file of termcap
106    definitions by configuring with --enable-termcap.  If you do this, the
107    library will search /etc/termcap before the terminfo database, and will
108    also interpret the contents of the TERM environment variable.  See the
109    section BSD CONVERSION NOTES below.
110
1113.  Type `make'.  Ignore any warnings, no error messages should be produced.
112    This should compile the ncurses library, the terminfo compiler tic(1),
113    captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
114    programs (see the manual pages for explanation of what they do), some test
115    programs, and the panels, menus, and forms libraries.
116
1174.  Run ncurses and several other test programs in the test directory to
118    verify that ncurses functions correctly before doing an install that
119    may overwrite system files.  Read the file test/README for details on
120    the test programs.
121
122    NOTE: You must have installed the terminfo database, or set the
123    environment variable $TERMINFO to point to a SVr4-compatible terminfo
124    database before running the test programs.  Not all vendors' terminfo
125    databases are SVr4-compatible, but most seem to be.
126
127    It is possible to configure ncurses to use other terminfo database formats.
128    A few are provided as examples in the include-directory (see --with-caps).
129
130    If you run the test programs WITHOUT installing terminfo, ncurses may
131    read the termcap file and cache that in $HOME/.terminfo, which will
132    thereafter be used instead of the terminfo database.  See the comments
133    on "--enable-getcap-cache", to see why this is a Bad Thing.
134
135    The ncurses program is designed specifically to test the ncurses library.
136    You can use it to verify that the screen highlights work correctly, that
137    cursor addressing and window scrolling works OK, etc.
138
1395.  Once you've tested, you can type `make install' to install libraries,
140    the programs, the terminfo database and the manual pages.  Alternately, you
141    can type `make install' in each directory you want to install.  In the
142    top-level directory, you can do a partial install using these commands:
143
144	'make install.progs'    installs tic, infocmp, etc...
145	'make install.includes' installs the headers.
146	'make install.libs'     installs the libraries (and the headers).
147	'make install.data'     installs the terminfo data. (Note: `tic' must
148				be installed before the terminfo data can be
149				compiled).
150	'make install.man'      installs the manual pages.
151

README_zh.md

1# ncurses<a name="ZH-CN_TOPIC_0000001106844024"></a>
2
3- [简介](#section11660541593)
4- [目录结构](#section367519246426)
5- [编译构建](#section137768191623)
6- [许可证](#section126611612164217)
7
8## 简介<a name="section11660541593"></a>
9
10ncurses是一个编写文本界面(TUI)的接口库。是一个用于控制终端屏幕输出和输入的库,可以用于创建交互式的命令行界面,它提供了一系列函数来控制终端的光标位置、颜色、文本输出等。使用 ncurses 库需要先初始化,然后使用各种函数来控制终端的输出和输入。它的主要接口和功能包括
11- initscr(): 初始化curses模式,返回一个指向标准屏幕指针。
12- endwin(): 退出curses模式,恢复终端的正常状态。
13- addch(): 在当前光标位置添加一个字符,并更新光标位置。
14- addstr():在当前光标位置添加一个字符串,并更新光标位置。
15- getch(): 从键盘获取一个字符,并返回其ASCII码或键值。
16- move(): 移动光标到指定的行和列位置。
17- refresh(): 将虚拟屏幕上的内容复制到物理屏幕上,并刷新显示。
18- clear(): 清除虚拟屏幕上的内容,并将光标移动到左上角。
19
20
21在Openharonmy引入后,在lldb构建中开启编译可选依赖选项LLDB_ENABLE_CURSES,lldb.so会依赖ncurses编译生成的动态库ncurses.so,最终实现lldb调试器命令行调试时自动补齐和gui功能。
22## 目录结构<a name="section367519246426"></a>
23```
24- Ada95
25- c++
26- doc
27- form
28- include
29- man
30- menu
31- misc
32- ncurses
33- package
34- panel
35- progs
36- test
37- aclocal.m4
38- ANNOUNCE
39- announce.html.in
40- AUTHORS
41- config.guess
42- config.sub
43- configure
44- configure.in
45- COPYING                              版权文件
46- dist.mk
47- INSTALL
48- install-sh
49- Makefile.in
50- Makefile.os2
51- MANIFEST
52- mk-0th.awk
53- mk-1st.awk
54- mk-2nd.awk
55- mk-hdr.awk
56- NEWS
57- OAT.xml                          OAT.xml过滤配置文件
58- README
59- README.emx
60- README.MinGW
61- README.OpenSource                 项目README.OpenSource文件
62- README_zh.md                      中文说明
63- TO-DO
64- VERSION
65```
66## 编译与安装<a name="section137768191623"></a>
67
68### 单项目模式运行<a name="section1771013213818"></a>
69
70```
71- ./configure:用于配置软件的脚本,会根据系统环境检测和设置一些变量,生成对应的Makefile和一些头文件。其中运行configure脚本的时候指定一些参数来改变配置选项,如--prefix指定安装目录,--libdir指定库文件目录,--bindir指定可执行文件目录。
72- make: 用于安装ncurses软件,根据Makefile中的规则执行一系列的操作,编译源代码,运行测试,检查外部依赖等。
73- make install: 将编译好的ncurses.so文件安装到配置时指定的目录中。
74```
75
76
77
78## ncurses使用文档
79官方文档  https://invisible-island.net/ncurses/ncurses.html
80
81
82## 许可证<a name="section126611612164217"></a>
83
84本项目遵从MIT许可证。
85