aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/ncurses/ANNOUNCE75
-rw-r--r--contrib/ncurses/INSTALL475
-rw-r--r--contrib/ncurses/MANIFEST12
-rw-r--r--contrib/ncurses/Makefile.glibc2
-rw-r--r--contrib/ncurses/Makefile.in10
-rw-r--r--contrib/ncurses/Makefile.os211
-rw-r--r--contrib/ncurses/NEWS320
-rw-r--r--contrib/ncurses/README14
-rw-r--r--contrib/ncurses/README.emx13
-rw-r--r--contrib/ncurses/aclocal.m4414
-rw-r--r--contrib/ncurses/announce.html.in39
-rw-r--r--contrib/ncurses/c++/Makefile.in12
-rw-r--r--contrib/ncurses/c++/cursesf.cc11
-rw-r--r--contrib/ncurses/c++/cursesf.h93
-rw-r--r--contrib/ncurses/c++/cursesp.cc19
-rw-r--r--contrib/ncurses/c++/cursesw.cc4
-rw-r--r--contrib/ncurses/c++/cursslk.cc7
-rw-r--r--contrib/ncurses/c++/internal.h6
-rwxr-xr-xcontrib/ncurses/config.guess5
-rwxr-xr-xcontrib/ncurses/config.sub19
-rwxr-xr-xcontrib/ncurses/configure2272
-rw-r--r--contrib/ncurses/configure.in262
-rw-r--r--contrib/ncurses/convert_configure.pl52
-rw-r--r--contrib/ncurses/dist.mk4
-rw-r--r--contrib/ncurses/doc/html/announce.html39
-rw-r--r--contrib/ncurses/form/Makefile.in10
-rw-r--r--contrib/ncurses/form/fty_enum.c74
-rw-r--r--contrib/ncurses/include/Caps26
-rwxr-xr-xcontrib/ncurses/include/MKncurses_def.sh80
-rwxr-xr-xcontrib/ncurses/include/MKparametrized.sh3
-rw-r--r--contrib/ncurses/include/Makefile.in12
-rw-r--r--contrib/ncurses/include/curses.h.in9
-rwxr-xr-xcontrib/ncurses/include/edit_cfg.sh7
-rw-r--r--contrib/ncurses/include/ncurses_cfg.hin14
-rw-r--r--contrib/ncurses/include/ncurses_defs151
-rw-r--r--contrib/ncurses/include/termcap.h.in5
-rw-r--r--contrib/ncurses/include/tic.h5
-rw-r--r--contrib/ncurses/man/Makefile.in14
-rw-r--r--contrib/ncurses/man/captoinfo.1m6
-rw-r--r--contrib/ncurses/man/clear.16
-rw-r--r--contrib/ncurses/man/curs_attr.3x5
-rw-r--r--contrib/ncurses/man/curs_color.3x52
-rw-r--r--contrib/ncurses/man/curs_extend.3x6
-rw-r--r--contrib/ncurses/man/curs_initscr.3x4
-rw-r--r--contrib/ncurses/man/curs_mouse.3x13
-rw-r--r--contrib/ncurses/man/curs_pad.3x7
-rw-r--r--contrib/ncurses/man/curs_scanw.3x4
-rw-r--r--contrib/ncurses/man/curs_termattrs.3x8
-rw-r--r--contrib/ncurses/man/curs_touch.3x6
-rw-r--r--contrib/ncurses/man/curs_trace.3x150
-rw-r--r--contrib/ncurses/man/default_colors.3x133
-rw-r--r--contrib/ncurses/man/form_fieldtype.3x6
-rw-r--r--contrib/ncurses/man/infocmp.1m9
-rw-r--r--contrib/ncurses/man/infotocap.1m4
-rw-r--r--contrib/ncurses/man/man_db.renames7
-rw-r--r--contrib/ncurses/man/manlinks.sed6
-rw-r--r--contrib/ncurses/man/menu.3x20
-rw-r--r--contrib/ncurses/man/menu_attributes.3x100
-rw-r--r--contrib/ncurses/man/ncurses.3x31
-rw-r--r--contrib/ncurses/man/panel.3x4
-rw-r--r--contrib/ncurses/man/term.54
-rw-r--r--contrib/ncurses/man/term.74
-rw-r--r--contrib/ncurses/man/terminfo.head4
-rw-r--r--contrib/ncurses/man/tic.1m13
-rw-r--r--contrib/ncurses/man/toe.1m12
-rw-r--r--contrib/ncurses/man/tput.143
-rw-r--r--contrib/ncurses/man/tset.121
-rw-r--r--contrib/ncurses/menu/Makefile.in10
-rw-r--r--contrib/ncurses/menu/menu.h4
-rw-r--r--contrib/ncurses/menu/mf_common.h4
-rw-r--r--contrib/ncurses/misc/Makefile.in51
-rw-r--r--contrib/ncurses/misc/emx.src17
-rw-r--r--contrib/ncurses/misc/form.def2
-rw-r--r--contrib/ncurses/misc/indent.pro2
-rw-r--r--contrib/ncurses/misc/menu.def2
-rw-r--r--contrib/ncurses/misc/ncurses.def153
-rw-r--r--contrib/ncurses/misc/panel.def7
-rw-r--r--contrib/ncurses/misc/run_tic.in146
-rw-r--r--contrib/ncurses/misc/terminfo.src379
-rw-r--r--contrib/ncurses/mk-1st.awk161
-rw-r--r--contrib/ncurses/ncurses/Makefile.in14
-rwxr-xr-xcontrib/ncurses/ncurses/base/MKlib_gen.sh9
-rw-r--r--contrib/ncurses/ncurses/base/lib_addstr.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_color.c12
-rw-r--r--contrib/ncurses/ncurses/base/lib_colorset.c26
-rw-r--r--contrib/ncurses/ncurses/base/lib_dft_fgbg.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_getch.c65
-rw-r--r--contrib/ncurses/ncurses/base/lib_hline.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_mouse.c144
-rw-r--r--contrib/ncurses/ncurses/base/lib_newterm.c18
-rw-r--r--contrib/ncurses/ncurses/base/lib_restart.c65
-rw-r--r--contrib/ncurses/ncurses/base/lib_set_term.c38
-rw-r--r--contrib/ncurses/ncurses/base/lib_winch.c19
-rw-r--r--contrib/ncurses/ncurses/curses.priv.h77
-rw-r--r--contrib/ncurses/ncurses/llib-lncurses203
-rw-r--r--contrib/ncurses/ncurses/modules4
-rw-r--r--contrib/ncurses/ncurses/tinfo/access.c77
-rw-r--r--contrib/ncurses/ncurses/tinfo/alloc_ttype.c86
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_parse.c33
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_scan.c59
-rw-r--r--contrib/ncurses/ncurses/tinfo/free_ttype.c27
-rw-r--r--contrib/ncurses/ncurses/tinfo/home_terminfo.c27
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_baudrate.c164
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_options.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_raw.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_setup.c6
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termcap.c18
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tgoto.c197
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tparm.c950
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tputs.c38
-rw-r--r--contrib/ncurses/ncurses/tinfo/parse_entry.c304
-rw-r--r--contrib/ncurses/ncurses/tinfo/read_entry.c76
-rw-r--r--contrib/ncurses/ncurses/tinfo/read_termcap.c71
-rw-r--r--contrib/ncurses/ncurses/tinfo/strings.c139
-rw-r--r--contrib/ncurses/ncurses/tinfo/write_entry.c8
-rw-r--r--contrib/ncurses/ncurses/trace/lib_traceatr.c238
-rw-r--r--contrib/ncurses/ncurses/trace/lib_tracebits.c63
-rwxr-xr-xcontrib/ncurses/ncurses/tty/MKexpanded.sh10
-rw-r--r--contrib/ncurses/ncurses/tty/lib_mvcur.c251
-rw-r--r--contrib/ncurses/ncurses/tty/lib_tstp.c342
-rw-r--r--contrib/ncurses/ncurses/tty/lib_twait.c284
-rw-r--r--contrib/ncurses/ncurses/tty/lib_vidattr.c93
-rw-r--r--contrib/ncurses/ncurses/tty/tty_update.c261
-rw-r--r--contrib/ncurses/panel/Makefile.in14
-rw-r--r--contrib/ncurses/panel/panel.priv.h32
-rw-r--r--contrib/ncurses/progs/Makefile.in103
-rw-r--r--contrib/ncurses/progs/dump_entry.c5
-rw-r--r--contrib/ncurses/progs/infocmp.c150
-rw-r--r--contrib/ncurses/progs/progs.priv.h8
-rw-r--r--contrib/ncurses/progs/tic.c280
-rw-r--r--contrib/ncurses/progs/toe.c12
-rw-r--r--contrib/ncurses/progs/tput.c165
-rw-r--r--contrib/ncurses/progs/tset.c100
-rw-r--r--contrib/ncurses/tack/Makefile.in28
-rw-r--r--contrib/ncurses/tack/sysdep.c43
-rw-r--r--contrib/ncurses/test/cardfile.c10
-rwxr-xr-xcontrib/ncurses/test/configure95
-rw-r--r--contrib/ncurses/test/configure.in9
-rw-r--r--contrib/ncurses/test/filter.c92
-rw-r--r--contrib/ncurses/test/firework.c4
-rw-r--r--contrib/ncurses/test/gdc.c4
-rw-r--r--contrib/ncurses/test/hanoi.c375
-rw-r--r--contrib/ncurses/test/hashtest.c3
-rw-r--r--contrib/ncurses/test/knight.c726
-rw-r--r--contrib/ncurses/test/ncurses.c353
-rw-r--r--contrib/ncurses/test/railroad.c80
-rw-r--r--contrib/ncurses/test/rain.c4
-rw-r--r--contrib/ncurses/test/tclock.c2
-rw-r--r--contrib/ncurses/test/test.priv.h29
-rw-r--r--contrib/ncurses/test/view.c6
-rw-r--r--contrib/ncurses/test/worm.c4
-rw-r--r--contrib/ncurses/test/xmas.c1642
152 files changed, 9460 insertions, 5680 deletions
diff --git a/contrib/ncurses/ANNOUNCE b/contrib/ncurses/ANNOUNCE
index 22ae4da81c8b..5ef8f3c2f963 100644
--- a/contrib/ncurses/ANNOUNCE
+++ b/contrib/ncurses/ANNOUNCE
@@ -22,8 +22,8 @@
manual pages are provided for the library and tools.
The ncurses distribution is available via anonymous FTP at the GNU
- distribution site [1]ftp://ftp.gnu.org/pub/gnu/ncurses. It is also
- available at [2]ftp://dickey.his.com/ncurses.
+ distribution site [1]ftp://ftp.gnu.org/pub/gnu/ncurses.
+ It is also available at [2]ftp://dickey.his.com/ncurses.
Release Notes
@@ -52,8 +52,12 @@
control over the use of default colors. This is the principal
visible difference between ncurses 5.1 and preceding versions. The
new extension allows an application to specify what colors pair 0
- uses. It defaults to white on black, unless you have invoked
- use_default_colors().
+ uses.
+ NOTE: Pair 0 defaults to white on black unless you have invoked
+ use_default_colors() or set it via assume_default_colors(). An
+ application that calls start_colors() without setting the
+ background color will consistently have a black background no
+ matter what color your terminal's background actually is.
* made several fixes to the terminfo-to-termcap conversion, and have
been using the generated termcaps without further hand-tuning.
This builds on the extension use_extended_names() by adding
@@ -81,8 +85,8 @@
affects stty lnext on systems such as FreeBSD
* reordered tests during mouse initialization to allow for gpm to
run in xterm, or for xterm to be used under OS/2 EMX. Also dropped
- test for $DISPLAY in favor of kmous=\E[M or $TERM containing
- "xterm".
+ test for $DISPLAY in favor of the terminfo capability kmous=\E[M
+ or if $TERM environment variable contains "xterm".
* added configure option --with-manpage-symlinks, which provides for
fully indexing manpage entries by making symbolic links for the
aliases.
@@ -237,7 +241,8 @@
cdk
Curses Development Kit
- [3]Curses Development Kit [4]http://dickey.his.com/cdk.
+ [3]http://www.vexus.ca/CDK.html
+ [4]http://dickey.his.com/cdk.
ded
directory-editor
@@ -254,47 +259,53 @@
Midnight Commander 4.1
file manager
+ [8]www.gnome.org/mc/.
mutt
mail utility
- [8]http://www.mutt.org.
+ [9]http://www.mutt.org.
ncftp
file-transfer utility
+ [10]http://www.ncftp.com.
nvi
New vi versions 1.50 are able to use ncurses versions 1.9.7 and
later.
+ [11]http://www.bostic.com/vi/.
tin
newsreader, supporting color, MIME
- [9]http://www.tin.org.
+ [12]http://www.tin.org.
taper
tape archive utility
+ [13]http://members.iinet.net.au/~yusuf/taper/.
vh-1.6
Volks-Hypertext browser for the Jargon File
+ [14]http://www.bg.debian.org/Packages/unstable/text/vh.html.
as well as some that use ncurses for the terminfo support alone:
minicom
terminal emulator
+ [15]http://www.pp.clinet.fi/~walker/minicom.html.
vile
vi-like-emacs
- [10]http://dickey.his.com/vile.
+ [16]http://dickey.his.com/vile.
The ncurses distribution includes a selection of test programs
(including a few games).
Who's Who and What's What
- The original developers of ncurses are [11]Zeyd Ben-Halim and [12]Eric
- S. Raymond. Ongoing work is being done by [13]Thomas Dickey and
- [14]Jürgen Pfeifer. [15]Thomas Dickey acts as the maintainer for the
+ The original developers of ncurses are [17]Zeyd Ben-Halim and [18]Eric
+ S. Raymond. Ongoing work is being done by [19]Thomas Dickey and
+ [20]Jürgen Pfeifer. [21]Thomas Dickey acts as the maintainer for the
Free Software Foundation, which holds the copyright on ncurses.
- Contact the current maintainers at [16]bug-ncurses@gnu.org.
+ Contact the current maintainers at [22]bug-ncurses@gnu.org.
To join the ncurses mailing list, please write email to
bug-ncurses-request@gnu.org containing the line:
@@ -304,7 +315,7 @@ Who's Who and What's What
and testing of this package.
Beta versions of ncurses and patches to the current release are made
- available at [17]ftp://dickey.his.com/ncurses.
+ available at [23]ftp://dickey.his.com/ncurses.
Future Plans
@@ -319,10 +330,10 @@ Other Related Resources
The distribution includes and uses a version of the terminfo-format
terminal description file maintained by Eric Raymond.
- [18]http://earthspace.net/~esr/terminfo.
+ [24]http://earthspace.net/~esr/terminfo.
You can find lots of information on terminal-related topics not
- covered in the terminfo file at [19]Richard Shuford's archive.
+ covered in the terminfo file at [25]Richard Shuford's archive.
References
@@ -333,15 +344,21 @@ References
5. http://dickey.his.com/ded/ded.html
6. http://dickey.his.com/dialog/dialog.html
7. http://lynx.isc.org/release/
- 8. http://www.mutt.org/
- 9. http://www.tin.org/
- 10. http://dickey.his.com/vile/vile.html
- 11. mailto:zmbenhal@netcom.com
- 12. http://www.ccil.org/~esr/home.html
- 13. mailto:dickey@herndon4.his.com
- 14. mailto:juergen.pfeifer@gmx.net
- 15. mailto:dickey@herndon4.his.com
- 16. mailto:bug-ncurses@gnu.org
- 17. ftp://dickey.his.com/ncurses
- 18. http://earthspace.net/~esr/terminfo
- 19. http://www.cs.utk.edu/~shuford/terminal_index.html
+ 8. file://localhost/usr/build/ncurses/ncurses-5.1-20000704/doc/html/www.gnome.org/mc/
+ 9. http://www.mutt.org/
+ 10. http://www.ncftp.com/
+ 11. http://www.bostic.com/vi/
+ 12. http://www.tin.org/
+ 13. http://members.iinet.net.au/~yusuf/taper/
+ 14. http://www.bg.debian.org/Packages/unstable/text/vh.html
+ 15. http://www.pp.clinet.fi/~walker/minicom.html
+ 16. http://dickey.his.com/vile/vile.html
+ 17. mailto:zmbenhal@netcom.com
+ 18. http://www.ccil.org/~esr/home.html
+ 19. mailto:dickey@herndon4.his.com
+ 20. mailto:juergen.pfeifer@gmx.net
+ 21. mailto:dickey@herndon4.his.com
+ 22. mailto:bug-ncurses@gnu.org
+ 23. ftp://dickey.his.com/ncurses
+ 24. http://earthspace.net/~esr/terminfo
+ 25. http://www.cs.utk.edu/~shuford/terminal_index.html
diff --git a/contrib/ncurses/INSTALL b/contrib/ncurses/INSTALL
index 9814990daf1c..ab2dc74c56c1 100644
--- a/contrib/ncurses/INSTALL
+++ b/contrib/ncurses/INSTALL
@@ -1,4 +1,4 @@
--- $Id: INSTALL,v 1.36 2000/05/06 17:30:14 tom Exp $
+-- $Id: INSTALL,v 1.45 2000/10/08 02:17:57 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@@ -28,12 +28,12 @@ read the USING NCURSES WITH EMACS section below.
If you are trying to build applications using gpm with ncurses,
read the USING NCURSES WITH GPM section below.
-If you are trying to build Elvis using ncurses for terminal support,
-read the USING NCURSES WITH ELVIS section below.
-
If you are running over the Andrew File System see the note below on
USING NCURSES WITH AFS.
+If you are cross-compiling, see the note below on BUILDING NCURSES WITH A
+CROSS-COMPILER.
+
If you want to build the Ada95 binding, go to the Ada95 directory and
follow the instructions there. The Ada95 binding is not covered below.
@@ -71,7 +71,7 @@ INSTALLATION PROCEDURE:
The package gets installed beneath the --prefix directory as follows:
In $(prefix)/bin: tic, infocmp, captoinfo, tset,
- reset, clear, tput, toe
+ reset, clear, tput, toe
In $(prefix)/lib: libncurses*.* libcurses.a
In $(prefix)/share/terminfo: compiled terminal descriptions
In $(prefix)/include: C header files
@@ -107,19 +107,19 @@ INSTALLATION PROCEDURE:
If you do not specify any models, the normal and debug libraries will be
configured. Typing `configure' with no arguments is equivalent to:
- ./configure --with-normal --with-debug --enable-overwrite
+ ./configure --with-normal --with-debug --enable-overwrite
Typing
- ./configure --with-shared
+ ./configure --with-shared
makes the shared libraries the default, resulting in
- ./configure --with-shared --with-normal --with-debug --enable-overwrite
+ ./configure --with-shared --with-normal --with-debug --enable-overwrite
If you want only shared libraries, type
- ./configure --with-shared --without-normal --without-debug
+ ./configure --with-shared --without-normal --without-debug
Rules for generating shared libraries are highly dependent upon the choice
of host system and compiler. We've been testing shared libraries on Linux
@@ -135,7 +135,7 @@ INSTALLATION PROCEDURE:
3. Type `make'. Ignore any warnings, no error messages should be produced.
This should compile the ncurses library, the terminfo compiler tic(1),
captoinfo(1), infocmp(1), toe(1), clear(1) tset(1), reset(1), and tput(1)
- programs (see the man pages for explanation of what they do), some test
+ programs (see the manual pages for explanation of what they do), some test
programs, and the panels, menus, and forms libraries.
4. Run ncurses and several other test programs in the test directory to
@@ -154,17 +154,17 @@ INSTALLATION PROCEDURE:
cursor addressing and window scrolling works OK, etc.
5. Once you've tested, you can type `make install' to install libraries,
- the programs, the terminfo database and the man pages. Alternately, you
+ the programs, the terminfo database and the manual pages. Alternately, you
can type `make install' in each directory you want to install. In the
top-level directory, you can do a partial install using these commands:
'make install.progs' installs tic, infocmp, etc...
- 'make install.includes' installs the headers.
- 'make install.libs' installs the libraries (and the headers).
- 'make install.data' installs the terminfo data. (Note: `tic' must
- be installed before the terminfo data can be
- compiled).
- 'make install.man' installs the man pages.
+ 'make install.includes' installs the headers.
+ 'make install.libs' installs the libraries (and the headers).
+ 'make install.data' installs the terminfo data. (Note: `tic' must
+ be installed before the terminfo data can be
+ compiled).
+ 'make install.man' installs the manual pages.
############################################################################
# CAVEAT EMPTOR: `install.data' run as root will NUKE any existing #
@@ -173,9 +173,9 @@ INSTALLATION PROCEDURE:
# this purpose. Don't forget to run tic on the file once you're done. #
############################################################################
- The terminfo(5) manual page wants to be preprocessed with tbl(1) before
+ The terminfo(5) manual page must be preprocessed with tbl(1) before
being formatted by nroff(1). Modern man(1) implementations tend to do
- this by default, but you may want to look at your version's man page
+ this by default, but you may want to look at your version's manual page
to be sure.
If the system already has a curses library that you need to keep using
@@ -232,6 +232,351 @@ INSTALLATION PROCEDURE:
possible screen sizes, ncurses will figure out the size automatically.
+SUMMARY OF CONFIGURE OPTIONS:
+----------------------------
+
+ The configure script provides a short list of its options when you type
+
+ ./configure --help
+
+ The --help and several options are common to all configure scripts that are
+ generated with autoconf. Those are all listed before the line
+
+ --enable and --with options recognized:
+
+ The other options are specific to this package. We list them in alphabetic
+ order.
+
+ --disable-assumed-color
+ With ncurses 5.1, we introduced a new function, assume_default_colors()
+ which allows applications to specify what the default foreground and
+ background color are assumed to be. Most color applications use
+ full-screen color; but a few do not color the background. While the
+ assumed values can be overridden by invoking assume_default_colors(),
+ you may find it useful to set the assumed values to the pre-5.1
+ convention, using this configure option.
+
+ --disable-big-core
+ Assume machine has little memory. The configure script attempts to
+ determine if your machine has enough memory (about 6Mb) to compile the
+ terminfo database without writing portions to disk. Some allocators
+ return deceptive results, so you may have to override the configure
+ script. Or you may be building tic for a smaller machine.
+
+ --disable-database
+ Use only built-in data. The ncurses libraries normally read terminfo
+ and termcap data from disk. You can configure ncurses to have a
+ built-in database, aka "fallback" entries. Embedded applications may
+ have no need for an external database.
+
+ --disable-ext-funcs
+ Disable function-extensions. Configure ncurses without the functions
+ that are not specified by XSI. See ncurses/modules for the exact
+ list of library modules that would be suppressed.
+
+ --disable-hashmap
+ Compile without hashmap scrolling-optimization code. This algorithm is
+ the default.
+
+ --disable-leaks
+ For testing, compile-in code that frees memory that normally would not
+ be freed, to simplify analysis of memory-leaks.
+
+ --disable-macros
+ For testing, use functions rather than macros. The program will run
+ more slowly, but it is simpler to debug. This makes a header file
+ "nomacros.h". See also the --enable-expanded option.
+
+ --disable-overwrite
+ If you are installing ncurses on a system which contains another
+ development version of curses, or which could be confused by the loader
+ for another version, we recommend that you leave out the link to
+ -lcurses. The ncurses library is always available as -lncurses.
+ Disabling overwrite also causes the ncurses header files to be
+ installed into a subdirectory, e.g., /usr/local/include/ncurses,
+ rather than the include directory. This makes it simpler to avoid
+ compile-time conflicts with other versions of curses.h
+
+ --disable-root-environ
+ Compile with environment restriction, so certain environment variables
+ are not available when running as root, or via a setuid/setgid
+ application. These are (for example $TERMINFO) those that allow the
+ search path for the terminfo or termcap entry to be customized.
+
+ --disable-scroll-hints
+ Compile without scroll-hints code. This option is ignored when
+ hashmap scrolling is configured, which is the default.
+
+ --enable-add-ons=DIR...
+ This is used to check if this package is a glibc add-on. This is used
+ only by the glibc makefiles.
+
+ --enable-assertions
+ For testing, compile-in assertion code. This is used only for a few
+ places where ncurses cannot easily recover by returning an error code.
+
+ --enable-broken_linker
+ A few platforms have what we consider a broken linker: it cannot link
+ objects from an archive solely by referring to data objects in those
+ files, but requires a function reference. This configure option
+ changes several data references to functions to work around this
+ problem.
+
+ NOTE: With ncurses 5.1, this may not be necessary, since we are
+ told that some linkers interpret uninitialized global data as a
+ different type of reference which behaves as described above. We have
+ explicitly initialized all of the global data to work around the
+ problem.
+
+ --enable-bsdpad
+ Recognize BSD-style prefix padding. Some ancient BSD programs (such as
+ nethack) call tputs("50") to implement delays.
+
+ --enable-colorfgbg
+ Compile with experimental $COLORFGBG code. That environment variable
+ is set by some terminal emulators as a hint to applications, by
+ advertising the default foreground and background colors. During
+ initialization, ncurses sets color pair 0 to match this.
+
+ --enable-const
+ The curses interface as documented in XSI is rather old, in fact
+ including features that precede ANSI C. The prototypes generally do
+ not make effective use of "const". When using stricter compilers (or
+ gcc with appropriate warnings), you may see warnings about the mismatch
+ between const and non-const data. We provide a configure option which
+ changes the interfaces to use const - quieting these warnings and
+ reflecting the actual use of the parameters more closely. The ncurses
+ library uses the symbol NCURSES_CONST for these instances of const,
+ and if you have asked for compiler warnings, will add gcc's const-qual
+ warning. There will still be warnings due to subtle inconsistencies
+ in the interface, but at a lower level.
+
+ NOTE: configuring ncurses with this option may detract from the
+ portability of your applications by encouraging you to use const in
+ places where the XSI curses interface would not allow them. Similar
+ issues arise when porting to SVr4 curses, which uses const in even
+ fewer places.
+
+ --enable-echo
+ Use the option --disable-echo to make the build-log less verbose by
+ suppressing the display of the compile and link commands. This makes
+ it easier to see the compiler warnings. (You can always use "make -n"
+ to see the options that are used).
+
+ --enable-expanded
+ For testing, generate functions for certain macros to make them visible
+ as such to the debugger. See also the --disable-macros option.
+
+ --enable-getcap
+ Use the 4.4BSD getcap code if available, or a bundled version of it to
+ fetch termcap entries. Entries read in this way cannot use (make
+ cross-references to) the terminfo tree, but it is faster than reading
+ /etc/termcap.
+
+ --enable-getcap-cache
+ Cache translated termcaps under the directory $HOME/.terminfo
+
+ NOTE: this sounds good - it makes ncurses run faster the second time.
+ But look where the data comes from - an /etc/termcap containing lots of
+ entries that are not up to date. If you configure with this option and
+ forget to install the terminfo database before running an ncurses
+ application, you will end up with a hidden terminfo database that
+ generally does not support color and will miss some function keys.
+
+ --enable-hard-tabs
+ Compile-in cursor-optimization code that uses hard-tabs. We would make
+ this a standard feature except for the concern that the terminfo entry
+ may not be accurate, or that your stty settings have disabled the use
+ of tabs.
+
+ --enable-no-padding
+ Compile-in support for the $NCURSES_NO_PADDING environment variable,
+ which allows you to suppress the effect of non-mandatory padding in
+ terminfo entries. This is the default, unless you have disabled the
+ extended functions.
+
+ --enable-rpath
+ Use rpath option when generating shared libraries, and with some
+ restrictions when linking the corresponding programs. This applies
+ mainly to systems using the GNU linker (read the manpage).
+
+ --enable-safe-sprintf
+ Compile with experimental safe-sprintf code. You may consider using
+ this if you are building ncurses for a system that has neither
+ vsnprintf() or vsprintf(). It is slow, however.
+
+ --enable-sigwinch
+ Compile support for ncurses' SIGWINCH handler. If your application has
+ its own SIGWINCH handler, ncurses will not use its own. The ncurses
+ handler causes wgetch() to return KEY_RESIZE when the screen-size
+ changes. This option is the default, unless you have disabled the
+ extended functions.
+
+ --enable-symlinks
+ If your system supports symbolic links, make tic use symbolic links
+ rather than hard links to save diskspace when writing aliases in the
+ terminfo database.
+
+ --enable-tcap-names
+ Compile-in support for user-definable terminal capabilities. Use the
+ -x option of tic and infocmp to treat unrecognized terminal
+ capabilities as user-defined strings. This option is the default,
+ unless you have disabled the extended functions.
+
+ --enable-termcap
+ Compile in support for reading terminal descriptions from termcap if no
+ match is found in the terminfo database. See also the --enable-getcap
+ and --enable-getcap-cache options.
+
+ --enable-warnings
+ Turn on GCC compiler warnings. There should be only a few.
+
+ --enable-widec
+ Compile with experimental wide-character code. This makes a different
+ version of the libraries (e.g., libncursesw.so), which stores
+ characters in 16-bits. We provide a simple UTF-8 driver and test
+ program to use this feature with terminals that can display UTF-8.
+
+ NOTE: applications compiled with this configuration are not compatible
+ with those built for 8-bit characters. You cannot simply make a
+ symbolic link to equate libncurses.so with libncursesw.so
+
+ --enable-xmc-glitch
+ Compile-in support experimental xmc (magic cookie) code.
+
+ --with-ada-compiler=CMD
+ Specify the Ada95 compiler command (default "gnatmake")
+
+ --with-ada-include=DIR
+ Tell where to install the Ada includes (default:
+ PREFIX/lib/ada/adainclude)
+
+ --with-ada-objects=DIR
+ Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib)
+
+ --with-database=XXX
+ Specify the terminfo source file to install. Usually you will wish
+ to install ncurses' default (misc/terminfo.src). Certain systems
+ have special requirements, e.g, OS/2 EMX has a customized terminfo
+ source file.
+
+ --with-dbmalloc
+ For testing, compile and link with Conor Cahill's dbmalloc library.
+
+ --with-debug
+ Generate debug-libraries (default). These are named by adding "_g"
+ to the root, e.g., libncurses_g.a
+
+ --with-default-terminfo-dir=XXX
+ Specify the default terminfo database directory. This is normally
+ DATADIR/terminfo, e.g., /usr/share/terminfo.
+
+ --with-develop
+ Enable experimental/development options. This does not count those
+ that change the interface, such as --enable-widec.
+
+ --with-dmalloc
+ For testing, compile and link with Gray Watson's dmalloc library.
+
+ --with-fallbacks=XXX
+ Specify a list of fallback terminal descriptions which will be
+ compiled into the ncurses library. See CONFIGURING FALLBACK ENTRIES.
+
+ --with-gpm
+ use Alessandro Rubini's GPM library to provide mouse support on the
+ Linux console.
+
+ --with-install-prefix=XXX
+ Allows you to specify an alternate location for installing ncurses
+ after building it. The value you specify is prepended to the "real"
+ install location. This simplifies making binary packages.
+
+ NOTE: a few systems build shared libraries with fixed pathnames; this
+ option probably will not work for those configurations.
+
+ --with-manpage-format=XXX
+ Tell the configure script how you would like to install man-pages. The
+ option value must be one of these: gzip, compress, BSDI, normal,
+ formatted. If you do not give this option, the configure script
+ attempts to determine which is the case.
+
+ --with-manpage-renames=XXX
+ Tell the configure script that you wish to rename the manpages while
+ installing. Currently the only distribution which does this is
+ the Linux Debian. The option value specifies the name of a file
+ that lists the renamed files, e.g., $srcdir/man/man_db.renames
+
+ --with-manpage-symlinks
+ Tell the configure script that you wish to make symbolic links in the
+ man-directory for aliases to the man-pages. This is the default, but
+ can be disabled for systems that provide this automatically. Doing
+ this on systems that do not support symbolic links will result in
+ copying the man-page for each alias.
+
+ --with-normal
+ Generate normal (i.e., static) libraries (default).
+
+ --with-profile
+ Generate profile-libraries These are named by adding "_p" to the root,
+ e.g., libncurses_p.a
+
+ --with-rcs-ids
+ Compile-in RCS identifiers. Most of the C files have an identifier.
+
+ --with-shared
+ Generate shared-libraries. The names given depend on the system for
+ which you are building, typically using a ".so" suffix, along with
+ symbolic links that refer to the release version.
+
+ NOTE: Unless you override the configure script by setting the $CFLAGS
+ environment variable, these will not be built with the -g debugging
+ option.
+
+ --with-shlib-version=XXX
+ Specify whether to use the release or ABI version for shared libraries.
+ This is normally chosen automatically based on the type of system
+ which you are building on. We use it for testing the configure script.
+
+ --with-system-type=XXX
+ For testing, override the derived host system-type which is used to
+ decide things such as the linker commands used to build shared
+ libraries. This is normally chosen automatically based on the type of
+ system which you are building on. We use it for testing the configure
+ script.
+
+ --with-terminfo-dirs=XXX
+ Specify a search-list of terminfo directories which will be compiled
+ into the ncurses library (default: DATADIR/terminfo)
+
+ --with-termlib
+ When building the ncurses library, organize this as two parts: the
+ curses library (libncurses) and the low-level terminfo library
+ (libtinfo). This is done to accommodate applications that use only
+ the latter. The terminfo library is about half the size of the total.
+
+ --without-ada
+ Suppress the configure script's check for Ada95, do not build the
+ Ada95 binding and related demo.
+
+ --without-cxx
+ XSI curses declares "bool" as part of the interface. C++ also declares
+ "bool". Neither specifies the size and type of booleans, but both
+ insist on the same name. We chose to accommodate this by making the
+ configure script check for the size and type (e.g., unsigned or signed)
+ that your C++ compiler uses for booleans. If you do not wish to use
+ ncurses with C++, use this option to tell the configure script to not
+ adjust ncurses bool to match C++.
+
+ --without-cxx-binding
+ Suppress the configure script's check for C++, do not build the
+ C++ binding and related demo.
+
+ --without-progs
+ Tell the configure script to suppress the build of ncurses' application
+ programs (e.g., tic). The test applications will still be built if you
+ type "make", though not if you simply do "make install".
+
+
COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
--------------------------------------------
@@ -247,8 +592,23 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
you may encounter when building a system with different versions of
ncurses:
- 5.0
- Interface changes:
+ 5.1 (July 8, 2000)
+ Interface changes:
+
+ + made the extended terminal capabilities
+ (configure --enable-tcap-names) a standard feature. This should
+ be transparent to applications that do not require it.
+
+ + removed the trace() function and related trace support from the
+ production library.
+
+ + modified curses.h.in, undef'ing some symbols to avoid conflict
+ with C++ STL.
+
+ Added extensions: assume_default_colors().
+
+ 5.0 (October 23, 1999)
+ Interface changes:
+ implemented the wcolor_set() and slk_color() functions.
@@ -262,7 +622,7 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
+ modified several prototypes to correspond with 1997 version of X/Open
Curses: [w]attr_get(), [w]attr_set(), border_set() have different
- parameters. Some functions were renamed or misspelled:
+ parameters. Some functions were renamed or misspelled:
erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used
attr_get().
@@ -332,8 +692,8 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
errors. In 5.0 we added a configure option "--without-cxx-binding"
which controls whether the binding itself is built and installed.
- 4.2
- Interface changes:
+ 4.2 (March 2, 1998)
+ Interface changes:
+ correct prototype for termattrs() as per XPG4 version 2.
@@ -370,7 +730,7 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
1.9.9g (December 1, 1996)
- This fixed most of the problems with 1.9.9e, and made these interface
+ This fixed most of the problems with 1.9.9e, and made these interface
changes:
+ remove tparam(), which had been provided for compatibility with
@@ -407,7 +767,7 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
1.9.9e (March 24, 1996)
not recommended (a last-minute/untested change left the forms and
- menus libraries unusable since they do not repaint the screen).
+ menus libraries unusable since they do not repaint the screen).
Foreground/background colors are combined incorrectly, working properly
only on a black background. When this was released, the X/Open
specification was available only in draft form.
@@ -456,7 +816,7 @@ IF YOU ARE A SYSTEM INTEGRATOR:
reverse-tabulation sequence) rather than ^I. Here are the loadkeys -d
mappings that will set this up:
- keycode 15 = Tab Tab
+ keycode 15 = Tab Tab
alt keycode 15 = Meta_Tab
shift keycode 15 = F26
string F26 ="\033[Z"
@@ -559,7 +919,7 @@ BSD CONVERSION NOTES:
an application you probably want to put the remainder of this section
in the package README file.)
- The following note applies only if you have configured ncurses with
+ The following note applies only if you have configured ncurses with
--enable-termcap.
------------------------------- CUT HERE --------------------------------
@@ -632,9 +992,10 @@ USING NCURSES WITH GPM:
which is used on Linux console. Be aware that GPM is commonly
installed as a shared library which contains a wrapper for the curses
wgetch() function (libcurses.o). Some integrators have simplified
- linking applications by combining all of libcurses.so (the BSD curses)
- into the libgpm.so file, producing symbol conflicts with ncurses. You
- may be able to work around this problem by linking as follows:
+ linking applications by combining all or part of libcurses.so (the BSD
+ curses) into the libgpm.so file, producing symbol conflicts with
+ ncurses (specifically the wgetch function). You may be able to work
+ around this problem by linking as follows:
cc -o foo foo.o -lncurses -lgpm -lncurses
@@ -644,37 +1005,25 @@ USING NCURSES WITH GPM:
dickey.his.com:/ncurses/gpm-1.10-970125.tar.gz
This patch is incorporated in gpm 1.12; however some integrators
- are slow to update this library.
-
-USING NCURSES WITH ELVIS:
- To use ncurses as the screen-painting library for Elvis, apply the
- following patch to the Elvis curses
-
-*** curses.c.orig Sun Jun 26 05:48:23 1994
---- curses.c Sun Feb 11 16:50:41 1996
-***************
-*** 986,992 ****
- {
- if (has_IM)
- do_IM();
-! do_IC();
- qaddch(ch);
- if (has_EI)
- do_EI();
---- 986,995 ----
- {
- if (has_IM)
- do_IM();
-!#ifdef NCURSES_VERSION
-! else /* ncurses does insertion in a slightly nonstandard way */
-!#endif
-! do_IC();
- qaddch(ch);
- if (has_EI)
- do_EI();
-
-This patch is for elvis-1.8pl4 but it can even be used for elvis-1.8pl3 with
-an offset of -11 lines.
+ are slow to update this library. Current distributions of gpm can
+ be configured properly using the --without-curses option.
+
+BUILDING NCURSES WITH A CROSS-COMPILER
+ Ncurses can be built with a cross-compiler. Some parts must be built
+ with the host's compiler since they are used for building programs
+ (e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
+ that are compiled into the ncurses library. You should set the
+ BUILD_CC environment variable to your host's compiler, and run the
+ configure script configuring for the cross-compiler.
+
+ Note that all of the generated source-files which are part of ncurses
+ will be made if you use
+
+ make sources
+
+ This would be useful in porting to an environment which has little
+ support for the tools used to generate the sources, e.g., sed, awk and
+ Bourne-shell.
BUGS:
Send any feedback to the ncurses mailing list at
@@ -682,5 +1031,5 @@ BUGS:
bug-ncurses-request@gnu.org with body that reads:
subscribe ncurses <your-email-address-here>
- The Hacker's Guide in the misc directory includes some guidelines
+ The Hacker's Guide in the doc directory includes some guidelines
on how to report bugs in ways that will get them fixed most quickly.
diff --git a/contrib/ncurses/MANIFEST b/contrib/ncurses/MANIFEST
index b54a601f8ba9..6e2118596c59 100644
--- a/contrib/ncurses/MANIFEST
+++ b/contrib/ncurses/MANIFEST
@@ -294,6 +294,7 @@
./doc/html/man/curs_termcap.3x.html
./doc/html/man/curs_terminfo.3x.html
./doc/html/man/curs_touch.3x.html
+./doc/html/man/curs_trace.3x.html
./doc/html/man/curs_util.3x.html
./doc/html/man/curs_window.3x.html
./doc/html/man/define_key.3x.html
@@ -409,6 +410,7 @@
./form/modules
./include/Caps
./include/MKhashsize.sh
+./include/MKncurses_def.sh
./include/MKparametrized.sh
./include/MKterm.h.awk.in
./include/Makefile.in
@@ -419,6 +421,7 @@
./include/nc_alloc.h
./include/nc_panel.h
./include/ncurses_cfg.hin
+./include/ncurses_defs
./include/term_entry.h
./include/termcap.h.in
./include/tic.h
@@ -467,10 +470,11 @@
./man/curs_termcap.3x
./man/curs_terminfo.3x
./man/curs_touch.3x
+./man/curs_trace.3x
./man/curs_util.3x
./man/curs_window.3x
+./man/default_colors.3x
./man/define_key.3x
-./man/dft_fgbg.3x
./man/form.3x
./man/form_cursor.3x
./man/form_data.3x
@@ -502,7 +506,7 @@
./man/man_db.renames
./man/manlinks.sed
./man/menu.3x
-./man/menu_attribs.3x
+./man/menu_attributes.3x
./man/menu_cursor.3x
./man/menu_driver.3x
./man/menu_format.3x
@@ -587,7 +591,7 @@
./misc/ncurses.ref
./misc/panel.def
./misc/panel.ref
-./misc/run_tic.sh
+./misc/run_tic.in
./misc/shlib
./misc/tabset/std
./misc/tabset/stdcrt
@@ -726,6 +730,7 @@
./ncurses/tinfo/lib_setup.c
./ncurses/tinfo/lib_termcap.c
./ncurses/tinfo/lib_termname.c
+./ncurses/tinfo/lib_tgoto.c
./ncurses/tinfo/lib_ti.c
./ncurses/tinfo/lib_tparm.c
./ncurses/tinfo/lib_tputs.c
@@ -736,6 +741,7 @@
./ncurses/tinfo/read_entry.c
./ncurses/tinfo/read_termcap.c
./ncurses/tinfo/setbuf.c
+./ncurses/tinfo/strings.c
./ncurses/tinfo/write_entry.c
./ncurses/trace/README
./ncurses/trace/lib_trace.c
diff --git a/contrib/ncurses/Makefile.glibc b/contrib/ncurses/Makefile.glibc
index 53b35abb7299..780650a0a8bd 100644
--- a/contrib/ncurses/Makefile.glibc
+++ b/contrib/ncurses/Makefile.glibc
@@ -198,6 +198,7 @@ libncurses-routines = \
tinfo/lib_setup \
tinfo/lib_termcap \
tinfo/lib_termname \
+ tinfo/lib_tgoto \
tinfo/lib_ti \
tinfo/lib_tparm \
tinfo/lib_tputs \
@@ -207,6 +208,7 @@ libncurses-routines = \
tinfo/read_entry \
tinfo/read_termcap \
tinfo/setbuf \
+ tinfo/strings \
tinfo/write_entry \
trace/lib_trace \
trace/lib_traceatr \
diff --git a/contrib/ncurses/Makefile.in b/contrib/ncurses/Makefile.in
index 381ca9e7ed75..9489e9fe45ec 100644
--- a/contrib/ncurses/Makefile.in
+++ b/contrib/ncurses/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.18 1998/08/22 23:45:00 tom Exp $
+# $Id: Makefile.in,v 1.20 2000/08/19 19:11:56 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@@ -33,8 +33,8 @@
SHELL = /bin/sh
-INSTALL_PREFIX=@INSTALL_PREFIX@
-CF_MFLAGS = @cf_cv_makeflags@ INSTALL_PREFIX="$(INSTALL_PREFIX)"
+DESTDIR=@DESTDIR@
+CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
@SET_MAKE@
@@ -46,7 +46,7 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
-datadir = @datadir@
+ticdir = @TERMINFO@
includedir = @includedir@
libdir = @libdir@
mandir = @mandir@
@@ -69,7 +69,7 @@ preinstall :
@ echo ' lib directory: '$(libdir)
@ echo ' include directory: '$(includedir)
@ echo ' man directory: '$(mandir)
- @ echo ' terminfo directory: '$(datadir)/terminfo
+ @ echo ' terminfo directory: '$(ticdir)
@ echo ''
@ test "$(includedir)" = "$(prefix)/include" || \
echo '** Include-directory is not in a standard location'
diff --git a/contrib/ncurses/Makefile.os2 b/contrib/ncurses/Makefile.os2
index 7a6f56dade13..167ff657e0f2 100644
--- a/contrib/ncurses/Makefile.os2
+++ b/contrib/ncurses/Makefile.os2
@@ -1,7 +1,7 @@
################################################################################
# Wrapper Makefile for ncurses library under OS/2.
################################################################################
-# $Id: Makefile.os2,v 1.8 1998/12/13 02:23:13 tom Exp $
+# $Id: Makefile.os2,v 1.10 2000/10/09 23:53:57 Ilya.Zakharevich Exp $
#
# Author: Juan Jose Garcia Ripoll <worm@arrakis.es>.
# Webpage: http://www.arrakis.es/~worm/
@@ -13,8 +13,7 @@
#
# touch Makefile
# make -f Makefile.os2 config
-# make -f Makefile.os2 CC=gcc HOSTCC=gcc
-# make -f Makefile.os2 CC=gcc HOSTCC=gcc
+# make -f Makefile.os2 CC=gcc HOSTCC=gcc CXX=gcc
#
# Ignoring the following errors:
# Invalid configuration `os2'...
@@ -138,7 +137,7 @@ make.dlls : $(DEFS) $(LIBS) $(DLLS) $(LIBS_AOUT)
$(DEFS) : make.defs
-LIBDIR = $(INSTALL_PREFIX)$(libdir)
+LIBDIR = $(DESTDIR)$(libdir)
$(LIBDIR) :
mkdir -p $@
@@ -188,8 +187,8 @@ realclean ::
# This is a simplified version of misc/Makefile
#
-TICDIR = $(INSTALL_PREFIX)$(datadir)/terminfo
-TABSETDIR = $(INSTALL_PREFIX)$(datadir)/tabset
+TICDIR = $(DESTDIR)$(datadir)/terminfo
+TABSETDIR = $(DESTDIR)$(datadir)/tabset
$(TICDIR) :
mkdir -p $@
diff --git a/contrib/ncurses/NEWS b/contrib/ncurses/NEWS
index 76b655263297..7b7022ca097a 100644
--- a/contrib/ncurses/NEWS
+++ b/contrib/ncurses/NEWS
@@ -1,4 +1,4 @@
--- $Id: NEWS,v 1.568 2000/07/02 01:16:51 tom Exp $
+-- $Id: NEWS,v 1.599 2000/10/10 01:02:11 tom Exp $
This is a log of changes that ncurses has gone through since Zeyd started
working with Pavel Curtis' original work, pcurses, in 1992.
@@ -6,6 +6,324 @@ working with Pavel Curtis' original work, pcurses, in 1992.
Changes through 1.9.9e are recorded by Zeyd M. Ben-Halim.
Changes since 1.9.9e are recorded by Thomas Dickey.
+20001009
+ + correct order of options/parameters in run_tic.in invocation of tic,
+ which did not work with standard getopt() (reported by Ethan
+ Butterfield <primus@veris.org>).
+ + correct logic for 'reverse' variable in lib_vidattr.c, which was
+ setting it true without checking if newmode had A_REVERSE set, e.g.,
+ using $TERM=ansi on OS/2 EMX (see 20000917).
+ > patch by Todd Miller:
+ + add a few missing use_terminfo_vars() and fixes up _nc_tgetent().
+ Previously, _nc_cgetset() would still get called on cp so the
+ simplest thing is to set cp to NULL if !use_terminfo_vars().
+ + added checks for an empty $HOME environment variable.
+ > patches by Ilya Zakharevich for OS/2 EMX:
+ + modify convert_configure.pl to support INSTALL. Change compiler
+ options in that script to use multithreading, needed for the mouse.
+ + modify OS/2 mouse support, retrying as a 2-button mouse if code fails
+ to set up a 3-button mouse.
+ + improve code for OS/2 mouse support, using _nc_timed_wait() to
+ replace select() call.
+
+20001007
+ + change type of ospeed variable back to short to match its use in
+ legacy applications (reported by Andrey A Chernov).
+ + add case to configure script for --enable-rpath on IRIX (patch by
+ Albert Chin-A-Young).
+ + minor fix to position_check() function, to ensure it gets the whole
+ cursor report before decoding.
+ + add configure option --disable-assumed-color, to allow pre-5.1
+ convention of default colors used for color-pair 0 to be configured
+ (see assume_default_colors()).
+ + rename configure option --enable-hashmap --disable-hashmap, and
+ reorder the configure options, splitting the experimental and
+ development
+ + add configure option --disable-root-environ, which tells ncurses to
+ disregard $TERMINFO and similar environment variables if the current
+ user is root, or running setuid/setgid (based on discussion with
+ several people).
+ + modified misc/run_tic.in to use tic -o, to eliminate dependency on
+ $TERMINFO variable for installs.
+ + add table entry for plab_norm to tput, so it passes in strings
+ for that capability.
+ + modify parse_format() in lib_tparm.c to ignore precision if it is
+ longer than 10000 (report by Jouko Pynnonen).
+ + rewrote limit checks in lib_mvcur.c using new functions
+ _nc_safe_strcat(), etc. Made other related changes to check lengths
+ used for strcat/strcpy (report by Jouko Pynnonen <jouko@solutions.fi>).
+
+20000930
+ + modify several descriptions, including those for setaf, setab, in
+ include/Caps to indicate that the entries are parameterized. This
+ information is used to tell which strings are translated when
+ converting to termcap. Fixes a problem where the generated termcap
+ would contain a spurious "%p1" for the terminfo "%p1%d".
+ + modify ld -rpath options (e.g., Linux, and Solaris) to use an
+ absolute pathname for the build tree's lib directory (prompted by
+ discussion with Albert Chin-A-Young).
+ + modify "make install.man" and "make uninstall.man" to include tack's
+ man-page.
+ + various fixes for install scripts used to support configure --srcdir
+ and --with-install-prefix (reported by Matthew Clarke
+ <Matthew_Clarke@mindlink.bc.ca>).
+ + make configure script checks on variables $GCC and $GXX consistently
+ compare against 'yes' rather than test if they are nonnull, since
+ either may be set to the corresponding name of the C or C++ compiler
+ (report/patch by Albert Chin-A-Young).
+
+20000923
+ + modify rs2 capability in xterm-r6 and similar where cursor
+ save/restore bracketed the sequence for resetting video attributes.
+ The cursor restore would undo that (from a NetBSD bug report by John
+ Hawkinson <jhawk@MIT.EDU>).
+ + using parameter check added to tic, corrected 27 typos in
+ terminfo.src -TD
+ + modify tic to verify that its inputs are really files, in case
+ someone tries to read a directory (or /dev/zero).
+ + add a check for empty buffers returned by fgets() in comp_scan.c
+ next_char() function, in case tic is run on a non-text file (fixes
+ a core dump reported by Aaron Campbell <aaron@cs.dal.ca>).
+ + add to railroad.c some code exercising tgoto(), providing an
+ alternate form of display if the terminal supports cursor addressing.
+ + split-out tgoto() again, this time into new file lib_tgoto.c, and
+ implement a conventional BSD-style tgoto() which is used if the
+ capability string does not contain terminfo-style padding or
+ parameters (requested by Andrey A Chernov).
+ + add check to tic which reports capabilities that do not reference
+ the expected number of parameters.
+ + add error checking to infocmp's -v and -m options to ensure that
+ the option value is indeed a number.
+
+20000917
+ + add S0, E0 extensions to screen's terminfo entry, which is another
+ way to solve the misconfiguration issue -TD
+ + completed special case for tgoto from 20000916
+
+20000916
+ + update xterm terminfo entries to match XFree86 xterm patch #146 -TD
+ + add Matrix Orbital terminfo entries (from Eric Z Ayers
+ <eric@ale.org>).
+ + add special case to lib_tparm.c to allow 'screen' program to use a
+ termcap-style parameter "%." to tgoto() for switching character sets.
+ + use LN_S substitution in run_tic.in, to work on OS/2 EMX which has
+ no symbolic links.
+ + updated notes in README.emx regarding autoconf patches.
+ + replace a lookup table in lib_vidattr.c used to decode no_color_video
+ with a logic expression (suggested by Philippe Blain).
+ + add a/A toggle to ncurses.c 'b' test, which clears/sets alternate
+ character set attribute from the displayed text.
+ + correct inequality in parameter analysis of rewritten lib_tparm.c
+ which had the effect of ignoring p9 in set_attributes (sgr), breaking
+ alternate character set (reported by Piotr Majka <charvel@link.pl>).
+ + correct ifdef'ing for GCC_PRINTF, GCC_SCANF which would not compile
+ with Sun WorkShop compilers since these tokens were empty (cf:
+ 20000902, reported by Albert Chin-A-Young).
+
+20000909
+ + correct an uninitialized parameter to open_tempfile() in tic.c which
+ made "tic -I" give an ambiguous error message about tmpnam.
+ + add special case in lib_vidattr.c to reset underline and standout for
+ devices that have no sgr0 defined (patch by Don Lewis
+ <Don.Lewis@tsc.tdk.com>). Note that this will not work for bold
+ mode, since there is no exit-bold-mode capability.
+ + improved patch for Make_Enum_Type (patch by Juergen Pfeifer).
+ + modify tparm to disallow arithmetic on strings, analyze the varargs
+ list to read strings as strings and numbers as numbers.
+ + modify tparm's internal function spop() to treat a null pointer as
+ an empty string.
+ + modify tput program so it can be renamed or invoked via a link as
+ 'reset' or 'init', producing the same effect as 'tput reset' or 'tput
+ init'.
+ + add private entrypoint _nc_basename(), use to consolidate related
+ code in progs, as well as accommodating OS/2 EMX pathnames.
+ + remove NCURSES_CONST line from edit_cfg.sh to compensate for its
+ removal (except via AC_SUBST) from configure.in, making --enable-const
+ work again (reported by Juergen Pfeifer).
+ + regen'd configure to pick up "hpux*" change from 20000902.
+
+20000902
+ + modify tset.c to check for transformed "reset" program name, if any.
+ + add a check for null pointer in Make_Enum_Type() (reported by Steven
+ W Orr <steveo@world.std.com>).
+ + change functions _nc_parse_entry() and postprocess_termcap() to avoid
+ using strtok(), because it is non-reentrant (reported by Andrey A
+ Chernov <ache@nagual.pp.ru>).
+ + remove "hpux10.*" case from CF_SHARED_OPTS configure script macro.
+ This differed from the "hpux*" case by using reversed symbolic
+ links, which made the 5.1 version not match the configuration of
+ 5.0 shared libraries (reported by Albert Chin-A-Young).
+ + correct a dependency in Ada95/src/Makefile.in which prevented
+ building with configure --srcdir (patch by H Nanosecond
+ <aldomel@ix.netcom.com>).
+ + modify ifdef's in curses.h.in to avoid warning if GCC_PRINTF or
+ GCC_SCANF was not previously defined (reported by Pavel Roskin
+ <proski@gnu.org>).
+ + add MKncurses_def.sh to generate fallback definitions for
+ ncurses_cfg.h, to quiet gcc -Wundef warnings, modified ifdef's in
+ code to consistently use "#if" rather than "#ifdef".
+
+20000826
+ + add QNX qansi entries to terminfo -TD
+ + add os2 entry to misc/emx.src (<jmcoopr@webmail.bmi.net>).
+ + add configure option --with-database to allow specifying a different
+ terminfo source-file to install. On OS/2 EMX, this defaults to
+ misc/emx.src
+ + change misc/run_tic.sh to derive it from misc/run_tic.in, to simplify
+ setting .exe extension on OS/2 EMX.
+ + add .exe extension in Ada95/gen/Makefile.in,
+ Ada95/samples/Makefile.in, for OS/2 EMX (reported by
+ <jmcoopr@webmail.bmi.net>).
+ + add configure check for filesystems (such as OS/2 EMX) which do not
+ distinguish between upper/lowercase filenames, use this to fix tags
+ rules in makefiles.
+ + initialize fds[] array to 0's in _nc_timed_wait(); apparently poll()
+ only sets the revents members of that array when there is activity
+ corresponding to the related file (report by Glenn Cooper
+ <gcooper@qantas.com.au>, using Purify on Solaris 5.6).
+ + change configure script to use AC_CANONICAL_SYSTEM rather than
+ AC_CANONICAL_HOST, which means that configure --target will set
+ a default program-prefix.
+ + add note on cross-compiling to INSTALL (which does not rely on the
+ AC_CANONICAL_* macros).
+
+20000819
+ + add cases for EMX OS/2 to config.guess, config.sub
+ + new version of config.guess, config.sub from lynx 2.8.4dev.7
+ + add definitions via transform.h to allow tic and tput to check for
+ the transformed aliases rather than the original infotocap, etc.
+ + simplify transform-expressions in progs/Makefile.in, make the
+ uninstall rule work for transformed program names.
+ + change symbol used by --install-prefix configure option from
+ INSTALL_PREFIX to DESTDIR (the latter has become common usage
+ although the name is misleading).
+ + modify programs to use curses_version() string to report the version
+ of ncurses with which they are compiled rather than the
+ NCURSES_VERSION string. The function returns the patch level in
+ addition to the major and minor version numbers.
+
+20000812
+ + modify CF_MAN_PAGES configure macro to make transformed program names
+ a parameter to that macro rather than embedding them in the macro.
+ + newer config.guess, config.sub (reference version used in lynx
+ 2.8.4dev.7).
+ + add configure option --with-default-terminfo-dir=DIR to allow
+ specifying the default terminfo database directory (request by Albert
+ Chin-A-Young).
+ + minor updates for terminfo.src from FreeBSD termcap change-history.
+ + correct notes in README and INSTALL regarding documentation files
+ that were moved from misc directory to doc (report by Rich Kulawiec
+ <rsk@gsp.org>).
+ + change most remaining unquoted parameters of 'test' in configure
+ script to use quotes, for instance fixing a problem in the
+ --disable-database option (reported by Christian Mondrup
+ <scancm@biobase.dk>).
+ + minor adjustments to work around some of the incompatibilities/bugs
+ in autoconf 2.29a alpha.
+ + add -I/usr/local/include when --with-ncurses option is used in
+ test/configure script.
+ + correct logic in adjust_cancels(), which did not check both
+ alternatives when reclassifying an extended name between boolean,
+ number and string, causing an infinite loop in tic.
+
+20000730
+ + correct a missing backslash in curses.priv.h
+
+20000729
+ + change handling of non_dest_scroll_region in tty_update.c to clear
+ text after it is shifted in rather than before shifting out. Also
+ correct row computation (reported by Ruediger Kuhlmann
+ <uck4@rz.uni-karlsruhe.de>).
+ + add/use new trace function to display chtype values from winch() and
+ getbkgd().
+ + add trace mask TRACE_ATTRS, alter several existing _tracef calls that
+ trace attribute changes under TRACE_CALLS to use this.
+ + modify MKlib_gen.sh so that functions returning chtype will call
+ returnChar().
+ + add returnChar() trace, for functions returning chtype.
+ + change indent.pro to line up parenthesis.
+
+20000722
+ + fix a heap problem with the c++ binding (report by
+ <alexander_liberson@ninewest.com>, patch by Juergen Pfeifer).
+ + minor adjustment to ClrToEOL() to handle an out-of-bounds parameter.
+ + modify the check for big-core to force a couple of memory accesses,
+ which may work as needed for older/less-capable machines (if not,
+ there's still the explicit configure option).
+ > fixes based on diff's for Amiga and BeOS found at
+ http://www.mathematik.uni-karlsruhe.de/~kuhlmann/cross/ncurses/
+ + alter definition of NCURSES_CONST to make it non-empty.
+ + add amiga-vnc terminfo entry.
+ + redefine 'TEXT' in menu.h for AMIGA, since it is reported to have
+ an (unspecified) symbol conflict.
+ + replaced case-statement in _nc_tracebits() for CSIZE with a table to
+ simplify working around implementations that define random
+ combinations of the related macros to zero.
+ + modify configure test for tcgetattr() to allow for old
+ implementations, e.g., on BeOS, which only defined it as a macro.
+ > patches by Bruno Haible:
+ + when checking LC_ALL/LC_CTYPE/LANG environment variables for UTF-8
+ locale, ignore those which are set to an empty value, as per SUSV2.
+ + encode 0xFFFD in UTF-8 with 3 bytes, not 2.
+ + modify _nc_utf8_outch() to avoid sign-extension when checking for
+ out-of-range value.
+
+20000715
+ + correct manlinks.sed script to avoid using ERE "\+", which is not
+ understood by older versions of sed (patch by Albert Chin-A-Young).
+ + implement configure script options that transform installed program
+ names, e.g., --program-prefix, including the manpage names and cross
+ references (patch by Albert Chin-A-Young <china@thewrittenword.com>).
+ + correct several mismatches between manpage filename and ".TH"
+ directives, renaming dft_fgbg.3x to default_colors.3x and
+ menu_attribs.3x to menu_attributes.3x (report by Todd C Miller).
+ + correct missing includes for <string.h> in several places, including
+ the C++ binding. This is not noted by gcc unless we use the
+ -fno-builtin option (reported by Igor Schein <igor@txc.com>).
+ + modified progs/tset.c and tack/sysdep.c to build with sgttyb
+ interface if neither termio or termios is available. Tested this
+ with FreeBSD 2.1.5 (which does have termios - but the sgttyb does
+ work).
+
+20000708 5.1 release for upload to ftp.gnu.org
+ + document configure options in INSTALL.
+ + add man-page for ncurses trace functions.
+ + correct return value shown in curs_touch.3x for is_linetouched() and
+ is_wintouched(), in curs_initscr.3x for isendwin(), and in
+ curs_termattr.3x for has_ic() and has_il().
+ + add prototypes for touchline() and touchwin(), adding them to the
+ list of generated functions.
+ + modify fifo_push() to put ERR into the fifo just like other values to
+ return from wgetch(). It was returning without doing that, making
+ end-of-file condition incorrectly return a 0 (reported by Todd C
+ Miller).
+ + uncomment CC_SHARED_OPTS for progs and tack (see 971115), since they
+ are needed for SCO OpenServer.
+ + move _nc_disable_period from free_ttype.c to comp_scan.c to appease
+ dynamic loaders on SCO and IRIX64.
+ + add "-a" option to test/ncurses.c to invoke assume_default_colors()
+ for testing.
+ + correct assignment in assume_default_colors() which tells ncurses
+ whether to use default colors, or the assumed ones (reported by Gary
+ Funck <gary@Intrepid.Com>).
+ + review/correct logic in mk-1st.awk for making symbolic links for
+ shared libraries, in particular for FreeBSD, etc.
+ + regenerate misc/*.def files for OS/2 EMX dll's.
+ + correct quoting of values for CC_SHARED_OPTS in aclocal.m4 for
+ cases openbsd2*, openbsd*, freebsd* and netbsd* (patch by Peter
+ Wemm) (err in 20000610).
+ + minor updates to release notes, as well as adding/updating URLs for
+ examples cited in announce.html
+ > several fixes from Philippe Blain <philippe.blain2@freesbee.fr>:
+ + correct placement of ifdef for NCURSES_XNAMES in function
+ _nc_free_termtype(), fixes a memory leak.
+ + add a call to _nc_synchook() to the end of function whline() like
+ that in wvline() (difference was in 1.9.4).
+ + make ClearScreen() a little faster by moving two instances of
+ UpdateAttr() out of for-loops.
+ + simplify ClrBottom() by eliminating the tstLine data, using for-loops
+ (cf: 960428).
+
20000701 pre-release
+ change minor version to 1, i.e., ncurses 5.1
+ add experimental configure option --enable-colorfgbg to check for
diff --git a/contrib/ncurses/README b/contrib/ncurses/README
index 8b8c78ac29a3..c46fc195ac5b 100644
--- a/contrib/ncurses/README
+++ b/contrib/ncurses/README
@@ -1,4 +1,4 @@
--- $Id: README,v 1.19 1999/10/23 20:39:24 tom Exp $
+-- $Id: README,v 1.20 2000/08/12 23:31:21 tom Exp $
-------------------------------------------------------------------------------
README file for the ncurses package
@@ -10,7 +10,7 @@ See the file TO-DO for things that still need doing, including known bugs.
Browse the file misc/ncurses-intro.html for narrative descriptions of how
to use ncurses and the panel, menu, and form libraries.
-Browse the file misc/hackguide.html for a tour of the package internals.
+Browse the file doc/html/hackguide.html for a tour of the package internals.
ROADMAP AND PACKAGE OVERVIEW:
@@ -96,10 +96,10 @@ descriptions; the next two (clear and tput) are for use in shell scripts. The
last (tset) is provided for 4.4BSD compatibility. The source code for all of
these lives in the `progs' directory.
-Detailed documentation for all libraries and utilities can be found in
-the `man' directory. An HTML introduction to ncurses, panels, and
-menus programming lives in the `misc' directory. Manpages in HTML format
-are under `Ada95/html'.
+Detailed documentation for all libraries and utilities can be found in the
+`man' and `doc' directories. An HTML introduction to ncurses, panels, and
+menus programming lives in the `doc/html' directory. Manpages in HTML format
+are under `doc/html/man'.
The `test' directory contains programs that can be used to verify or
demonstrate the functions of the ncurses libraries. See test/README for
@@ -171,5 +171,5 @@ suggesting improvements, and generally whining about ncurses :-)
BUGS:
See the INSTALL file for bug and developer-list addresses.
- The Hacker's Guide in the misc directory includes some guidelines
+ The Hacker's Guide in the doc directory includes some guidelines
on how to report bugs in ways that will get them fixed most quickly.
diff --git a/contrib/ncurses/README.emx b/contrib/ncurses/README.emx
index 15882d3b62da..3f3d526a94e4 100644
--- a/contrib/ncurses/README.emx
+++ b/contrib/ncurses/README.emx
@@ -1,5 +1,5 @@
--- $Id: README.emx,v 1.2 2000/05/06 17:41:56 tom Exp $
--- Author: Thomas Dickey <dickey@clark.net>
+-- $Id: README.emx,v 1.4 2000/09/16 19:28:28 tom Exp $
+-- Author: Thomas Dickey
-------------------------------------------------------------------------------
You can build ncurses on OS/2 in the EMX environment. But you must build and
@@ -11,7 +11,7 @@ You can generate a new one if you have autoconf built for EMX. You will need
the EMX development tools, of course. Get these programs to start:
GNU m4 program (version 1.4)
- GNU autoconf (version 2.12).
+ GNU autoconf (version 2.13).
GNU patch (version 2.5)
Apply the autoconf patches from
@@ -21,11 +21,8 @@ Apply the autoconf patches from
These are ordered by date:
- autoconf-2.12-970309.patch.gz
- autoconf-2.12-970429.patch.gz
- autoconf-2.12-971222-emx.patch.gz
- autoconf-2.12-971222.patch.gz
- autoconf-2.12-971230.patch.gz
+ autoconf-2.13-20000819.patch.gz
+ autoconf-2.13-20000819-emx.patch.gz
I built my development environment for ncurses using EMX 0.9c at the end of
1997. Much of the EMX patch for autoconf was done originally by J.J.G.Ripoll,
diff --git a/contrib/ncurses/aclocal.m4 b/contrib/ncurses/aclocal.m4
index 29ea1c9418e4..d03851395e89 100644
--- a/contrib/ncurses/aclocal.m4
+++ b/contrib/ncurses/aclocal.m4
@@ -26,11 +26,13 @@ dnl sale, use or other dealings in this Software without prior written *
dnl authorization. *
dnl***************************************************************************
dnl
-dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,1998
+dnl Author: Thomas E. Dickey 1996,1997,1998,1999,2000
dnl
-dnl $Id: aclocal.m4,v 1.206 2000/07/01 20:37:36 tom Exp $
+dnl $Id: aclocal.m4,v 1.235 2000/10/08 01:01:40 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
+dnl See http://dickey.his.com/autoconf/ for additional information.
+dnl
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl Construct the list of include-options for the C programs in the Ada95
@@ -41,7 +43,7 @@ ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
if test "$srcdir" != "."; then
ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
fi
-if test -z "$GCC"; then
+if test "$GCC" != yes; then
ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
elif test "$includedir" != "/usr/include"; then
if test "$includedir" = '${prefix}/include' ; then
@@ -129,7 +131,7 @@ dnl Treat the configuration-variable specially here, since we're directly
dnl substituting its value (i.e., 1/0).
AC_DEFUN([CF_BOOL_DECL],
[
-AC_MSG_CHECKING([for builtin ifelse(AC_LANG,[C],$CC,$CXX) bool type])
+AC_MSG_CHECKING([for builtin bool type])
AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[
AC_TRY_COMPILE([
#include <stdio.h>
@@ -138,7 +140,7 @@ AC_CACHE_VAL(ifelse($1,,cf_cv_builtin_bool,[$1]),[
[ifelse($1,,cf_cv_builtin_bool,[$1])=1],
[ifelse($1,,cf_cv_builtin_bool,[$1])=0])
])
-if test $ifelse($1,,cf_cv_builtin_bool,[$1]) = 1
+if test "$ifelse($1,,cf_cv_builtin_bool,[$1])" = 1
then AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi
@@ -148,13 +150,13 @@ dnl Test for the size of 'bool' in the configured C++ compiler (e.g., a type).
dnl Don't bother looking for bool.h, since it's been deprecated.
AC_DEFUN([CF_BOOL_SIZE],
[
-AC_MSG_CHECKING([for size of ifelse(AC_LANG,[C],$CC,$CXX) bool])
+AC_MSG_CHECKING([for size of bool])
AC_CACHE_VAL(cf_cv_type_of_bool,[
rm -f cf_test.out
AC_TRY_RUN([
#include <stdlib.h>
#include <stdio.h>
-#if HAVE_GXX_BUILTIN_H
+#ifdef HAVE_GXX_BUILTIN_H
#include <g++/builtin.h>
#elif HAVE_GPP_BUILTIN_H
#include <gpp/builtin.h>
@@ -259,18 +261,20 @@ AC_TRY_LINK([
[cf_cv_cgetent=no])
])
AC_MSG_RESULT($cf_cv_cgetent)
-test $cf_cv_cgetent = yes && AC_DEFINE(HAVE_BSD_CGETENT)
+test "$cf_cv_cgetent" = yes && AC_DEFINE(HAVE_BSD_CGETENT)
])dnl
dnl ---------------------------------------------------------------------------
dnl Check if we're accidentally using a cache from a different machine.
dnl Derive the system name, as a check for reusing the autoconf cache.
dnl
dnl If we've packaged config.guess and config.sub, run that (since it does a
-dnl better job than uname).
+dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
+dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
+dnl which is useful in cross-compiles.
AC_DEFUN([CF_CHECK_CACHE],
[
if test -f $srcdir/config.guess ; then
- AC_CANONICAL_HOST
+ ifelse([$1],,[AC_CANONICAL_HOST],[$1])
system_name="$host_os"
else
system_name="`(uname -s -r) 2>/dev/null`"
@@ -359,7 +363,7 @@ dnl is a late feature for the standard and is not in some recent compilers
dnl (1999/9/11).
AC_DEFUN([CF_CPP_PARAM_INIT],
[
-if test -n "$CXX" ; then
+if test "$CXX" = yes ; then
AC_CACHE_CHECK(if $CXX accepts parameter initialization,cf_cv_cpp_param_init,[
AC_LANG_CPLUSPLUS
AC_TRY_RUN([
@@ -456,7 +460,7 @@ int main() {
[cf_cv_good_bcopy=unknown])
])
],[cf_cv_good_bcopy=no])
- if test $cf_cv_good_bcopy = yes ; then
+ if test "$cf_cv_good_bcopy" = yes ; then
AC_DEFINE(USE_OK_BCOPY)
else
AC_DEFINE(USE_MY_MEMMOVE)
@@ -490,12 +494,39 @@ int main() {
test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL)
])dnl
dnl ---------------------------------------------------------------------------
+dnl Some old/broken variations define tcgetattr() only as a macro in
+dnl termio(s).h
+AC_DEFUN([CF_FUNC_TERMIOS],[
+AC_REQUIRE([CF_STRUCT_TERMIOS])
+AC_CACHE_CHECK(for tcgetattr, cf_cv_have_tcgetattr,[
+AC_TRY_LINK([
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#define TTY struct termios
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#define TTY struct termio
+#endif
+#endif
+],[
+TTY foo;
+tcgetattr(1, &foo);],
+[cf_cv_have_tcgetattr=yes],
+[cf_cv_have_tcgetattr=no])])
+test "$cf_cv_have_tcgetattr" = yes && AC_DEFINE(HAVE_TCGETATTR)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
dnl to documentation, unrecognized directives cause older compilers to barf.
AC_DEFUN([CF_GCC_ATTRIBUTES],
[
-if test -n "$GCC"
+if test "$GCC" = yes
then
cat > conftest.i <<EOF
#ifndef GCC_PRINTF
@@ -511,7 +542,7 @@ cat > conftest.i <<EOF
#define GCC_UNUSED /* nothing */
#endif
EOF
-if test -n "$GCC"
+if test "$GCC" = yes
then
AC_CHECKING([for $CC __attribute__ directives])
changequote(,)dnl
@@ -578,7 +609,7 @@ dnl -pedantic
dnl
AC_DEFUN([CF_GCC_WARNINGS],
[
-if test -n "$GCC"
+if test "$GCC" = yes
then
changequote(,)dnl
cat > conftest.$ac_ext <<EOF
@@ -679,7 +710,7 @@ os2*) #(vi
cf_gpp_libname=g++
;;
esac
-if test $ac_cv_prog_gxx = yes; then
+if test "$ac_cv_prog_gxx" = yes; then
AC_MSG_CHECKING([for lib$cf_gpp_libname])
cf_save="$LIBS"
LIBS="$LIBS -l$cf_gpp_libname"
@@ -722,7 +753,7 @@ CPPFLAGS="$CPPFLAGS -I. -I../include"
if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
fi
-if test -z "$GCC"; then
+if test "$GCC" != yes; then
CPPFLAGS="$CPPFLAGS -I\$(includedir)"
elif test "$includedir" != "/usr/include"; then
if test "$includedir" = '${prefix}/include' ; then
@@ -746,7 +777,7 @@ AC_CACHE_VAL(cf_cv_have_isascii,[
[cf_cv_have_isascii=no])
])dnl
AC_MSG_RESULT($cf_cv_have_isascii)
-test $cf_cv_have_isascii = yes && AC_DEFINE(HAVE_ISASCII)
+test "$cf_cv_have_isascii" = yes && AC_DEFINE(HAVE_ISASCII)
])dnl
dnl ---------------------------------------------------------------------------
dnl Compute the library-prefix for the given host system
@@ -784,11 +815,19 @@ do
for cf_item in $CF_LIST_MODELS
do
CF_LIB_SUFFIX($cf_item,cf_suffix)
+ if test $cf_item = shared ; then
+ if test "$cf_cv_do_symlinks" = yes ; then
+ case "$cf_cv_shlib_version" in #(vi
+ rel) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; #(vi
+ abi) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
+ esac
+ fi
+ fi
cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
done
if test $cf_dir = ncurses ; then
- case "$LIB_SUBSETS" in
+ case "$LIB_SUBSETS" in #(vi
termlib+*) #(vi
;;
*) #(vi
@@ -838,6 +877,7 @@ do
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
+ ShlibVer=$cf_cv_shlib_version \
DoLinks=$cf_cv_do_symlinks \
rmSoLocs=$cf_cv_rm_so_locs \
ldconfig="$LDCONFIG" \
@@ -924,6 +964,18 @@ distclean ::
rm -rf \$(DIRS_TO_MAKE)
CF_EOF
+# Special case: tack's manpage lives in its own directory.
+if test -d tack ; then
+if test -f $srcdir/$tack.h; then
+cat >> Makefile <<CF_EOF
+
+install.man \
+uninstall.man ::
+ cd tack && \$(MAKE) \$(CF_MFLAGS) \[$]@
+CF_EOF
+fi
+fi
+
dnl If we're installing into a subdirectory of /usr/include, etc., we should
dnl prepend the subdirectory's name to the "#include" paths. It won't hurt
dnl anything, and will make it more standardized. It's awkward to decide this
@@ -961,7 +1013,7 @@ case \$DST in
done
rm -f \$TMPSRC
sed -f \$TMPSED \$SRC > \$TMPSRC
- eval \$PRG \$TMPSRC \$DST/\$SRC
+ eval \$PRG \$TMPSRC \$DST/\`basename \$SRC\`
rm -f \$TMPSRC \$TMPSED
;;
*)
@@ -976,12 +1028,12 @@ for cf_dir in $SRC_SUBDIRS
do
if test -f $srcdir/$cf_dir/headers; then
cat >>$cf_dir/Makefile <<CF_EOF
-\$(INSTALL_PREFIX)\$(includedir) :
+\$(DESTDIR)\$(includedir) :
\$(srcdir)/../mkinstalldirs \[$]@
install \\
install.libs \\
-install.includes :: \$(INSTALL_PREFIX)\$(includedir) \\
+install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
CF_EOF
j=""
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
@@ -992,8 +1044,8 @@ CF_EOF
echo " $j" >>$cf_dir/Makefile
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
- echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(INSTALL_PREFIX)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
- test $i = curses.h && echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
+ test $i = curses.h && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
done
cat >>$cf_dir/Makefile <<CF_EOF
@@ -1005,8 +1057,8 @@ CF_EOF
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
i=`basename $i`
- echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
- test $i = curses.h && echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
+ echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
+ test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
done
fi
done
@@ -1026,15 +1078,6 @@ AC_DEFUN([CF_LIB_SUFFIX],
profile) $2='_p.a' ;;
shared)
case $cf_cv_system_name in
- openbsd*|freebsd*)
- $2='.so.$(REL_VERSION)' ;;
- netbsd*)
- if test -f /usr/libexec/ld.elf_so; then
- $2='.so'
- else
- $2='.so.$(REL_VERSION)'
- fi
- ;;
hpux*) $2='.sl' ;;
*) $2='.so' ;;
esac
@@ -1114,7 +1157,7 @@ EOF
LIBS="$cf_saveLIBS"
])
AC_MSG_RESULT($cf_cv_link_dataonly)
-test $cf_cv_link_dataonly = no && AC_DEFINE(BROKEN_LINKER)
+test "$cf_cv_link_dataonly" = no && AC_DEFINE(BROKEN_LINKER)
])dnl
dnl ---------------------------------------------------------------------------
dnl Most Unix systems have both link and symlink, a few don't have symlink.
@@ -1161,14 +1204,14 @@ int main()
}
],[
cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
- eval 'ac_cv_func_'$cf_func'=yes'
- CF_UPPER(cf_FUNC,$cf_func)
- AC_DEFINE_UNQUOTED(HAVE_$cf_FUNC)],[
+ eval 'ac_cv_func_'$cf_func'=yes'],[
eval 'ac_cv_func_'$cf_func'=no'],[
eval 'ac_cv_func_'$cf_func'=error'])
done
test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
])
+ test "$ac_cv_func_link" = yes && AC_DEFINE(HAVE_LINK)
+ test "$ac_cv_func_symlink" = yes && AC_DEFINE(HAVE_SYMLINK)
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -1208,6 +1251,33 @@ AC_MSG_RESULT($cf_cv_makeflags)
AC_SUBST(cf_cv_makeflags)
])dnl
dnl ---------------------------------------------------------------------------
+dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
+dnl a monocase filesystem.
+AC_DEFUN([CF_MAKE_TAGS],[
+AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
+AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no)
+
+if test "$cf_cv_mixedcase" = yes ; then
+ AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+AC_SUBST(MAKE_UPPER_TAGS)
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+AC_SUBST(MAKE_LOWER_TAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl Option to allow user to override automatic configuration of manpage format.
dnl There are several special cases.
AC_DEFUN([CF_MANPAGE_FORMAT],
@@ -1351,9 +1421,11 @@ changequote({{,}})dnl
# this script is generated by the configure-script
prefix="$cf_prefix"
datadir="$datadir"
+TERMINFO="$TERMINFO"
MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
INSTALL="$INSTALL"
INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
TMP=\${TMPDIR-/tmp}/man\$\$
trap "rm -f \$TMP" 0 1 2 5 15
@@ -1379,16 +1451,52 @@ case \$i in #(vi
fi
aliases=
source=\`basename \$i\`
+ inalias=\$source
+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+ if test ! -f \$inalias ; then
+ echo .. skipped \$source
+ continue
+ fi
CF_EOF
if test "$cf_manpage_symlinks" = yes ; then
cat >>man/edit_man.sh <<CF_EOF
- aliases=\`sed -f \$srcdir/manlinks.sed \$source | sort -u\`
+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
CF_EOF
fi
if test "$cf_manpage_renames" = no ; then
cat >>man/edit_man.sh <<CF_EOF
- target=$cf_subdir\${section}/\$source
- sed -e "s,@DATADIR@,\$datadir," < \$i >\$TMP
+ # perform program transformations for section 1 man pages
+ if test \$section = 1 ; then
+ target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+ else
+ target=$cf_subdir\${section}/\$source
+ fi
+
+ # replace variables in man page
+CF_EOF
+ ifelse($1,,,{{
+ for cf_name in $1
+ do
+cat >>man/edit_man.sh <<CF_EOF
+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+ done
+ }})
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "s,@DATADIR@,\$datadir," \\
+ -e "s,@TERMINFO@,\$TERMINFO," \\
+CF_EOF
+ ifelse($1,,,{{
+ for cf_name in $1
+ do
+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>man/edit_man.sh <<CF_EOF
+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+ done
+ }})
+cat >>man/edit_man.sh <<CF_EOF
+ < \$i >\$TMP
CF_EOF
else
cat >>man/edit_man.sh <<CF_EOF
@@ -1447,6 +1555,10 @@ cat >>man/edit_man.sh <<CF_EOF
target=\`basename \$target\`
for cf_alias in \$aliases
do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
if test -f \$cf_alias\${suffix} ; then
if ( cmp -s \$target \$cf_alias\${suffix} )
then
@@ -1470,6 +1582,10 @@ cat >>man/edit_man.sh <<CF_EOF
cd $cf_subdir\${section} && (
for cf_alias in \$aliases
do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
echo .. \$verb alias \$cf_alias\${suffix}
rm -f \$cf_alias\${suffix}
done
@@ -1508,6 +1624,23 @@ ifelse($1,,[
fi
])
dnl ---------------------------------------------------------------------------
+dnl Check if the file-system supports mixed-case filenames. If we're able to
+dnl create a lowercase name and see it as uppercase, it doesn't support that.
+AC_DEFUN([CF_MIXEDCASE_FILENAMES],
+[
+AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+])
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl Compute the object-directory name from the given model name
AC_DEFUN([CF_OBJ_SUBDIR],
[
@@ -1665,7 +1798,7 @@ AC_DEFUN([CF_SHARED_OPTS],
# Some less-capable ports of gcc support only -fpic
CC_SHARED_OPTS=
- if test -n "$GCC"
+ if test "$GCC" = yes
then
AC_MSG_CHECKING(which $CC option to use)
cf_save_CFLAGS="$CFLAGS"
@@ -1682,23 +1815,9 @@ AC_DEFUN([CF_SHARED_OPTS],
beos*)
MK_SHARED_LIB='$(CC) -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
;;
- hpux10.*)
- # (tested with gcc 2.7.2 -- I don't have c89)
- if test -n "$GCC"; then
- LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
- else
- CC_SHARED_OPTS='+Z'
- LD_SHARED_OPTS='-Wl,+b,$(libdir)'
- fi
- MK_SHARED_LIB='$(LD) +b $(libdir) -b +h `basename $[@]` -o $[@]'
- # HP-UX shared libraries must be executable, and should be
- # readonly to exploit a quirk in the memory manager.
- INSTALL_LIB="-m 555"
- cf_cv_do_symlinks=reverse
- ;;
hpux*)
# (tested with gcc 2.7.2 -- I don't have c89)
- if test -n "$GCC"; then
+ if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
else
CC_SHARED_OPTS='+Z'
@@ -1710,45 +1829,51 @@ AC_DEFUN([CF_SHARED_OPTS],
INSTALL_LIB="-m 555"
;;
irix*)
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ fi
# tested with IRIX 5.2 and 'cc'.
- if test -z "$GCC"; then
+ if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]'
cf_cv_rm_so_locs=yes
;;
linux*|gnu*)
- # tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
- if test $DFT_LWR_MODEL = "shared" ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
- if test $cf_cv_shlib_version = no ; then
- MK_SHARED_LIB='$(CC) -shared -Wl,-stats,-lc -o $[@]'
- else
- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@].$(ABI_VERSION)`,-stats,-lc -o $[@]'
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $[@]'
;;
openbsd2*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]'
;;
openbsd*|freebsd*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='$(LD) -Bshareable -o $[@]'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
netbsd*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
- if test $DFT_LWR_MODEL = "shared" && test $cf_cv_ld_rpath = yes ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@].$(ABI_VERSION)` -o $[@]'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]'
+ if test "$cf_cv_shlib_version" = auto; then
+ if test ! -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=rel
+ fi
+ fi
else
MK_SHARED_LIB='$(LD) -Bshareable -o $[@]'
fi
@@ -1758,56 +1883,63 @@ AC_DEFUN([CF_SHARED_OPTS],
# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
# link with shared libs).
MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $[@]`'
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath"
case $host_os in
osf4*)
MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
;;
esac
MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
- if test $DFT_LWR_MODEL = "shared" ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-rpath"
+ # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
cf_cv_rm_so_locs=yes
;;
sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
# tested with osr5.0.5
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-belf -KPIC'
fi
- MK_SHARED_LIB='$(LD) -dy -G -h `basename [$]@.$(ABI_VERSION)` -o [$]@'
- if test $cf_cv_ld_rpath = yes ; then
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o [$]@'
+ if test "$cf_cv_ld_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
LINK_PROGS='LD_RUN_PATH=$(libdir)'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
sunos4*)
# tested with SunOS 4.1.1 and gcc 2.7.0
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
solaris2*)
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@].$(ABI_VERSION)` -o $[@]'
- if test $cf_cv_ld_rpath = yes ; then
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@] .$(REL_VERSION)`.$(ABI_VERSION) -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
cf_ld_rpath_opt="-R"
- EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
sysv5uw7*|unix_sv*)
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -d y -G -o [$]@'
@@ -1823,15 +1955,7 @@ AC_DEFUN([CF_SHARED_OPTS],
rel|abi)
case "$MK_SHARED_LIB" in #(vi
*'-o $[@]')
- if test "$cf_cv_do_symlinks" = reverse ; then
- AC_ERROR(cannot use --with-shlib-version with this platform)
- fi
- if test "$cf_cv_shlib_version" = rel ; then
- MK_SHARED_LIB="$MK_SHARED_LIB"'.$(REL_VERSION)'
- else
- MK_SHARED_LIB="$MK_SHARED_LIB"'.$(ABI_VERSION)'
- fi
- cf_cv_do_symlinks=yes
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
*)
AC_MSG_WARN(ignored --with-shlib-version)
@@ -1843,11 +1967,11 @@ AC_DEFUN([CF_SHARED_OPTS],
if test -n "$cf_ld_rpath_opt" ; then
AC_MSG_CHECKING(if we need a space after rpath option)
cf_save_LIBS="$LIBS"
- LIBS="$LIBS ${cf_ld_rpath_opt}/usr/lib"
+ LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
LIBS="$cf_save_LIBS"
AC_MSG_RESULT($cf_rpath_space)
- test $cf_rpath_space = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
+ test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
fi
@@ -1866,8 +1990,8 @@ dnl Check for definitions & structures needed for window size-changing
dnl FIXME: check that this works with "snake" (HP-UX 10.x)
AC_DEFUN([CF_SIZECHANGE],
[
-AC_MSG_CHECKING([declaration of size-change])
-AC_CACHE_VAL(cf_cv_sizechange,[
+AC_REQUIRE([CF_STRUCT_TERMIOS])
+AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
cf_cv_sizechange=unknown
cf_save_CFLAGS="$CFLAGS"
@@ -1877,14 +2001,14 @@ do
CFLAGS="$cf_save_CFLAGS"
test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
AC_TRY_COMPILE([#include <sys/types.h>
-#if HAVE_TERMIOS_H
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
#else
-#if HAVE_TERMIO_H
+#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif
#endif
-#if NEED_PTEM_H
+#ifdef NEED_PTEM_H
/* This is a workaround for SCO: they neglected to define struct winsize in
* termios.h -- it's only in termio.h and ptem.h
*/
@@ -1915,36 +2039,18 @@ do
CFLAGS="$cf_save_CFLAGS"
if test "$cf_cv_sizechange" = yes ; then
echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
- test -n "$cf_opts" && AC_DEFINE_UNQUOTED($cf_opts)
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
break
fi
done
- ])
-AC_MSG_RESULT($cf_cv_sizechange)
-test $cf_cv_sizechange != no && AC_DEFINE(HAVE_SIZECHANGE)
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl Check for datatype 'speed_t', which is normally declared via either
-dnl sys/types.h or termios.h
-AC_DEFUN([CF_SPEED_TYPE],
-[
-AC_MSG_CHECKING(for speed_t)
-OSPEED_INCLUDES=
-AC_TRY_COMPILE([#include <sys/types.h>],
- [speed_t some_variable = 0],
- [OSPEED_TYPE=speed_t],
- [OSPEED_TYPE=unsigned])
-AC_TRY_COMPILE([#include <termios.h>],
- [speed_t some_variable = 0],
- [OSPEED_TYPE=speed_t
- OSPEED_INCLUDES="#include <termios.h>"],[])
-AC_SUBST(OSPEED_TYPE)
-AC_SUBST(OSPEED_INCLUDES)
-if test "$OSPEED_TYPE" = "unsigned" ; then
- AC_MSG_RESULT(no)
- AC_DEFINE(speed_t,unsigned)
-else
- AC_MSG_RESULT(yes)
+])
+if test "$cf_cv_sizechange" != no ; then
+ AC_DEFINE(HAVE_SIZECHANGE)
+ case $cf_cv_sizechange in #(vi
+ NEED*)
+ AC_DEFINE_UNQUOTED($cf_cv_sizechange )
+ ;;
+ esac
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -2013,7 +2119,7 @@ do
SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
done
SRC_SUBDIRS="$SRC_SUBDIRS misc test"
-test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
+test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
ADA_SUBDIRS=
if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
@@ -2060,7 +2166,7 @@ strstreambuf foo(buf, sizeof(buf))
[cf_cv_libstdcpp=no])
LIBS="$cf_save"
])
-test $cf_cv_libstdcpp = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -2073,7 +2179,7 @@ dnl do this if we've found the sigaction function.
dnl
dnl If needed, define SVR4_ACTION.
AC_DEFUN([CF_STRUCT_SIGACTION],[
-if test $ac_cv_func_sigaction = yes; then
+if test "$ac_cv_func_sigaction" = yes; then
AC_MSG_CHECKING(whether sigaction needs _POSIX_SOURCE)
AC_TRY_COMPILE([
#include <sys/types.h>
@@ -2096,13 +2202,21 @@ dnl ---------------------------------------------------------------------------
dnl Some machines require _POSIX_SOURCE to completely define struct termios.
dnl If so, define SVR4_TERMIO
AC_DEFUN([CF_STRUCT_TERMIOS],[
-if test $ac_cv_header_termios_h = yes ; then
+AC_CHECK_HEADERS( \
+termio.h \
+termios.h \
+unistd.h \
+)
+if test "$ISC" = yes ; then
+ AC_CHECK_HEADERS( sys/termio.h )
+fi
+if test "$ac_cv_header_termios_h" = yes ; then
case "$CFLAGS" in
*-D_POSIX_SOURCE*)
termios_bad=dunno ;;
*) termios_bad=maybe ;;
esac
- if test $termios_bad = maybe ; then
+ if test "$termios_bad" = maybe ; then
AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE)
AC_TRY_COMPILE([#include <termios.h>],
[struct termios foo; int x = foo.c_iflag],
@@ -2167,17 +2281,17 @@ AC_MSG_CHECKING(if sys/time.h works with sys/select.h)
AC_CACHE_VAL(cf_cv_sys_time_select,[
AC_TRY_COMPILE([
#include <sys/types.h>
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if HAVE_SYS_SELECT_H
+#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
],[],[cf_cv_sys_time_select=yes],
[cf_cv_sys_time_select=no])
])
AC_MSG_RESULT($cf_cv_sys_time_select)
-test $cf_cv_sys_time_select = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
+test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
])dnl
dnl ---------------------------------------------------------------------------
dnl Determine the type we should use for chtype (and attr_t, which is treated
@@ -2190,7 +2304,7 @@ AC_REQUIRE([CF_UNSIGNED_LITERALS])
AC_MSG_CHECKING([for type of chtype])
AC_CACHE_VAL(cf_cv_typeof_chtype,[
AC_TRY_RUN([
-#if USE_WIDEC_SUPPORT
+#ifdef USE_WIDEC_SUPPORT
#include <stddef.h> /* we want wchar_t */
#define WANT_BITS 39
#else
@@ -2202,7 +2316,7 @@ int main()
FILE *fp = fopen("cf_test.out", "w");
if (fp != 0) {
char *result = "long";
-#if USE_WIDEC_SUPPORT
+#ifdef USE_WIDEC_SUPPORT
/*
* If wchar_t is smaller than a long, it must be an int or a
* short. We prefer not to use a short anyway.
@@ -2260,7 +2374,7 @@ AC_CACHE_VAL(cf_cv_type_sigaction,[
[cf_cv_type_sigaction=yes],
[cf_cv_type_sigaction=no])])
AC_MSG_RESULT($cf_cv_type_sigaction)
-test $cf_cv_type_sigaction = yes && AC_DEFINE(HAVE_TYPE_SIGACTION)
+test "$cf_cv_type_sigaction" = yes && AC_DEFINE(HAVE_TYPE_SIGACTION)
])dnl
dnl ---------------------------------------------------------------------------
dnl Test if the compiler supports 'U' and 'L' suffixes. Only old compilers
@@ -2281,7 +2395,7 @@ dnl $1=uppercase($2)
AC_DEFUN([CF_UPPER],
[
changequote(,)dnl
-$1=`echo $2 | tr '[a-z]' '[A-Z]'`
+$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
changequote([,])dnl
])dnl
dnl ---------------------------------------------------------------------------
diff --git a/contrib/ncurses/announce.html.in b/contrib/ncurses/announce.html.in
index 38626d101fa1..936b2053d588 100644
--- a/contrib/ncurses/announce.html.in
+++ b/contrib/ncurses/announce.html.in
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
- $Id: announce.html.in,v 1.37 2000/07/02 01:48:54 tom Exp $
+ $Id: announce.html.in,v 1.39 2000/07/04 21:59:36 tom Exp $
-->
<HTML>
<HEAD>
@@ -33,7 +33,7 @@ the library and tools.<P>
The ncurses distribution is available via anonymous FTP at
the GNU distribution site
<A HREF="ftp://ftp.gnu.org/pub/gnu/ncurses">ftp://ftp.gnu.org/pub/gnu/ncurses</A>.
-It is also available at
+<br>It is also available at
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H1>Release Notes</H1>
@@ -68,8 +68,14 @@ New features:
provide better control over the use of default colors. This is
the principal visible difference between ncurses 5.1 and preceding
versions. The new extension allows an application to specify what
- colors pair 0 uses. It defaults to white on black, unless you
- have invoked <code>use_default_colors()</code>.
+ colors pair 0 uses.
+ <p>
+ <em>NOTE</em>: Pair 0 defaults to white on black unless
+ you have invoked <code>use_default_colors()</code> or set it via
+ <code>assume_default_colors()</code>. An application that calls
+ <code>start_colors()</code> without setting the background color
+ will consistently have a black background no matter what color your
+ terminal's background actually is.
<li>made several fixes to the terminfo-to-termcap conversion, and
have been using the generated termcaps without further hand-tuning.
@@ -103,11 +109,13 @@ New features:
</ul>
<li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
- IEXTEN flag which affects stty lnext on systems such as FreeBSD
+ IEXTEN flag which affects <code>stty lnext</code> on systems such as FreeBSD
- <li>reordered tests during mouse initialization to allow for gpm to run in
- xterm, or for xterm to be used under OS/2 EMX. Also dropped test for
- $DISPLAY in favor of kmous=\E[M or $TERM containing "xterm".
+ <li>reordered tests during mouse initialization to allow for gpm to run
+ in xterm, or for xterm to be used under OS/2 EMX. Also dropped test
+ for <code>$DISPLAY</code> in favor of the terminfo capability
+ <code>kmous=\E[M</code> or
+ if <code>$TERM</code> environment variable contains "xterm".
<li>added configure option <code>--with-manpage-symlinks</code>, which
provides for fully indexing manpage entries by making symbolic links
@@ -275,7 +283,8 @@ including (versions starting with those noted):
<DT> cdk
<DD> Curses Development Kit
<br>
-<A HREF="http://www.vexus.ca/CDK.html">Curses Development Kit</a>
+<A HREF="http://www.vexus.ca/CDK.html">http://www.vexus.ca/CDK.html</a>
+<br>
<A HREF="http://dickey.his.com/cdk/cdk.html">http://dickey.his.com/cdk</A>.
<DT> ded
<DD> directory-editor
@@ -292,27 +301,39 @@ for similar applications on GNU/Linux.
<A HREF="http://lynx.isc.org/release/">http://lynx.isc.org/release</A>.
<DT> Midnight Commander 4.1
<DD> file manager
+<br>
+<A HREF="www.gnome.org/mc/">www.gnome.org/mc/</A>.
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org">http://www.mutt.org</A>.
<DT> ncftp
<DD> file-transfer utility
+<br>
+<A HREF="http://www.ncftp.com">http://www.ncftp.com</A>.
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
+<br>
+<A HREF="http://www.bostic.com/vi/">http://www.bostic.com/vi/</A>.
<DT> tin
<DD> newsreader, supporting color, MIME
<br>
<A HREF="http://www.tin.org">http://www.tin.org</A>.
<DT> taper
<DD> tape archive utility
+<br>
+<A HREF="http://members.iinet.net.au/~yusuf/taper/">http://members.iinet.net.au/~yusuf/taper/</A>.
<DT> vh-1.6
<DD> Volks-Hypertext browser for the Jargon File
+<br>
+<A HREF="http://www.bg.debian.org/Packages/unstable/text/vh.html">http://www.bg.debian.org/Packages/unstable/text/vh.html</A>.
</DL>
as well as some that use ncurses for the terminfo support alone:
<DL>
<DT> minicom
<DD> terminal emulator
+<br>
+<A HREF="http://www.pp.clinet.fi/~walker/minicom.html">http://www.pp.clinet.fi/~walker/minicom.html</A>.
<DT> vile
<DD> vi-like-emacs
<br>
diff --git a/contrib/ncurses/c++/Makefile.in b/contrib/ncurses/c++/Makefile.in
index e8079893736f..78b86db364db 100644
--- a/contrib/ncurses/c++/Makefile.in
+++ b/contrib/ncurses/c++/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.52 2000/05/28 01:44:34 tom Exp $
+# $Id: Makefile.in,v 1.53 2000/08/19 19:12:32 tom Exp $
##############################################################################
# Copyright (c) 1998,1999 Free Software Foundation, Inc. #
# #
@@ -41,7 +41,7 @@ CF_MFLAGS = @cf_cv_makeflags@
x = @PROG_EXT@
MODEL = ../@DFT_OBJ_SUBDIR@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -132,16 +132,16 @@ etip.h: $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
cp $(srcdir)/etip.h.in $@
sh $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
-$(INSTALL_PREFIX)$(libdir) :
+$(DESTDIR)$(libdir) :
$(srcdir)/../mkinstalldirs $@
install \
-install.libs:: ../lib/$(LIBNAME) $(INSTALL_PREFIX)$(libdir)
- $(INSTALL) ../lib/$(LIBNAME) $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
+install.libs:: ../lib/$(LIBNAME) $(DESTDIR)$(libdir)
+ $(INSTALL) ../lib/$(LIBNAME) $(DESTDIR)$(libdir)/$(LIBNAME)
uninstall \
uninstall.libs::
- -rm -f $(INSTALL_PREFIX)$(libdir)/$(LIBNAME)
+ -rm -f $(DESTDIR)$(libdir)/$(LIBNAME)
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/c++/cursesf.cc b/contrib/ncurses/c++/cursesf.cc
index a993322b8657..a3b066cb51ef 100644
--- a/contrib/ncurses/c++/cursesf.cc
+++ b/contrib/ncurses/c++/cursesf.cc
@@ -35,7 +35,7 @@
#include "cursesapp.h"
#include "internal.h"
-MODULE_ID("$Id: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $")
+MODULE_ID("$Id: cursesf.cc,v 1.11 2000/06/09 16:15:40 juergen Exp $")
NCursesFormField::~NCursesFormField () {
if (field)
@@ -48,7 +48,8 @@ NCursesFormField::~NCursesFormField () {
FIELD**
NCursesForm::mapFields(NCursesFormField* nfields[]) {
int fieldCount = 0,lcv;
-
+ FIELD** old_fields;
+
assert(nfields != 0);
for (lcv=0; nfields[lcv]->field; ++lcv)
@@ -63,8 +64,10 @@ NCursesForm::mapFields(NCursesFormField* nfields[]) {
my_fields = nfields;
- if (form)
- delete[] ::form_fields(form);
+ if (form && (old_fields = ::form_fields(form))) {
+ ::set_form_fields(form,(FIELD**)0);
+ delete[] old_fields;
+ }
return fields;
}
diff --git a/contrib/ncurses/c++/cursesf.h b/contrib/ncurses/c++/cursesf.h
index 89f0cbe9dd34..40f4146172c3 100644
--- a/contrib/ncurses/c++/cursesf.h
+++ b/contrib/ncurses/c++/cursesf.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,12 +31,13 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: cursesf.h,v 1.11 1999/10/30 23:59:37 tom Exp $
+// $Id: cursesf.h,v 1.12 2000/07/15 21:08:25 tom Exp $
#ifndef _CURSESF_H
#define _CURSESF_H
#include <cursesp.h>
+#include <string.h>
extern "C" {
# include <form.h>
@@ -91,10 +92,10 @@ protected:
if (err != E_OK)
THROW(new NCursesFormException (err));
}
-
+
public:
// Create a 'Null' field. Can be used to delimit a field list
- NCursesFormField()
+ NCursesFormField()
: field((FIELD*)0), ftype((NCursesFieldType*)0) {
}
@@ -104,14 +105,14 @@ public:
int first_row = 0,
int first_col = 0,
int offscreen_rows = 0,
- int additional_buffers = 0)
+ int additional_buffers = 0)
: ftype((NCursesFieldType*)0) {
field = ::new_field(rows,cols,first_row,first_col,
offscreen_rows, additional_buffers);
if (!field)
OnError(errno);
}
-
+
virtual ~NCursesFormField ();
// Duplicate the field at a new position
@@ -321,12 +322,12 @@ private:
static void frm_term(FORM *);
static void fld_init(FORM *);
static void fld_term(FORM *);
-
+
// Calculate FIELD* array for the menu
FIELD** mapFields(NCursesFormField* nfields[]);
-protected:
- // internal routines
+protected:
+ // internal routines
inline void set_user(void *user) {
UserHook* uptr = (UserHook*)::form_userptr (form);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
@@ -337,8 +338,8 @@ protected:
UserHook* uptr = (UserHook*)::form_userptr (form);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
return uptr->m_user;
- }
-
+ }
+
void InitForm (NCursesFormField* Fields[],
bool with_frame,
bool autoDeleteFields);
@@ -353,14 +354,14 @@ protected:
// 'Internal' constructor, builds an object without association to a
// field array.
- NCursesForm( int lines,
- int cols,
- int begin_y = 0,
- int begin_x = 0)
- : NCursesPanel(lines,cols,begin_y,begin_x),
+ NCursesForm( int lines,
+ int cols,
+ int begin_y = 0,
+ int begin_x = 0)
+ : NCursesPanel(lines,cols,begin_y,begin_x),
form ((FORM*)0) {
}
-
+
public:
// Create form for the default panel.
NCursesForm (NCursesFormField* Fields[],
@@ -372,9 +373,9 @@ public:
// Create a form in a panel with the given position and size.
NCursesForm (NCursesFormField* Fields[],
- int lines,
- int cols,
- int begin_y,
+ int lines,
+ int cols,
+ int begin_y,
int begin_x,
bool with_frame=FALSE, // reserve space for a frame?
bool autoDelete_Fields=FALSE) // do automatic cleanup?
@@ -397,17 +398,17 @@ public:
// Set these fields for the form
inline void setFields(NCursesFormField* Fields[]) {
- OnError(::set_form_fields(form,mapFields(Fields)));
+ OnError(::set_form_fields(form,mapFields(Fields)));
}
// Remove the form from the screen
- inline void unpost (void) {
- OnError (::unpost_form (form));
+ inline void unpost (void) {
+ OnError (::unpost_form (form));
}
-
+
// Post the form to the screen if flag is true, unpost it otherwise
inline void post(bool flag = TRUE) {
- OnError (flag ? ::post_form(form) : ::unpost_form (form));
+ OnError (flag ? ::post_form(form) : ::unpost_form (form));
}
// Decorations
@@ -424,7 +425,7 @@ public:
else
OnError(E_SYSTEM_ERROR);
}
-
+
inline void label(const char *topLabel, const char *bottomLabel) {
if (b_framed)
NCursesPanel::label(topLabel,bottomLabel);
@@ -578,18 +579,18 @@ template<class T> class NCursesUserForm : public NCursesForm
protected:
// 'Internal' constructor, builds an object without association to a
// field array.
- NCursesUserForm( int lines,
- int cols,
- int begin_y = 0,
+ NCursesUserForm( int lines,
+ int cols,
+ int begin_y = 0,
int begin_x = 0,
- const T* p_UserData = (T*)0)
+ const T* p_UserData = (T*)0)
: NCursesForm(lines,cols,begin_y,begin_x) {
if (form)
set_user ((void *)p_UserData);
}
public:
- NCursesUserForm (NCursesFormField Fields[],
+ NCursesUserForm (NCursesFormField Fields[],
bool with_frame=FALSE,
bool autoDelete_Fields=FALSE)
: NCursesForm (Fields, with_frame, autoDelete_Fields) {
@@ -603,11 +604,11 @@ public:
if (form)
set_user ((void *)p_UserData);
};
-
+
NCursesUserForm (NCursesFormField Fields[],
- int lines,
- int cols,
- int begin_y = 0,
+ int lines,
+ int cols,
+ int begin_y = 0,
int begin_x = 0,
const T* p_UserData = (T*)0,
bool with_frame=FALSE,
@@ -616,11 +617,11 @@ public:
with_frame, autoDelete_Fields) {
if (form)
set_user ((void *)p_UserData);
- };
-
+ };
+
virtual ~NCursesUserForm() {
};
-
+
inline T* UserData (void) const {
return (T*)get_user ();
};
@@ -645,7 +646,7 @@ private:
}
public:
- Alpha_Field(int width)
+ Alpha_Field(int width)
: NCursesFieldType(TYPE_ALPHA),
min_field_width(width) {
}
@@ -660,7 +661,7 @@ private:
}
public:
- Alphanumeric_Field(int width)
+ Alphanumeric_Field(int width)
: NCursesFieldType(TYPE_ALNUM),
min_field_width(width) {
}
@@ -678,7 +679,7 @@ private:
public:
Integer_Field(int prec, long low=0L, long high=0L)
- : NCursesFieldType(TYPE_INTEGER),
+ : NCursesFieldType(TYPE_INTEGER),
precision(prec), lower_limit(low), upper_limit(high) {
}
};
@@ -695,7 +696,7 @@ private:
public:
Numeric_Field(int prec, double low=0.0, double high=0.0)
- : NCursesFieldType(TYPE_NUMERIC),
+ : NCursesFieldType(TYPE_NUMERIC),
precision(prec), lower_limit(low), upper_limit(high) {
}
};
@@ -757,11 +758,11 @@ public:
// -------------------------------------------------------------------------
//
class UserDefinedFieldType : public NCursesFieldType {
- friend class UDF_Init; // Internal helper to set up statics
+ friend class UDF_Init; // Internal helper to set up statics
private:
// For all C++ defined fieldtypes we need only one generic lowlevel
// FIELDTYPE* element.
- static FIELDTYPE* generic_fieldtype;
+ static FIELDTYPE* generic_fieldtype;
protected:
// This are the functions required by the low level libforms functions
@@ -793,9 +794,9 @@ public:
// -------------------------------------------------------------------------
//
class UserDefinedFieldType_With_Choice : public UserDefinedFieldType {
- friend class UDF_Init; // Internal helper to set up statics
+ friend class UDF_Init; // Internal helper to set up statics
private:
- // For all C++ defined fieldtypes with choice functions we need only one
+ // For all C++ defined fieldtypes with choice functions we need only one
// generic lowlevel FIELDTYPE* element.
static FIELDTYPE* generic_fieldtype_with_choice;
diff --git a/contrib/ncurses/c++/cursesp.cc b/contrib/ncurses/c++/cursesp.cc
index 3bcf3d260f36..50095d3d2144 100644
--- a/contrib/ncurses/c++/cursesp.cc
+++ b/contrib/ncurses/c++/cursesp.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,8 +33,9 @@
#include "cursesp.h"
#include "internal.h"
+#include <string.h>
-MODULE_ID("$Id: cursesp.cc,v 1.15 1999/10/30 23:59:37 tom Exp $")
+MODULE_ID("$Id: cursesp.cc,v 1.16 2000/07/15 21:08:13 tom Exp $")
NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
@@ -42,13 +43,13 @@ void NCursesPanel::init() {
p = ::new_panel(w);
if (!p)
OnError(ERR);
-
+
UserHook* hook = new UserHook;
hook->m_user = NULL;
hook->m_back = this;
hook->m_owner = p;
::set_panel_userptr(p, (void *)hook);
-}
+}
NCursesPanel::~NCursesPanel() {
UserHook* hook = (UserHook*)::panel_userptr(p);
@@ -61,7 +62,7 @@ NCursesPanel::~NCursesPanel() {
void
NCursesPanel::redraw() {
PANEL *pan;
-
+
pan = ::panel_above(NULL);
while (pan) {
::touchwin(panel_window(pan));
@@ -95,20 +96,20 @@ NCursesPanel::frame(const char *title,const char *btitle) {
int err = OK;
if (!title && !btitle) {
err = box();
- }
+ }
else {
err = box();
if (err==OK)
- label(title,btitle);
+ label(title,btitle);
}
OnError(err);
}
void
NCursesPanel::label(const char *tLabel, const char *bLabel) {
- if (tLabel)
+ if (tLabel)
centertext(0,tLabel);
- if (bLabel)
+ if (bLabel)
centertext(maxy(),bLabel);
}
diff --git a/contrib/ncurses/c++/cursesw.cc b/contrib/ncurses/c++/cursesw.cc
index baae046ef204..b61a7056af15 100644
--- a/contrib/ncurses/c++/cursesw.cc
+++ b/contrib/ncurses/c++/cursesw.cc
@@ -25,7 +25,7 @@
#include "cursesw.h"
#include "internal.h"
-MODULE_ID("$Id: cursesw.cc,v 1.16 1999/11/13 23:42:17 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.17 2000/09/02 18:55:31 tom Exp $")
#define COLORS_NEED_INITIALIZATION -1
#define COLORS_NOT_INITIALIZED 0
@@ -424,7 +424,7 @@ NCursesWindow::setcolor(short pair)
return OK;
}
-#ifdef HAVE_HAS_KEY
+#if HAVE_HAS_KEY
extern "C" int _nc_has_mouse(void);
bool NCursesWindow::has_mouse() const {
diff --git a/contrib/ncurses/c++/cursslk.cc b/contrib/ncurses/c++/cursslk.cc
index 82ff83e11954..236d3a55b3dd 100644
--- a/contrib/ncurses/c++/cursslk.cc
+++ b/contrib/ncurses/c++/cursslk.cc
@@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,8 +34,9 @@
#include "cursslk.h"
#include "cursesapp.h"
#include "internal.h"
+#include <string.h>
-MODULE_ID("$Id: cursslk.cc,v 1.5 1999/05/16 17:31:01 juergen Exp $")
+MODULE_ID("$Id: cursslk.cc,v 1.6 2000/07/15 21:07:50 tom Exp $")
void Soft_Label_Key_Set::Soft_Label_Key::operator=(char *text) {
delete[] label;
@@ -54,7 +55,7 @@ void Soft_Label_Key_Set::init() {
for(int i=0; i < num_labels; i++) {
slk_array[i].num = i+1;
}
- b_attrInit = FALSE;
+ b_attrInit = FALSE;
}
Soft_Label_Key_Set::Soft_Label_Key_Set() {
diff --git a/contrib/ncurses/c++/internal.h b/contrib/ncurses/c++/internal.h
index cdf256cbd71e..67bc3ff2469e 100644
--- a/contrib/ncurses/c++/internal.h
+++ b/contrib/ncurses/c++/internal.h
@@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,12 +31,12 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
-// $Id: internal.h,v 1.5 1999/05/16 17:29:25 juergen Exp $
+// $Id: internal.h,v 1.6 2000/09/02 18:22:23 tom Exp $
#ifndef _CPLUS_INTERNAL_H
#define _CPLUS_INTERNAL_H 1
-#ifdef USE_RCS_IDS
+#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
#else
#define MODULE_ID(id) /*nothing*/
diff --git a/contrib/ncurses/config.guess b/contrib/ncurses/config.guess
index 499496436cd5..b100dbe1a331 100755
--- a/contrib/ncurses/config.guess
+++ b/contrib/ncurses/config.guess
@@ -109,6 +109,9 @@ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ i?86:OS/2:*:*)
+ echo "i386-unknown-os2"
+ exit 0;;
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -431,7 +434,7 @@ EOF
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
- ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i?86:AIX:*:*)
diff --git a/contrib/ncurses/config.sub b/contrib/ncurses/config.sub
index 8fa14be27e16..f8ec622e95b0 100755
--- a/contrib/ncurses/config.sub
+++ b/contrib/ncurses/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
-version='2000-06-13'
+version='2000-07-06'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -122,6 +122,9 @@ esac
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
+ -os2)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86/'`
+ ;;
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
@@ -218,8 +221,13 @@ case $basic_machine in
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | fr30 | avr)
+ | thumb | d10v | d30v | fr30 | avr)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
+ os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;;
@@ -257,7 +265,7 @@ case $basic_machine in
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
- | bs2000-*)
+ | bs2000-* | tic54x-* | c54x-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -793,6 +801,10 @@ case $basic_machine in
basic_machine=t3e-cray
os=-unicos
;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -994,6 +1006,7 @@ case $os in
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -os2 \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
diff --git a/contrib/ncurses/configure b/contrib/ncurses/configure
index 3938537461c6..7b8164df2eef 100755
--- a/contrib/ncurses/configure
+++ b/contrib/ncurses/configure
@@ -1,11 +1,11 @@
#! /bin/sh
-# From configure.in Revision: 1.194
+# From configure.in Revision: 1.217
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13.19990117
+# Generated automatically using autoconf version 2.13.20000819
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@@ -194,19 +194,14 @@ cat <<EOF
--without-ada suppress check for Ada95, don't build demo
--without-progs suppress build with programs (e.g., tic)
--with-install-prefix prefixes actual install-location
-Options to Specify How Manpages are Installed:
- --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
- optionally formatted, e.g., gzip,formatted
- --with-manpage-renames specify manpage-renaming
- --with-manpage-symlinks specify manpage-symlinks
Options to Specify the Libraries Built/Used:
--with-shared generate shared-libraries
-EOF
-cat <<EOF
--with-normal generate normal-libraries (default)
--with-debug generate debug-libraries (default)
--with-profile generate profile-libraries
--with-termlib generate separate terminfo library
+EOF
+cat <<EOF
--with-dbmalloc test: use Conor Cahill's dbmalloc library
--with-dmalloc test: use Gray Watson's dmalloc library
--with-gpm use Alessandro Rubini's GPM library
@@ -215,10 +210,12 @@ cat <<EOF
Fine-Tuning Your Configuration:
--disable-overwrite leave out the link to -lcurses
--disable-database use only built-in data
-EOF
-cat <<EOF
+ --with-database=XXX specify terminfo source to install
--with-fallbacks=XXX specify list of fallback terminal descriptions
--with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
+ --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
+EOF
+cat <<EOF
--disable-big-core assume machine has little memory
--enable-termcap compile in termcap fallback support
--enable-getcap fast termcap load, no xrefs to terminfo
@@ -227,39 +224,47 @@ cat <<EOF
--enable-broken_linker compile with broken-linker support code
--enable-bsdpad recognize BSD-style prefix padding
--with-rcs-ids compile-in RCS identifiers
-Extensions:
- --disable-ext-funcs disable function-extensions
+Options to Specify How Manpages are Installed:
+ --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
+ optionally formatted, e.g., gzip,formatted
+ --with-manpage-renames specify manpage-renaming
+ --with-manpage-symlinks specify manpage-symlinks
EOF
cat <<EOF
+Extensions:
+ --disable-ext-funcs disable function-extensions
--enable-const compile with extra/non-standard const
- --enable-hashmap compile with hashmap scrolling-optimization code
--enable-no-padding compile with \$NCURSES_NO_PADDING code
--enable-sigwinch compile with SIGWINCH handler
--enable-tcap-names compile with user-definable terminal capabilities
+Development Code:
+ --with-develop enable all development options
+ --enable-colorfgbg compile with \$COLORFGBG code
+ --enable-hard-tabs compile with hard-tabs code
+ --disable-root-environ limit environment when running as root
+ --enable-xmc-glitch compile with limited support for xmc
+EOF
+cat <<EOF
Experimental Code:
- --with-develop enable all experimental options for testing
- --enable-colorfgbg compile with experimental \$COLORFGBG code
- --enable-hard-tabs compile with experimental hard-tabs code
+ --disable-assumed-color do not assume anything about default-colors
+ --disable-hashmap compile without hashmap scrolling-optimization
--enable-safe-sprintf compile with experimental safe-sprintf code
--disable-scroll-hints compile without scroll-hints code
- --enable-widec compile with experimental wide-char code
-EOF
-cat <<EOF
- --enable-xmc-glitch compile with experimental xmc code
+ --enable-widec compile with experimental wide-char/UTF-8 code
Testing/development Options:
--enable-echo build: display "compiling" commands (default)
--enable-warnings build: turn on GCC compiler warnings
--enable-assertions test: turn on generation of assertion code
--disable-leaks test: suppress permanent memory-leaks
--enable-expanded test: generate functions for certain macros
+EOF
+cat <<EOF
--disable-macros test: use functions rather than macros
Ada95 Binding Options:
- --with-ada-compiler=CMD Specify Ada95 compiler command (default gnatmake)
+ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
--with-ada-include=DIR Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
--with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
EOF
-cat <<EOF
-EOF
exit 0 ;;
-host | --host | --hos | --ho)
@@ -409,7 +414,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13.19990117"
+ echo "configure generated by autoconf version 2.13.20000819"
exit 0 ;;
-with-* | --with-*)
@@ -636,13 +641,34 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
if test -f $srcdir/config.guess ; then
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+# configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+# same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+# as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:646: checking host system type" >&5
+echo "configure:672: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -662,6 +688,47 @@ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:693: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+ case $nonopt in
+ NONE) target_alias=$host_alias ;;
+ *) target_alias=$nonopt ;;
+ esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:711: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+ case $nonopt in
+ NONE) build_alias=$host_alias ;;
+ *) build_alias=$nonopt ;;
+ esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
+
system_name="$host_os"
else
system_name="`(uname -s -r) 2>/dev/null`"
@@ -733,7 +800,7 @@ cf_user_CFLAGS="$CFLAGS"
### Default install-location
echo $ac_n "checking for prefix""... $ac_c" 1>&6
-echo "configure:737: checking for prefix" >&5
+echo "configure:804: checking for prefix" >&5
if test "x$prefix" = "xNONE" ; then
case "$cf_cv_system_name" in
# non-vendor systems don't have a conflict
@@ -748,7 +815,7 @@ echo "$ac_t""$prefix" 1>&6
if test "x$prefix" = "xNONE" ; then
echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
-echo "configure:752: checking for default include-directory" >&5
+echo "configure:819: checking for default include-directory" >&5
test -n "$verbose" && echo 1>&6
for cf_symbol in \
$includedir \
@@ -778,7 +845,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:782: checking for $ac_word" >&5
+echo "configure:849: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -808,7 +875,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:812: checking for $ac_word" >&5
+echo "configure:879: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -859,7 +926,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:863: checking for $ac_word" >&5
+echo "configure:930: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -891,7 +958,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:895: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:962: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -902,12 +969,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 906 "configure"
+#line 973 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -933,12 +1000,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1004: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:942: checking whether we are using GNU C" >&5
+echo "configure:1009: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -947,7 +1014,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -966,7 +1033,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:970: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1037: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -997,18 +1064,18 @@ else
fi
fi
-if test -n "$GCC" ; then
-echo $ac_n "checking version of gcc""... $ac_c" 1>&6
-echo "configure:1003: checking version of gcc" >&5
-eval "$CC --version"
+if test "$GCC" = yes ; then
+ echo $ac_n "checking version of gcc""... $ac_c" 1>&6
+echo "configure:1070: checking version of gcc" >&5
+ eval "$CC --version"
fi
-if test $host != $build; then
- for ac_prog in $CC gcc cc
+if test "$host" != $build; then
+ for ac_prog in $CC gcc cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1012: checking for $ac_word" >&5
+echo "configure:1079: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1037,9 +1104,12 @@ fi
test -n "$BUILD_CC" && break
done
+else
+ BUILD_CC="$CC"
fi
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1043: checking how to run the C preprocessor" >&5
+echo "configure:1113: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1054,13 +1124,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1058 "configure"
+#line 1128 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1071,13 +1141,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1075 "configure"
+#line 1145 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1088,13 +1158,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1092 "configure"
+#line 1162 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1120,13 +1190,13 @@ echo "$ac_t""$CPP" 1>&6
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1124: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:1194: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 1130 "configure"
+#line 1200 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -1144,7 +1214,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
+#line 1218 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -1166,7 +1236,7 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:1170: checking for POSIXized ISC" >&5
+echo "configure:1240: checking for POSIXized ISC" >&5
if test -d /etc/conf/kconfig.d &&
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
then
@@ -1188,7 +1258,7 @@ fi
echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:1192: checking for ${CC-cc} option to accept ANSI C" >&5
+echo "configure:1262: checking for ${CC-cc} option to accept ANSI C" >&5
if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1212,7 +1282,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \
do
CFLAGS="$cf_save_CFLAGS $cf_arg"
cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
+#line 1286 "configure"
#include "confdefs.h"
#ifndef CC_HAS_PROTOS
@@ -1228,7 +1298,7 @@ int main() {
struct s2 {int (*f) (double a);};
; return 0; }
EOF
-if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_ansi_cc="$cf_arg"; break
else
@@ -1289,7 +1359,7 @@ freebsd*) #(vi
# Extract the first word of "ldconfig", so it can be a program name with args.
set dummy ldconfig; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1293: checking for $ac_word" >&5
+echo "configure:1363: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1326,7 +1396,7 @@ esac
echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6
-echo "configure:1330: checking if you want to ensure bool is consistent with C++" >&5
+echo "configure:1400: checking if you want to ensure bool is consistent with C++" >&5
# Check whether --with-cxx or --without-cxx was given.
if test "${with_cxx+set}" = set; then
@@ -1346,7 +1416,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1350: checking for $ac_word" >&5
+echo "configure:1420: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1378,7 +1448,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1382: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1452: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1389,12 +1459,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1393 "configure"
+#line 1463 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1420,12 +1490,12 @@ if test $ac_cv_prog_cxx_works = no; then
echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX="";
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1424: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1494: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1429: checking whether we are using GNU C++" >&5
+echo "configure:1499: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1434,7 +1504,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1453,7 +1523,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1457: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1527: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1485,10 +1555,19 @@ else
fi
fi
-if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi
+
+if test "$GXX" = yes; then
+ case "`${CXX-g++} --version`" in
+ 1*|2.[0-6]*)
+ GXX=""; CXX=""; ac_cv_prog_gxx=no
+ cf_cxx_library=no
+ echo No: templates do not work
+ ;;
+ esac
+fi
echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6
-echo "configure:1492: checking if you want to build C++ binding and demo" >&5
+echo "configure:1571: checking if you want to build C++ binding and demo" >&5
# Check whether --with-cxx-binding or --without-cxx-binding was given.
if test "${with_cxx_binding+set}" = set; then
@@ -1501,7 +1580,7 @@ fi
echo "$ac_t""$cf_with_cxx_binding" 1>&6
echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6
-echo "configure:1505: checking if you want to build with Ada95" >&5
+echo "configure:1584: checking if you want to build with Ada95" >&5
# Check whether --with-ada or --without-ada was given.
if test "${with_ada+set}" = set; then
@@ -1514,7 +1593,7 @@ fi
echo "$ac_t""$cf_with_ada" 1>&6
echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
-echo "configure:1518: checking if you want to build programs such as tic" >&5
+echo "configure:1597: checking if you want to build programs such as tic" >&5
# Check whether --with-progs or --without-progs was given.
if test "${with_progs+set}" = set; then
@@ -1532,12 +1611,31 @@ modules_to_build="$modules_to_build progs tack"
fi
modules_to_build="$modules_to_build panel menu form"
+if test "$program_transform_name" = s,x,x,; then
+ program_transform_name=
+else
+ # Double any \ or $. echo might interpret backslashes.
+ cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+ program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+ rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+ program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1541: checking for $ac_word" >&5
+echo "configure:1639: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1567,7 +1665,7 @@ test -n "$AWK" && break
done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1571: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1669: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1605,7 +1703,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1609: checking for a BSD compatible install" >&5
+echo "configure:1707: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1668,7 +1766,7 @@ case $INSTALL in
esac
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:1672: checking for long file names" >&5
+echo "configure:1770: checking for long file names" >&5
if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1711,8 +1809,32 @@ EOF
fi
+
+echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
+echo "configure:1815: checking if filesystem supports mixed-case filenames" >&5
+if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+ rm -f conftest CONFTEST
+ echo test >conftest
+ if test -f CONFTEST ; then
+ cf_cv_mixedcase=no
+ else
+ cf_cv_mixedcase=yes
+ fi
+ rm -f conftest CONFTEST
+
+fi
+
+echo "$ac_t""$cf_cv_mixedcase" 1>&6
+test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
+#define MIXEDCASE_FILENAMES 1
+EOF
+
+
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1716: checking whether ln -s works" >&5
+echo "configure:1838: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1735,7 +1857,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1739: checking for $ac_word" >&5
+echo "configure:1861: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1762,12 +1884,94 @@ else
echo "$ac_t""no" 1>&6
fi
+
+
+# Extract the first word of "ctags", so it can be a program name with args.
+set dummy ctags; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1893: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$MAKE_LOWER_TAGS"; then
+ ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_MAKE_LOWER_TAGS="yes"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
+fi
+fi
+MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
+if test -n "$MAKE_LOWER_TAGS"; then
+ echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+if test "$cf_cv_mixedcase" = yes ; then
+ # Extract the first word of "etags", so it can be a program name with args.
+set dummy etags; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1925: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$MAKE_UPPER_TAGS"; then
+ ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_MAKE_UPPER_TAGS="yes"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
+fi
+fi
+MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
+if test -n "$MAKE_UPPER_TAGS"; then
+ echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ MAKE_UPPER_TAGS=no
+fi
+
+if test "$MAKE_UPPER_TAGS" = yes ; then
+ MAKE_UPPER_TAGS=
+else
+ MAKE_UPPER_TAGS="#"
+fi
+
+
+if test "$MAKE_LOWER_TAGS" = yes ; then
+ MAKE_LOWER_TAGS=
+else
+ MAKE_LOWER_TAGS="#"
+fi
+
+
for ac_prog in tdlint lint alint
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1771: checking for $ac_word" >&5
+echo "configure:1975: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1801,7 +2005,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1805: checking for $ac_word" >&5
+echo "configure:2009: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1837,7 +2041,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
else
echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
-echo "configure:1841: checking for loader (symbol LD)" >&5
+echo "configure:2045: checking for loader (symbol LD)" >&5
test -z "$LD" && LD=ld
echo "$ac_t""$LD" 1>&6
@@ -1851,7 +2055,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
else
echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
-echo "configure:1855: checking for archiver (symbol AR)" >&5
+echo "configure:2059: checking for archiver (symbol AR)" >&5
test -z "$AR" && AR=ar
echo "$ac_t""$AR" 1>&6
@@ -1865,7 +2069,7 @@ if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
else
echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
-echo "configure:1869: checking for archiver options (symbol AR_OPTS)" >&5
+echo "configure:2073: checking for archiver options (symbol AR_OPTS)" >&5
test -z "$AR_OPTS" && AR_OPTS=rv
echo "$ac_t""$AR_OPTS" 1>&6
@@ -1877,7 +2081,7 @@ AR_OPTS=${cf_cv_subst_AR_OPTS}
echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
-echo "configure:1881: checking for makeflags variable" >&5
+echo "configure:2085: checking for makeflags variable" >&5
if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1913,7 +2117,7 @@ echo "$ac_t""$cf_cv_makeflags" 1>&6
echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
-echo "configure:1917: checking if you have specified an install-prefix" >&5
+echo "configure:2121: checking if you have specified an install-prefix" >&5
# Check whether --with-install-prefix or --without-install-prefix was given.
if test "${with_install_prefix+set}" = set; then
@@ -1921,283 +2125,12 @@ if test "${with_install_prefix+set}" = set; then
case "$withval" in #(vi
yes|no) #(vi
;;
- *) INSTALL_PREFIX="$withval"
+ *) DESTDIR="$withval"
;;
esac
fi
-echo "$ac_t""$INSTALL_PREFIX" 1>&6
-
-
-###############################################################################
-
-
- echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
-echo "configure:1937: checking format of man-pages" >&5
-
-
-# Check whether --with-manpage-format or --without-manpage-format was given.
-if test "${with_manpage_format+set}" = set; then
- withval="$with_manpage_format"
- cf_manpage_form=$withval
-else
- cf_manpage_form=unknown
-fi
-
-
-case ".$cf_manpage_form" in
-.gzip|.compress|.BSDI|.normal|.formatted) # (vi
- ;;
-.unknown|.) # (vi
- if test -z "$MANPATH" ; then
- MANPATH="/usr/man:/usr/share/man"
- fi
- # look for the 'date' man-page (it's most likely to be installed!)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- cf_manpage_form=unknown
- for cf_dir in $MANPATH; do
- test -z "$cf_dir" && cf_dir=/usr/man
- for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
- do
- cf_test=`echo $cf_name | sed -e 's/*//'`
- if test "x$cf_test" = "x$cf_name" ; then
- case "$cf_name" in
- *.gz) cf_manpage_form=gzip;;
- *.Z) cf_manpage_form=compress;;
- *.0) cf_manpage_form=BSDI,formatted;;
- *) cf_manpage_form=normal;;
- esac
- break
- fi
- done
- if test "$cf_manpage_form" != "unknown" ; then
- break
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-.*) # (vi
- echo "configure: warning: Unexpected manpage-format" 1>&2
- ;;
-esac
-
-echo "$ac_t""$cf_manpage_form" 1>&6
-
-
-echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
-echo "configure:1989: checking for manpage renaming" >&5
-
-
-# Check whether --with-manpage-renames or --without-manpage-renames was given.
-if test "${with_manpage_renames+set}" = set; then
- withval="$with_manpage_renames"
- cf_manpage_renames=$withval
-else
- cf_manpage_renames=yes
-fi
-
-
-case ".$cf_manpage_renames" in #(vi
-.no) #(vi
- ;;
-.|.yes)
- # Debian 'man' program?
- if test -f /etc/debian_version ; then
- cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames
- else
- cf_manpage_renames=no
- fi
- ;;
-esac
-
-if test "$cf_manpage_renames" != no ; then
- if test ! -f $cf_manpage_renames ; then
- { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; }
- fi
-
- test ! -d man && mkdir man
-
- # Construct a sed-script to perform renaming within man-pages
- if test -n "$cf_manpage_renames" ; then
- test ! -d man && mkdir man
- $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed
- fi
-fi
-
-echo "$ac_t""$cf_manpage_renames" 1>&6
-
-
-echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
-echo "configure:2032: checking for manpage symlinks" >&5
-
-
-# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
-if test "${with_manpage_symlinks+set}" = set; then
- withval="$with_manpage_symlinks"
- cf_manpage_symlinks=$withval
-else
- cf_manpage_symlinks=yes
-fi
-
-
-echo "$ac_t""$cf_manpage_symlinks" 1>&6
-
-
- if test "$prefix" = "NONE" ; then
- cf_prefix="$ac_default_prefix"
- else
- cf_prefix="$prefix"
- fi
-
- case "$cf_manpage_form" in # (vi
- *formatted*) # (vi
- cf_subdir='$mandir/cat'
- cf_format=yes
- ;;
- *)
- cf_subdir='$mandir/man'
- cf_format=no
- ;;
- esac
-
-test ! -d man && mkdir man
-cat >man/edit_man.sh <<CF_EOF
-#! /bin/sh
-# this script is generated by the configure-script
-prefix="$cf_prefix"
-datadir="$datadir"
-MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
-INSTALL="$INSTALL"
-INSTALL_DATA="$INSTALL_DATA"
-
-TMP=\${TMPDIR-/tmp}/man\$\$
-trap "rm -f \$TMP" 0 1 2 5 15
-
-verb=\$1
-shift
-
-mandir=\$1
-shift
-
-srcdir=\$1
-shift
-
-for i in \$* ; do
-case \$i in #(vi
-*.orig|*.rej) ;; #(vi
-*.[0-9]*)
- section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
- if test \$verb = installing ; then
- if test ! -d $cf_subdir\${section} ; then
- \$MKDIRS $cf_subdir\$section
- fi
- fi
- aliases=
- source=\`basename \$i\`
-CF_EOF
-if test "$cf_manpage_symlinks" = yes ; then
-cat >>man/edit_man.sh <<CF_EOF
- aliases=\`sed -f \$srcdir/manlinks.sed \$source | sort -u\`
-CF_EOF
-fi
-if test "$cf_manpage_renames" = no ; then
-cat >>man/edit_man.sh <<CF_EOF
- target=$cf_subdir\${section}/\$source
- sed -e "s,@DATADIR@,\$datadir," < \$i >\$TMP
-CF_EOF
-else
-cat >>man/edit_man.sh <<CF_EOF
- target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
- if test -z "\$target" ; then
- echo '? missing rename for '\$source
- target="\$source"
- fi
- target="$cf_subdir\$section/\$target"
- test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
-CF_EOF
-fi
-if test $cf_format = yes ; then
-cat >>man/edit_man.sh <<CF_EOF
- nroff -man \$TMP >\$TMP.out
- mv \$TMP.out \$TMP
-CF_EOF
-fi
-case "$cf_manpage_form" in #(vi
-*compress*) #(vi
-cat >>man/edit_man.sh <<CF_EOF
- if test \$verb = installing ; then
- if ( compress -f \$TMP )
- then
- mv \$TMP.Z \$TMP
- fi
- fi
- target="\$target.Z"
-CF_EOF
- ;;
-*gzip*) #(vi
-cat >>man/edit_man.sh <<CF_EOF
- if test \$verb = installing ; then
- if ( gzip -f \$TMP )
- then
- mv \$TMP.gz \$TMP
- fi
- fi
- target="\$target.gz"
-CF_EOF
- ;;
-*BSDI*)
-cat >>man/edit_man.sh <<CF_EOF
- # BSDI installs only .0 suffixes in the cat directories
- target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
-CF_EOF
- ;;
-esac
-cat >>man/edit_man.sh <<CF_EOF
- echo \$verb \$target
- suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
- if test \$verb = installing ; then
- \$INSTALL_DATA \$TMP \$target
- test -n "\$aliases" && (
- cd $cf_subdir\${section} && (
- target=\`basename \$target\`
- for cf_alias in \$aliases
- do
- if test -f \$cf_alias\${suffix} ; then
- if ( cmp -s \$target \$cf_alias\${suffix} )
- then
- :
- else
- echo .. \$verb alias \$cf_alias\${suffix}
- rm -f \$cf_alias\${suffix}
- $LN_S \$target \$cf_alias\${suffix}
- fi
- else
- echo .. \$verb alias \$cf_alias\${suffix}
- rm -f \$cf_alias\${suffix}
- $LN_S \$target \$cf_alias\${suffix}
- fi
- done
- )
- )
- else
- rm -f \$target
- test -n "\$aliases" && (
- cd $cf_subdir\${section} && (
- for cf_alias in \$aliases
- do
- echo .. \$verb alias \$cf_alias\${suffix}
- rm -f \$cf_alias\${suffix}
- done
- )
- )
- fi
- ;;
-esac
-done
-exit 0
-CF_EOF
-chmod 755 man/edit_man.sh
-
+echo "$ac_t""$DESTDIR" 1>&6
###############################################################################
@@ -2209,7 +2142,7 @@ chmod 755 man/edit_man.sh
cf_list_models=""
echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
-echo "configure:2213: checking if you want to build shared libraries" >&5
+echo "configure:2146: checking if you want to build shared libraries" >&5
# Check whether --with-shared or --without-shared was given.
if test "${with_shared+set}" = set; then
@@ -2223,7 +2156,7 @@ echo "$ac_t""$with_shared" 1>&6
test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
-echo "configure:2227: checking if you want to build static libraries" >&5
+echo "configure:2160: checking if you want to build static libraries" >&5
# Check whether --with-normal or --without-normal was given.
if test "${with_normal+set}" = set; then
@@ -2237,7 +2170,7 @@ echo "$ac_t""$with_normal" 1>&6
test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
-echo "configure:2241: checking if you want to build debug libraries" >&5
+echo "configure:2174: checking if you want to build debug libraries" >&5
# Check whether --with-debug or --without-debug was given.
if test "${with_debug+set}" = set; then
@@ -2251,7 +2184,7 @@ echo "$ac_t""$with_debug" 1>&6
test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
-echo "configure:2255: checking if you want to build profiling libraries" >&5
+echo "configure:2188: checking if you want to build profiling libraries" >&5
# Check whether --with-profile or --without-profile was given.
if test "${with_profile+set}" = set; then
@@ -2267,19 +2200,19 @@ test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
###############################################################################
echo $ac_n "checking for specified models""... $ac_c" 1>&6
-echo "configure:2271: checking for specified models" >&5
+echo "configure:2204: checking for specified models" >&5
test -z "$cf_list_models" && cf_list_models=normal
echo "$ac_t""$cf_list_models" 1>&6
### Use the first model as the default, and save its suffix for use in building
### up test-applications.
echo $ac_n "checking for default model""... $ac_c" 1>&6
-echo "configure:2278: checking for default model" >&5
+echo "configure:2211: checking for default model" >&5
DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
echo "$ac_t""$DFT_LWR_MODEL" 1>&6
-DFT_UPR_MODEL=`echo $DFT_LWR_MODEL | tr '[a-z]' '[A-Z]'`
+DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
TINFO_NAME=tinfo
@@ -2306,7 +2239,7 @@ LIB_SUFFIX=
###############################################################################
echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
-echo "configure:2310: checking if you want to build a separate terminfo library" >&5
+echo "configure:2243: checking if you want to build a separate terminfo library" >&5
# Check whether --with-termlib or --without-termlib was given.
if test "${with_termlib+set}" = set; then
@@ -2320,7 +2253,7 @@ echo "$ac_t""$with_termlib" 1>&6
### Checks for special libraries, must be done up-front.
echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
-echo "configure:2324: checking if you want to link with dbmalloc for testing" >&5
+echo "configure:2257: checking if you want to link with dbmalloc for testing" >&5
# Check whether --with-dbmalloc or --without-dbmalloc was given.
if test "${with_dbmalloc+set}" = set; then
@@ -2331,9 +2264,9 @@ else
fi
echo "$ac_t""$with_dbmalloc" 1>&6
-if test $with_dbmalloc = yes ; then
+if test "$with_dbmalloc" = yes ; then
echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
-echo "configure:2337: checking for debug_malloc in -ldbmalloc" >&5
+echo "configure:2270: checking for debug_malloc in -ldbmalloc" >&5
ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2341,7 +2274,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldbmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2345 "configure"
+#line 2278 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2352,7 +2285,7 @@ int main() {
debug_malloc()
; return 0; }
EOF
-if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2382,7 +2315,7 @@ fi
fi
echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
-echo "configure:2386: checking if you want to link with dmalloc for testing" >&5
+echo "configure:2319: checking if you want to link with dmalloc for testing" >&5
# Check whether --with-dmalloc or --without-dmalloc was given.
if test "${with_dmalloc+set}" = set; then
@@ -2393,9 +2326,9 @@ else
fi
echo "$ac_t""$with_dmalloc" 1>&6
-if test $with_dmalloc = yes ; then
+if test "$with_dmalloc" = yes ; then
echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
-echo "configure:2399: checking for dmalloc_debug in -ldmalloc" >&5
+echo "configure:2332: checking for dmalloc_debug in -ldmalloc" >&5
ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2403,7 +2336,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldmalloc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2407 "configure"
+#line 2340 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2414,7 +2347,7 @@ int main() {
dmalloc_debug()
; return 0; }
EOF
-if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2445,7 +2378,7 @@ fi
SHLIB_LIST=""
echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
-echo "configure:2449: checking if you want to link with the gpm mouse library" >&5
+echo "configure:2382: checking if you want to link with the gpm mouse library" >&5
# Check whether --with-gpm or --without-gpm was given.
if test "${with_gpm+set}" = set; then
@@ -2456,9 +2389,9 @@ else
fi
echo "$ac_t""$with_gpm" 1>&6
-if test $with_gpm = yes ; then
+if test "$with_gpm" = yes ; then
echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:2462: checking for Gpm_Open in -lgpm" >&5
+echo "configure:2395: checking for Gpm_Open in -lgpm" >&5
ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2466,7 +2399,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lgpm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2470 "configure"
+#line 2403 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -2477,7 +2410,7 @@ int main() {
Gpm_Open()
; return 0; }
EOF
-if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -2503,17 +2436,17 @@ EOF
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2507: checking for $ac_hdr" >&5
+echo "configure:2440: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2512 "configure"
+#line 2445 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2561,7 +2494,7 @@ fi
echo $ac_n "checking for default loader flags""... $ac_c" 1>&6
-echo "configure:2565: checking for default loader flags" >&5
+echo "configure:2498: checking for default loader flags" >&5
case $DFT_LWR_MODEL in
normal) LD_MODEL='' ;;
debug) LD_MODEL=$CC_G_OPT ;;
@@ -2571,7 +2504,7 @@ esac
echo "$ac_t""$LD_MODEL" 1>&6
echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
-echo "configure:2575: checking if rpath option should be used" >&5
+echo "configure:2508: checking if rpath option should be used" >&5
# Check whether --enable-rpath or --disable-rpath was given.
if test "${enable_rpath+set}" = set; then
@@ -2593,7 +2526,7 @@ echo "$ac_t""$cf_cv_ld_rpath" 1>&6
cf_cv_do_symlinks=no
echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6
-echo "configure:2597: checking if release/abi version should be used for shared libs" >&5
+echo "configure:2530: checking if release/abi version should be used for shared libs" >&5
# Check whether --with-shlib-version or --without-shlib-version was given.
if test "${with_shlib_version+set}" = set; then
@@ -2621,23 +2554,23 @@ fi
# Some less-capable ports of gcc support only -fpic
CC_SHARED_OPTS=
- if test -n "$GCC"
+ if test "$GCC" = yes
then
echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6
-echo "configure:2628: checking which $CC option to use" >&5
+echo "configure:2561: checking which $CC option to use" >&5
cf_save_CFLAGS="$CFLAGS"
for CC_SHARED_OPTS in -fPIC -fpic ''
do
CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
cat > conftest.$ac_ext <<EOF
-#line 2634 "configure"
+#line 2567 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
int x = 1
; return 0; }
EOF
-if { (eval echo configure:2641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
break
else
@@ -2654,23 +2587,9 @@ rm -f conftest*
beos*)
MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
;;
- hpux10.*)
- # (tested with gcc 2.7.2 -- I don't have c89)
- if test -n "$GCC"; then
- LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
- else
- CC_SHARED_OPTS='+Z'
- LD_SHARED_OPTS='-Wl,+b,$(libdir)'
- fi
- MK_SHARED_LIB='$(LD) +b $(libdir) -b +h `basename $@` -o $@'
- # HP-UX shared libraries must be executable, and should be
- # readonly to exploit a quirk in the memory manager.
- INSTALL_LIB="-m 555"
- cf_cv_do_symlinks=reverse
- ;;
hpux*)
# (tested with gcc 2.7.2 -- I don't have c89)
- if test -n "$GCC"; then
+ if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
else
CC_SHARED_OPTS='+Z'
@@ -2682,45 +2601,51 @@ rm -f conftest*
INSTALL_LIB="-m 555"
;;
irix*)
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
+ fi
# tested with IRIX 5.2 and 'cc'.
- if test -z "$GCC"; then
+ if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
cf_cv_rm_so_locs=yes
;;
linux*|gnu*)
- # tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
- if test $DFT_LWR_MODEL = "shared" ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
- if test $cf_cv_shlib_version = no ; then
- MK_SHARED_LIB='$(CC) -shared -Wl,-stats,-lc -o $@'
- else
- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)`,-stats,-lc -o $@'
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-Wl,-rpath,"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
;;
openbsd2*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
;;
openbsd*|freebsd*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
MK_SHARED_LIB='$(LD) -Bshareable -o $@'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
netbsd*)
- CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
- if test $DFT_LWR_MODEL = "shared" && test $cf_cv_ld_rpath = yes ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
- MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)` -o $@'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
+ if test "$cf_cv_shlib_version" = auto; then
+ if test ! -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=rel
+ fi
+ fi
else
MK_SHARED_LIB='$(LD) -Bshareable -o $@'
fi
@@ -2730,56 +2655,63 @@ rm -f conftest*
# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
# link with shared libs).
MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
- test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath"
case $host_os in
osf4*)
MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
;;
esac
MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
- if test $DFT_LWR_MODEL = "shared" ; then
- LOCAL_LDFLAGS='-Wl,-rpath,../lib'
- LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
+ cf_ld_rpath_opt="-rpath"
+ # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
cf_cv_rm_so_locs=yes
;;
sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
# tested with osr5.0.5
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-belf -KPIC'
fi
- MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@'
- if test $cf_cv_ld_rpath = yes ; then
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
+ if test "$cf_cv_ld_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
LINK_PROGS='LD_RUN_PATH=$(libdir)'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
sunos4*)
# tested with SunOS 4.1.1 and gcc 2.7.0
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
solaris2*)
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@'
- if test $cf_cv_ld_rpath = yes ; then
+ MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_ld_rpath" = yes ; then
cf_ld_rpath_opt="-R"
- EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS"
+ EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
fi
- test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
sysv5uw7*|unix_sv*)
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
- if test $ac_cv_prog_gcc != yes; then
+ if test "$ac_cv_prog_gcc" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -d y -G -o $@'
@@ -2795,15 +2727,7 @@ rm -f conftest*
rel|abi)
case "$MK_SHARED_LIB" in #(vi
*'-o $@')
- if test "$cf_cv_do_symlinks" = reverse ; then
- { echo "configure: error: cannot use --with-shlib-version with this platform" 1>&2; exit 1; }
- fi
- if test "$cf_cv_shlib_version" = rel ; then
- MK_SHARED_LIB="$MK_SHARED_LIB"'.$(REL_VERSION)'
- else
- MK_SHARED_LIB="$MK_SHARED_LIB"'.$(ABI_VERSION)'
- fi
- cf_cv_do_symlinks=yes
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
*)
echo "configure: warning: ignored --with-shlib-version" 1>&2
@@ -2814,18 +2738,18 @@ rm -f conftest*
if test -n "$cf_ld_rpath_opt" ; then
echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
-echo "configure:2818: checking if we need a space after rpath option" >&5
+echo "configure:2742: checking if we need a space after rpath option" >&5
cf_save_LIBS="$LIBS"
- LIBS="$LIBS ${cf_ld_rpath_opt}/usr/lib"
+ LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
cat > conftest.$ac_ext <<EOF
-#line 2822 "configure"
+#line 2746 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_rpath_space=no
else
@@ -2837,7 +2761,7 @@ fi
rm -f conftest*
LIBS="$cf_save_LIBS"
echo "$ac_t""$cf_rpath_space" 1>&6
- test $cf_rpath_space = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
+ test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
fi
@@ -2864,7 +2788,7 @@ fi
### use option --disable-overwrite to leave out the link to -lcurses
echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
-echo "configure:2868: checking if you wish to install ncurses overwriting curses" >&5
+echo "configure:2792: checking if you wish to install ncurses overwriting curses" >&5
# Check whether --enable-overwrite or --disable-overwrite was given.
if test "${enable_overwrite+set}" = set; then
@@ -2877,24 +2801,47 @@ fi
echo "$ac_t""$with_overwrite" 1>&6
echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
-echo "configure:2881: checking if external terminfo-database is used" >&5
+echo "configure:2805: checking if external terminfo-database is used" >&5
# Check whether --enable-database or --disable-database was given.
if test "${enable_database+set}" = set; then
enableval="$enable_database"
- with_database=$enableval
+ use_database=$enableval
else
- with_database=yes
+ use_database=yes
fi
-echo "$ac_t""$with_database" 1>&6
-test $with_database != no && cat >> confdefs.h <<\EOF
+echo "$ac_t""$use_database" 1>&6
+
+case $host_os in #(vi
+os2*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/emx.src'
+ ;;
+*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
+ ;;
+esac
+
+
+if test "$use_database" != no ; then
+ cat >> confdefs.h <<\EOF
#define USE_DATABASE 1
EOF
+ echo $ac_n "checking which terminfo source-file will be installed""... $ac_c" 1>&6
+echo "configure:2833: checking which terminfo source-file will be installed" >&5
+
+# Check whether --enable-database or --disable-database was given.
+if test "${enable_database+set}" = set; then
+ enableval="$enable_database"
+ TERMINFO_SRC=$withval
+fi
+
+ echo "$ac_t""$TERMINFO_SRC" 1>&6
+fi
echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
-echo "configure:2898: checking for list of fallback descriptions" >&5
+echo "configure:2845: checking for list of fallback descriptions" >&5
# Check whether --with-fallbacks or --without-fallbacks was given.
if test "${with_fallbacks+set}" = set; then
@@ -2908,8 +2855,15 @@ echo "$ac_t""$with_fallback" 1>&6
FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
+if test "$use_database" = no ; then
+ if test -z $with_fallback ; then
+ { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
+ fi
+ TERMINFO="${datadir}/terminfo"
+else
+
echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6
-echo "configure:2913: checking for list of terminfo directories" >&5
+echo "configure:2867: checking for list of terminfo directories" >&5
# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
@@ -2959,16 +2913,54 @@ test -n "$TERMINFO_DIRS" && cat >> confdefs.h <<EOF
EOF
-if test $with_database = no ; then
- if test -z $with_fallback ; then
- { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
- fi
+echo $ac_n "checking for default terminfo directory""... $ac_c" 1>&6
+echo "configure:2918: checking for default terminfo directory" >&5
+
+# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
+if test "${with_default_terminfo_dir+set}" = set; then
+ withval="$with_default_terminfo_dir"
+ :
+else
+ withval="${TERMINFO-${datadir}/terminfo}"
+fi
+
+case ".$withval" in #(vi
+./*) #(vi
+ ;;
+.a-zA-Z:\\/*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*) #(vi
+ eval withval="$withval"
+ case ".$withval" in #(vi
+ .NONE/*)
+ withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
+ ;;
+ esac
+ ;; #(vi
+.NONE/*)
+ withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
+ ;;
+*)
+ { echo "configure: error: expected a pathname" 1>&2; exit 1; }
+ ;;
+esac
+
+eval TERMINFO="$withval"
+
+echo "$ac_t""$TERMINFO" 1>&6
+cat >> confdefs.h <<EOF
+#define TERMINFO "$TERMINFO"
+EOF
+
+
fi
+
+
### use option --disable-big-core to make tic run on small machines
### We need 4Mb, check if we can allocate 50% more than that.
echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
-echo "configure:2972: checking if big-core option selected" >&5
+echo "configure:2964: checking if big-core option selected" >&5
# Check whether --enable-big-core or --disable-big-core was given.
if test "${enable_big_core+set}" = set; then
@@ -2979,14 +2971,20 @@ else
with_big_core=no
else
cat > conftest.$ac_ext <<EOF
-#line 2983 "configure"
+#line 2975 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <string.h>
-int main() { exit(malloc(6000000L) == 0); }
+int main() {
+ unsigned long n = 6000000L;
+ char *s = malloc(n);
+ if (s != 0)
+ s[0] = s[n-1] = 0;
+ exit(s == 0);
+}
EOF
-if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
with_big_core=yes
else
@@ -3008,7 +3006,7 @@ EOF
### use option --enable-termcap to compile in the termcap fallback support
echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
-echo "configure:3012: checking if you want termcap-fallback support" >&5
+echo "configure:3010: checking if you want termcap-fallback support" >&5
# Check whether --enable-termcap or --disable-termcap was given.
if test "${enable_termcap+set}" = set; then
@@ -3029,7 +3027,7 @@ else
### use option --enable-getcap to use a hacked getcap for reading termcaps
echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
-echo "configure:3033: checking if fast termcap-loader is needed" >&5
+echo "configure:3031: checking if fast termcap-loader is needed" >&5
# Check whether --enable-getcap or --disable-getcap was given.
if test "${enable_getcap+set}" = set; then
@@ -3046,7 +3044,7 @@ EOF
echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
-echo "configure:3050: checking if translated termcaps will be cached in ~/.terminfo" >&5
+echo "configure:3048: checking if translated termcaps will be cached in ~/.terminfo" >&5
# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
if test "${enable_getcap_cache+set}" = set; then
@@ -3072,12 +3070,12 @@ for ac_func in \
unlink
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3076: checking for $ac_func" >&5
+echo "configure:3074: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3081 "configure"
+#line 3079 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3100,7 +3098,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3131,12 +3129,12 @@ if test "$ac_cv_prog_cc_cross" = yes ; then
symlink
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3135: checking for $ac_func" >&5
+echo "configure:3133: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3140 "configure"
+#line 3138 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3159,7 +3157,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3185,7 +3183,7 @@ done
else
echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6
-echo "configure:3189: checking if link/symlink functions work" >&5
+echo "configure:3187: checking if link/symlink functions work" >&5
if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3197,7 +3195,7 @@ else
eval 'ac_cv_func_'$cf_func'=error'
else
cat > conftest.$ac_ext <<EOF
-#line 3201 "configure"
+#line 3199 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -3226,18 +3224,11 @@ int main()
}
EOF
-if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
eval 'ac_cv_func_'$cf_func'=yes'
-
-cf_FUNC=`echo $cf_func | tr '[a-z]' '[A-Z]'`
-
- cat >> confdefs.h <<EOF
-#define HAVE_$cf_FUNC 1
-EOF
-
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
@@ -3254,6 +3245,14 @@ fi
fi
echo "$ac_t""$cf_cv_link_funcs" 1>&6
+ test "$ac_cv_func_link" = yes && cat >> confdefs.h <<\EOF
+#define HAVE_LINK 1
+EOF
+
+ test "$ac_cv_func_symlink" = yes && cat >> confdefs.h <<\EOF
+#define HAVE_SYMLINK 1
+EOF
+
fi
@@ -3262,7 +3261,7 @@ with_symlinks=no
if test "$ac_cv_func_link" != yes ; then
echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
-echo "configure:3266: checking if tic should use symbolic links" >&5
+echo "configure:3265: checking if tic should use symbolic links" >&5
if test "$ac_cv_func_symlink" = yes ; then
with_symlinks=yes
else
@@ -3271,7 +3270,7 @@ echo "configure:3266: checking if tic should use symbolic links" >&5
echo "$ac_t""$with_symlinks" 1>&6
elif test "$ac_cv_func_symlink" != yes ; then
echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
-echo "configure:3275: checking if tic should use hard links" >&5
+echo "configure:3274: checking if tic should use hard links" >&5
if test "$ac_cv_func_link" = yes ; then
with_links=yes
else
@@ -3280,7 +3279,7 @@ echo "configure:3275: checking if tic should use hard links" >&5
echo "$ac_t""$with_links" 1>&6
else
echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
-echo "configure:3284: checking if tic should use symbolic links" >&5
+echo "configure:3283: checking if tic should use symbolic links" >&5
# Check whether --enable-symlinks or --disable-symlinks was given.
if test "${enable_symlinks+set}" = set; then
@@ -3304,7 +3303,7 @@ EOF
### use option --enable-broken-linker to force on use of broken-linker support
echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6
-echo "configure:3308: checking if you want broken-linker support code" >&5
+echo "configure:3307: checking if you want broken-linker support code" >&5
# Check whether --enable-broken_linker or --disable-broken_linker was given.
if test "${enable_broken_linker+set}" = set; then
@@ -3322,7 +3321,7 @@ EOF
### use option --enable-bsdpad to have tputs process BSD-style prefix padding
echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
-echo "configure:3326: checking if tputs should process BSD-style prefix padding" >&5
+echo "configure:3325: checking if tputs should process BSD-style prefix padding" >&5
# Check whether --enable-bsdpad or --disable-bsdpad was given.
if test "${enable_bsdpad+set}" = set; then
@@ -3340,7 +3339,7 @@ EOF
### Enable compiling-in rcs id's
echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
-echo "configure:3344: checking if RCS identifiers should be compiled-in" >&5
+echo "configure:3343: checking if RCS identifiers should be compiled-in" >&5
# Check whether --with-rcs-ids or --without-rcs-ids was given.
if test "${with_rcs_ids+set}" = set; then
@@ -3359,9 +3358,326 @@ EOF
###############################################################################
+ echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
+echo "configure:3363: checking format of man-pages" >&5
+
+
+# Check whether --with-manpage-format or --without-manpage-format was given.
+if test "${with_manpage_format+set}" = set; then
+ withval="$with_manpage_format"
+ cf_manpage_form=$withval
+else
+ cf_manpage_form=unknown
+fi
+
+
+case ".$cf_manpage_form" in
+.gzip|.compress|.BSDI|.normal|.formatted) # (vi
+ ;;
+.unknown|.) # (vi
+ if test -z "$MANPATH" ; then
+ MANPATH="/usr/man:/usr/share/man"
+ fi
+ # look for the 'date' man-page (it's most likely to be installed!)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ cf_manpage_form=unknown
+ for cf_dir in $MANPATH; do
+ test -z "$cf_dir" && cf_dir=/usr/man
+ for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
+ do
+ cf_test=`echo $cf_name | sed -e 's/*//'`
+ if test "x$cf_test" = "x$cf_name" ; then
+ case "$cf_name" in
+ *.gz) cf_manpage_form=gzip;;
+ *.Z) cf_manpage_form=compress;;
+ *.0) cf_manpage_form=BSDI,formatted;;
+ *) cf_manpage_form=normal;;
+ esac
+ break
+ fi
+ done
+ if test "$cf_manpage_form" != "unknown" ; then
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ ;;
+.*) # (vi
+ echo "configure: warning: Unexpected manpage-format" 1>&2
+ ;;
+esac
+
+echo "$ac_t""$cf_manpage_form" 1>&6
+
+
+echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
+echo "configure:3415: checking for manpage renaming" >&5
+
+
+# Check whether --with-manpage-renames or --without-manpage-renames was given.
+if test "${with_manpage_renames+set}" = set; then
+ withval="$with_manpage_renames"
+ cf_manpage_renames=$withval
+else
+ cf_manpage_renames=yes
+fi
+
+
+case ".$cf_manpage_renames" in #(vi
+.no) #(vi
+ ;;
+.|.yes)
+ # Debian 'man' program?
+ if test -f /etc/debian_version ; then
+ cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames
+ else
+ cf_manpage_renames=no
+ fi
+ ;;
+esac
+
+if test "$cf_manpage_renames" != no ; then
+ if test ! -f $cf_manpage_renames ; then
+ { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; }
+ fi
+
+ test ! -d man && mkdir man
+
+ # Construct a sed-script to perform renaming within man-pages
+ if test -n "$cf_manpage_renames" ; then
+ test ! -d man && mkdir man
+ $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed
+ fi
+fi
+
+echo "$ac_t""$cf_manpage_renames" 1>&6
+
+
+echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
+echo "configure:3458: checking for manpage symlinks" >&5
+
+
+# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
+if test "${with_manpage_symlinks+set}" = set; then
+ withval="$with_manpage_symlinks"
+ cf_manpage_symlinks=$withval
+else
+ cf_manpage_symlinks=yes
+fi
+
+
+echo "$ac_t""$cf_manpage_symlinks" 1>&6
+
+
+ if test "$prefix" = "NONE" ; then
+ cf_prefix="$ac_default_prefix"
+ else
+ cf_prefix="$prefix"
+ fi
+
+ case "$cf_manpage_form" in # (vi
+ *formatted*) # (vi
+ cf_subdir='$mandir/cat'
+ cf_format=yes
+ ;;
+ *)
+ cf_subdir='$mandir/man'
+ cf_format=no
+ ;;
+ esac
+
+test ! -d man && mkdir man
+cat >man/edit_man.sh <<CF_EOF
+#! /bin/sh
+# this script is generated by the configure-script
+prefix="$cf_prefix"
+datadir="$datadir"
+TERMINFO="$TERMINFO"
+MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
+INSTALL="$INSTALL"
+INSTALL_DATA="$INSTALL_DATA"
+transform="$program_transform_name"
+
+TMP=\${TMPDIR-/tmp}/man\$\$
+trap "rm -f \$TMP" 0 1 2 5 15
+
+verb=\$1
+shift
+
+mandir=\$1
+shift
+
+srcdir=\$1
+shift
+
+for i in \$* ; do
+case \$i in #(vi
+*.orig|*.rej) ;; #(vi
+*.[0-9]*)
+ section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
+ if test \$verb = installing ; then
+ if test ! -d $cf_subdir\${section} ; then
+ \$MKDIRS $cf_subdir\$section
+ fi
+ fi
+ aliases=
+ source=\`basename \$i\`
+ inalias=\$source
+ test ! -f \$inalias && inalias="\$srcdir/\$inalias"
+ if test ! -f \$inalias ; then
+ echo .. skipped \$source
+ continue
+ fi
+CF_EOF
+if test "$cf_manpage_symlinks" = yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
+CF_EOF
+fi
+if test "$cf_manpage_renames" = no ; then
+cat >>man/edit_man.sh <<CF_EOF
+ # perform program transformations for section 1 man pages
+ if test \$section = 1 ; then
+ target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
+ else
+ target=$cf_subdir\${section}/\$source
+ fi
+
+ # replace variables in man page
+CF_EOF
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+cat >>man/edit_man.sh <<CF_EOF
+ prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
+CF_EOF
+ done
+
+cat >>man/edit_man.sh <<CF_EOF
+ sed -e "s,@DATADIR@,\$datadir," \\
+ -e "s,@TERMINFO@,\$TERMINFO," \\
+CF_EOF
+
+ for cf_name in captoinfo clear infocmp infotocap tic toe tput
+ do
+ cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+cat >>man/edit_man.sh <<CF_EOF
+ -e "s,@$cf_NAME@,\$prog_$cf_name," \\
+CF_EOF
+ done
+
+cat >>man/edit_man.sh <<CF_EOF
+ < \$i >\$TMP
+CF_EOF
+else
+cat >>man/edit_man.sh <<CF_EOF
+ target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
+ if test -z "\$target" ; then
+ echo '? missing rename for '\$source
+ target="\$source"
+ fi
+ target="$cf_subdir\$section/\$target"
+ test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
+CF_EOF
+fi
+if test $cf_format = yes ; then
+cat >>man/edit_man.sh <<CF_EOF
+ nroff -man \$TMP >\$TMP.out
+ mv \$TMP.out \$TMP
+CF_EOF
+fi
+case "$cf_manpage_form" in #(vi
+*compress*) #(vi
+cat >>man/edit_man.sh <<CF_EOF
+ if test \$verb = installing ; then
+ if ( compress -f \$TMP )
+ then
+ mv \$TMP.Z \$TMP
+ fi
+ fi
+ target="\$target.Z"
+CF_EOF
+ ;;
+*gzip*) #(vi
+cat >>man/edit_man.sh <<CF_EOF
+ if test \$verb = installing ; then
+ if ( gzip -f \$TMP )
+ then
+ mv \$TMP.gz \$TMP
+ fi
+ fi
+ target="\$target.gz"
+CF_EOF
+ ;;
+*BSDI*)
+cat >>man/edit_man.sh <<CF_EOF
+ # BSDI installs only .0 suffixes in the cat directories
+ target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
+CF_EOF
+ ;;
+esac
+cat >>man/edit_man.sh <<CF_EOF
+ echo \$verb \$target
+ suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
+ if test \$verb = installing ; then
+ \$INSTALL_DATA \$TMP \$target
+ test -n "\$aliases" && (
+ cd $cf_subdir\${section} && (
+ target=\`basename \$target\`
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ if test -f \$cf_alias\${suffix} ; then
+ if ( cmp -s \$target \$cf_alias\${suffix} )
+ then
+ :
+ else
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ fi
+ else
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ $LN_S \$target \$cf_alias\${suffix}
+ fi
+ done
+ )
+ )
+ else
+ rm -f \$target
+ test -n "\$aliases" && (
+ cd $cf_subdir\${section} && (
+ for cf_alias in \$aliases
+ do
+ if test \$section = 1 ; then
+ cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
+ fi
+
+ echo .. \$verb alias \$cf_alias\${suffix}
+ rm -f \$cf_alias\${suffix}
+ done
+ )
+ )
+ fi
+ ;;
+esac
+done
+exit 0
+CF_EOF
+chmod 755 man/edit_man.sh
+
+
+
+###############################################################################
+
+
### Note that some functions (such as const) are normally disabled anyway.
echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
-echo "configure:3365: checking if you want to build with function extensions" >&5
+echo "configure:3681: checking if you want to build with function extensions" >&5
# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
if test "${enable_ext_funcs+set}" = set; then
@@ -3374,6 +3690,10 @@ fi
echo "$ac_t""$with_ext_funcs" 1>&6
if test "$with_ext_funcs" = yes ; then
cat >> confdefs.h <<\EOF
+#define HAVE_CURSES_VERSION 1
+EOF
+
+ cat >> confdefs.h <<\EOF
#define HAVE_HAS_KEY 1
EOF
@@ -3397,7 +3717,7 @@ fi
### use option --enable-const to turn on use of const beyond that in XSI.
echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
-echo "configure:3401: checking for extended use of const keyword" >&5
+echo "configure:3721: checking for extended use of const keyword" >&5
# Check whether --enable-const or --disable-const was given.
if test "${enable_const+set}" = set; then
@@ -3408,36 +3728,14 @@ else
fi
echo "$ac_t""$with_ext_const" 1>&6
-NCURSES_CONST=""
+NCURSES_CONST='/*nothing*/'
if test "$with_ext_const" = yes ; then
- cat >> confdefs.h <<\EOF
-#define NCURSES_CONST const
-EOF
-
NCURSES_CONST=const
fi
-### use option --enable-hashmap to turn on use of hashmap scrolling logic
-echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
-echo "configure:3424: checking if you want hashmap scrolling-optimization code" >&5
-
-# Check whether --enable-hashmap or --disable-hashmap was given.
-if test "${enable_hashmap+set}" = set; then
- enableval="$enable_hashmap"
- with_hashmap=$enableval
-else
- with_hashmap=yes
-fi
-
-echo "$ac_t""$with_hashmap" 1>&6
-test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
-#define USE_HASHMAP 1
-EOF
-
-
echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6
-echo "configure:3441: checking if you want \$NCURSES_NO_PADDING code" >&5
+echo "configure:3739: checking if you want \$NCURSES_NO_PADDING code" >&5
# Check whether --enable-no-padding or --disable-no-padding was given.
if test "${enable_no_padding+set}" = set; then
@@ -3455,7 +3753,7 @@ EOF
### use option --enable-sigwinch to turn on use of SIGWINCH logic
echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6
-echo "configure:3459: checking if you want SIGWINCH handler" >&5
+echo "configure:3757: checking if you want SIGWINCH handler" >&5
# Check whether --enable-sigwinch or --disable-sigwinch was given.
if test "${enable_sigwinch+set}" = set; then
@@ -3473,7 +3771,7 @@ EOF
### use option --enable-tcap-names to allow user to define new capabilities
echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6
-echo "configure:3477: checking if you want user-definable terminal capabilities like termcap" >&5
+echo "configure:3775: checking if you want user-definable terminal capabilities like termcap" >&5
# Check whether --enable-tcap-names or --disable-tcap-names was given.
if test "${enable_tcap_names+set}" = set; then
@@ -3489,9 +3787,10 @@ test "$with_tcap_names" = yes && NCURSES_XNAMES=1
###############################################################################
+# These options are relatively safe to experiment with.
-echo $ac_n "checking if you want all experimental code""... $ac_c" 1>&6
-echo "configure:3495: checking if you want all experimental code" >&5
+echo $ac_n "checking if you want all development code""... $ac_c" 1>&6
+echo "configure:3794: checking if you want all development code" >&5
# Check whether --with-develop or --without-develop was given.
if test "${with_develop+set}" = set; then
@@ -3504,8 +3803,8 @@ fi
echo "$ac_t""$with_develop" 1>&6
### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
-echo $ac_n "checking if you want experimental colorfgbg code""... $ac_c" 1>&6
-echo "configure:3509: checking if you want experimental colorfgbg code" >&5
+echo $ac_n "checking if you want colorfgbg code""... $ac_c" 1>&6
+echo "configure:3808: checking if you want colorfgbg code" >&5
# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
if test "${enable_hard_tabs+set}" = set; then
@@ -3522,8 +3821,8 @@ EOF
### use option --enable-hard-tabs to turn on use of hard-tabs optimize
-echo $ac_n "checking if you want experimental hard-tabs code""... $ac_c" 1>&6
-echo "configure:3527: checking if you want experimental hard-tabs code" >&5
+echo $ac_n "checking if you want hard-tabs code""... $ac_c" 1>&6
+echo "configure:3826: checking if you want hard-tabs code" >&5
# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
if test "${enable_hard_tabs+set}" = set; then
@@ -3539,8 +3838,82 @@ test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF
EOF
+echo $ac_n "checking if you want to use restrict environment when running as root""... $ac_c" 1>&6
+echo "configure:3843: checking if you want to use restrict environment when running as root" >&5
+
+# Check whether --enable-root-environ or --disable-root-environ was given.
+if test "${enable_root_environ+set}" = set; then
+ enableval="$enable_root_environ"
+ with_root_environ=$enableval
+else
+ with_root_environ=yes
+fi
+
+echo "$ac_t""$with_root_environ" 1>&6
+test "$with_root_environ" = yes && cat >> confdefs.h <<\EOF
+#define USE_ROOT_ENVIRON 1
+EOF
+
+
+### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
+echo $ac_n "checking if you want limited support for xmc""... $ac_c" 1>&6
+echo "configure:3861: checking if you want limited support for xmc" >&5
+
+# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
+if test "${enable_xmc_glitch+set}" = set; then
+ enableval="$enable_xmc_glitch"
+ with_xmc_glitch=$enableval
+else
+ with_xmc_glitch=$with_develop
+fi
+
+echo "$ac_t""$with_xmc_glitch" 1>&6
+test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
+#define USE_XMC_SUPPORT 1
+EOF
+
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+
+
+echo $ac_n "checking if you do not want to assume colors are white-on-black""... $ac_c" 1>&6
+echo "configure:3882: checking if you do not want to assume colors are white-on-black" >&5
+
+# Check whether --enable-assumed-color or --disable-assumed-color was given.
+if test "${enable_assumed_color+set}" = set; then
+ enableval="$enable_assumed_color"
+ with_assumed_color=$enableval
+else
+ with_assumed_color=yes
+fi
+
+echo "$ac_t""$with_assumed_color" 1>&6
+test "$with_assumed_color" = yes && cat >> confdefs.h <<\EOF
+#define USE_ASSUMED_COLOR 1
+EOF
+
+
+### use option --enable-hashmap to turn on use of hashmap scrolling logic
+echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
+echo "configure:3900: checking if you want hashmap scrolling-optimization code" >&5
+
+# Check whether --enable-hashmap or --disable-hashmap was given.
+if test "${enable_hashmap+set}" = set; then
+ enableval="$enable_hashmap"
+ with_hashmap=$enableval
+else
+ with_hashmap=yes
+fi
+
+echo "$ac_t""$with_hashmap" 1>&6
+test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
+#define USE_HASHMAP 1
+EOF
+
+
echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
-echo "configure:3544: checking if you want experimental safe-sprintf code" >&5
+echo "configure:3917: checking if you want experimental safe-sprintf code" >&5
# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
if test "${enable_safe_sprintf+set}" = set; then
@@ -3560,7 +3933,7 @@ EOF
# when hashmap is used scroll hints are useless
if test "$with_hashmap" = no ; then
echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
-echo "configure:3564: checking if you want to experiment without scrolling-hints code" >&5
+echo "configure:3937: checking if you want to experiment without scrolling-hints code" >&5
# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
if test "${enable_scroll_hints+set}" = set; then
@@ -3579,7 +3952,7 @@ fi
### use option --enable-widec to turn on use of wide-character support
echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
-echo "configure:3583: checking if you want experimental wide-character code" >&5
+echo "configure:3956: checking if you want experimental wide-character code" >&5
# Check whether --enable-widec or --disable-widec was given.
if test "${enable_widec+set}" = set; then
@@ -3598,28 +3971,12 @@ EOF
fi
-### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
-echo $ac_n "checking if you want experimental xmc code""... $ac_c" 1>&6
-echo "configure:3604: checking if you want experimental xmc code" >&5
-
-# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
-if test "${enable_xmc_glitch+set}" = set; then
- enableval="$enable_xmc_glitch"
- with_xmc_glitch=$enableval
-else
- with_xmc_glitch=$with_develop
-fi
-
-echo "$ac_t""$with_xmc_glitch" 1>&6
-test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
-#define USE_XMC_SUPPORT 1
-EOF
-
-
###############################################################################
### use option --disable-echo to suppress full display compiling commands
+echo $ac_n "checking if you want to display full commands during build""... $ac_c" 1>&6
+echo "configure:3980: checking if you want to display full commands during build" >&5
# Check whether --enable-echo or --disable-echo was given.
if test "${enable_echo+set}" = set; then
@@ -3634,9 +3991,12 @@ if test "$with_echo" = yes; then
else
ECHO_LINK='@ echo linking $@ ... ;'
fi
+echo "$ac_t""$with_echo" 1>&6
### use option --enable-warnings to turn on all gcc warnings
+echo $ac_n "checking if you want to see compiler warnings""... $ac_c" 1>&6
+echo "configure:4000: checking if you want to see compiler warnings" >&5
# Check whether --enable-warnings or --disable-warnings was given.
if test "${enable_warnings+set}" = set; then
@@ -3647,14 +4007,14 @@ fi
if test -n "$with_warnings"; then
ADAFLAGS="$ADAFLAGS -gnatg"
-if test -n "$GCC"
+if test "$GCC" = yes
then
cat > conftest.$ac_ext <<EOF
-#line 3654 "configure"
+#line 4014 "configure"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
echo "checking for $CC warning options" 1>&6
-echo "configure:3658: checking for $CC warning options" >&5
+echo "configure:4018: checking for $CC warning options" >&5
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-W -Wall"
cf_warn_CONST=""
@@ -3672,7 +4032,7 @@ echo "configure:3658: checking for $CC warning options" >&5
Wstrict-prototypes $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo configure:3676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
@@ -3684,8 +4044,9 @@ fi
fi
+echo "$ac_t""$with_warnings" 1>&6
-if test -n "$GCC"
+if test "$GCC" = yes
then
cat > conftest.i <<EOF
#ifndef GCC_PRINTF
@@ -3701,12 +4062,12 @@ cat > conftest.i <<EOF
#define GCC_UNUSED /* nothing */
#endif
EOF
-if test -n "$GCC"
+if test "$GCC" = yes
then
echo "checking for $CC __attribute__ directives" 1>&6
-echo "configure:3708: checking for $CC __attribute__ directives" >&5
+echo "configure:4069: checking for $CC __attribute__ directives" >&5
cat > conftest.$ac_ext <<EOF
-#line 3710 "configure"
+#line 4071 "configure"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -3728,7 +4089,7 @@ EOF
for cf_attribute in scanf printf unused noreturn
do
-CF_ATTRIBUTE=`echo $cf_attribute | tr '[a-z]' '[A-Z]'`
+CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&5
@@ -3744,7 +4105,7 @@ EOF
EOF
;;
esac
- if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
cat conftest.h >>confdefs.h
# else
@@ -3759,6 +4120,8 @@ fi
### use option --enable-assertions to turn on generation of assertion code
+echo $ac_n "checking if you want to enable runtime assertions""... $ac_c" 1>&6
+echo "configure:4125: checking if you want to enable runtime assertions" >&5
# Check whether --enable-assertions or --disable-assertions was given.
if test "${enable_assertions+set}" = set; then
@@ -3768,9 +4131,10 @@ else
with_assertions=no
fi
+echo "$ac_t""$with_assertions" 1>&6
if test -n "$GCC"
then
- if test $with_assertions = no
+ if test "$with_assertions" = no
then
cat >> confdefs.h <<\EOF
#define NDEBUG 1
@@ -3787,7 +4151,7 @@ fi
# Check whether --enable-leaks or --disable-leaks was given.
if test "${enable_leaks+set}" = set; then
enableval="$enable_leaks"
- test $enableval = no && cat >> confdefs.h <<\EOF
+ test "$enableval" = no && cat >> confdefs.h <<\EOF
#define NO_LEAKS 1
EOF
@@ -3803,7 +4167,7 @@ EOF
# Check whether --enable-expanded or --disable-expanded was given.
if test "${enable_expanded+set}" = set; then
enableval="$enable_expanded"
- test $enableval = yes && cat >> confdefs.h <<\EOF
+ test "$enableval" = yes && cat >> confdefs.h <<\EOF
#define NCURSES_EXPANDED 1
EOF
@@ -3815,7 +4179,7 @@ fi
# Check whether --enable-macros or --disable-macros was given.
if test "${enable_macros+set}" = set; then
enableval="$enable_macros"
- test $enableval = no && cat >> confdefs.h <<\EOF
+ test "$enableval" = no && cat >> confdefs.h <<\EOF
#define NCURSES_NOMACROS 1
EOF
@@ -3824,12 +4188,12 @@ fi
### Checks for libraries.
echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
-echo "configure:3828: checking for gettimeofday" >&5
+echo "configure:4192: checking for gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3833 "configure"
+#line 4197 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gettimeofday(); below. */
@@ -3852,7 +4216,7 @@ gettimeofday();
; return 0; }
EOF
-if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gettimeofday=yes"
else
@@ -3875,7 +4239,7 @@ else
echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
-echo "configure:3879: checking for gettimeofday in -lbsd" >&5
+echo "configure:4243: checking for gettimeofday in -lbsd" >&5
ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3883,7 +4247,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbsd $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3887 "configure"
+#line 4251 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3894,7 +4258,7 @@ int main() {
gettimeofday()
; return 0; }
EOF
-if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3922,13 +4286,13 @@ fi
echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6
-echo "configure:3926: checking if -lm needed for math functions" >&5
+echo "configure:4290: checking if -lm needed for math functions" >&5
if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3932 "configure"
+#line 4296 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3938,7 +4302,7 @@ int main() {
double x = rand(); printf("result = %g\n", sin(x))
; return 0; }
EOF
-if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_need_libm=no
else
@@ -3960,12 +4324,12 @@ fi
### Checks for header files.
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:3964: checking for ANSI C header files" >&5
+echo "configure:4328: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3969 "configure"
+#line 4333 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3973,7 +4337,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3990,7 +4354,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 3994 "configure"
+#line 4358 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -4008,7 +4372,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 4012 "configure"
+#line 4376 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -4029,7 +4393,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 4033 "configure"
+#line 4397 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -4040,7 +4404,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -4068,12 +4432,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:4072: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4436: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4077 "configure"
+#line 4441 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4081,7 +4445,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4106,7 +4470,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4110: checking for opendir in -ldir" >&5
+echo "configure:4474: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4114,7 +4478,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4118 "configure"
+#line 4482 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4125,7 +4489,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4147,7 +4511,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4151: checking for opendir in -lx" >&5
+echo "configure:4515: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4155,7 +4519,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4159 "configure"
+#line 4523 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4166,7 +4530,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4190,13 +4554,13 @@ fi
echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6
-echo "configure:4194: checking for regular-expression headers" >&5
+echo "configure:4558: checking for regular-expression headers" >&5
if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4200 "configure"
+#line 4564 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <regex.h>
@@ -4209,7 +4573,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regex.h"
else
@@ -4218,7 +4582,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 4222 "configure"
+#line 4586 "configure"
#include "confdefs.h"
#include <regexp.h>
int main() {
@@ -4228,7 +4592,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regexp.h"
else
@@ -4239,7 +4603,7 @@ else
cf_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4243 "configure"
+#line 4607 "configure"
#include "confdefs.h"
#include <regexpr.h>
int main() {
@@ -4249,7 +4613,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_regex="regexpr.h"
else
@@ -4297,25 +4661,23 @@ sys/poll.h \
sys/select.h \
sys/time.h \
sys/times.h \
-termio.h \
-termios.h \
ttyent.h \
unistd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4309: checking for $ac_hdr" >&5
+echo "configure:4671: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4314 "configure"
+#line 4676 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4346,7 +4708,7 @@ done
# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
if test "$ISC" = yes ; then
echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6
-echo "configure:4350: checking for main in -lcposix" >&5
+echo "configure:4712: checking for main in -lcposix" >&5
ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4354,14 +4716,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4358 "configure"
+#line 4720 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4389,7 +4751,7 @@ else
fi
echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6
-echo "configure:4393: checking for bzero in -linet" >&5
+echo "configure:4755: checking for bzero in -linet" >&5
ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4397,7 +4759,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-linet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4401 "configure"
+#line 4763 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4408,7 +4770,7 @@ int main() {
bzero()
; return 0; }
EOF
-if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4427,64 +4789,24 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
else
echo "$ac_t""no" 1>&6
fi
- for ac_hdr in sys/termio.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4435: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4440 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
fi
echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
-echo "configure:4475: checking if sys/time.h works with sys/select.h" >&5
+echo "configure:4797: checking if sys/time.h works with sys/select.h" >&5
if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4481 "configure"
+#line 4803 "configure"
#include "confdefs.h"
#include <sys/types.h>
-#if HAVE_SYS_TIME_H
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#if HAVE_SYS_SELECT_H
+#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
@@ -4492,7 +4814,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_sys_time_select=yes
else
@@ -4506,7 +4828,7 @@ rm -f conftest*
fi
echo "$ac_t""$cf_cv_sys_time_select" 1>&6
-test $cf_cv_sys_time_select = yes && cat >> confdefs.h <<\EOF
+test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
#define HAVE_SYS_TIME_SELECT 1
EOF
@@ -4521,12 +4843,12 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4525: checking for working const" >&5
+echo "configure:4847: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4530 "configure"
+#line 4852 "configure"
#include "confdefs.h"
int main() {
@@ -4575,7 +4897,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -4596,21 +4918,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:4600: checking for inline" >&5
+echo "configure:4922: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 4607 "configure"
+#line 4929 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:4614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4936: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -4635,27 +4957,27 @@ EOF
;;
esac
-test $ac_cv_c_inline != no && cat >> confdefs.h <<\EOF
+test "$ac_cv_c_inline" != no && cat >> confdefs.h <<\EOF
#define CC_HAS_INLINE_FUNCS 1
EOF
echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6
-echo "configure:4646: checking if unsigned literals are legal" >&5
+echo "configure:4968: checking if unsigned literals are legal" >&5
if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4652 "configure"
+#line 4974 "configure"
#include "confdefs.h"
int main() {
long x = 1L + 1UL + 1U + 1
; return 0; }
EOF
-if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_unsigned_literals=yes
else
@@ -4673,7 +4995,7 @@ echo "$ac_t""$cf_cv_unsigned_literals" 1>&6
echo $ac_n "checking for type of chtype""... $ac_c" 1>&6
-echo "configure:4677: checking for type of chtype" >&5
+echo "configure:4999: checking for type of chtype" >&5
if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4682,10 +5004,10 @@ else
cf_cv_typeof_chtype=long
else
cat > conftest.$ac_ext <<EOF
-#line 4686 "configure"
+#line 5008 "configure"
#include "confdefs.h"
-#if USE_WIDEC_SUPPORT
+#ifdef USE_WIDEC_SUPPORT
#include <stddef.h> /* we want wchar_t */
#define WANT_BITS 39
#else
@@ -4697,7 +5019,7 @@ int main()
FILE *fp = fopen("cf_test.out", "w");
if (fp != 0) {
char *result = "long";
-#if USE_WIDEC_SUPPORT
+#ifdef USE_WIDEC_SUPPORT
/*
* If wchar_t is smaller than a long, it must be an int or a
* short. We prefer not to use a short anyway.
@@ -4728,7 +5050,7 @@ int main()
}
EOF
-if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_typeof_chtype=`cat cf_test.out`
else
@@ -4761,7 +5083,7 @@ test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6
-echo "configure:4765: checking for number of bits in chtype" >&5
+echo "configure:5087: checking for number of bits in chtype" >&5
if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4770,7 +5092,7 @@ else
cf_cv_shift_limit=32
else
cat > conftest.$ac_ext <<EOF
-#line 4774 "configure"
+#line 5096 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4793,7 +5115,7 @@ int main()
}
EOF
-if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_shift_limit=`cat cf_test.out`
else
@@ -4813,7 +5135,7 @@ echo "$ac_t""$cf_cv_shift_limit" 1>&6
echo $ac_n "checking for width of character-index""... $ac_c" 1>&6
-echo "configure:4817: checking for width of character-index" >&5
+echo "configure:5139: checking for width of character-index" >&5
if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4840,13 +5162,13 @@ echo "$ac_t""$cf_cv_widec_shift" 1>&6
echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
-echo "configure:4844: checking if external errno is declared" >&5
+echo "configure:5166: checking if external errno is declared" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4850 "configure"
+#line 5172 "configure"
#include "confdefs.h"
#ifdef HAVE_STDLIB_H
@@ -4859,7 +5181,7 @@ int main() {
long x = (long) errno
; return 0; }
EOF
-if { (eval echo configure:4863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval 'cf_cv_dcl_'errno'=yes'
else
@@ -4879,7 +5201,7 @@ echo "$ac_t""$cf_result" 1>&6
if test "$cf_result" = no ; then
eval 'cf_result=DECL_'errno
-cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
+cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cat >> confdefs.h <<EOF
#define $cf_result 1
@@ -4890,13 +5212,13 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist
echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
-echo "configure:4894: checking if external errno exists" >&5
+echo "configure:5216: checking if external errno exists" >&5
if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4900 "configure"
+#line 5222 "configure"
#include "confdefs.h"
#undef errno
@@ -4906,7 +5228,7 @@ int main() {
errno = 2
; return 0; }
EOF
-if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval 'cf_cv_have_'errno'=yes'
else
@@ -4925,7 +5247,7 @@ echo "$ac_t""$cf_result" 1>&6
if test "$cf_result" = yes ; then
eval 'cf_result=HAVE_'errno
-cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
+cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cat >> confdefs.h <<EOF
#define $cf_result 1
@@ -4938,23 +5260,23 @@ fi
echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6
-echo "configure:4942: checking if data-only library module links" >&5
+echo "configure:5264: checking if data-only library module links" >&5
if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest.a
cat >conftest.$ac_ext <<EOF
-#line 4949 "configure"
+#line 5271 "configure"
int testdata[3] = { 123, 456, 789 };
EOF
- if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
+ if { (eval echo configure:5274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
mv conftest.o data.o && \
( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
fi
rm -f conftest.$ac_ext data.o
cat >conftest.$ac_ext <<EOF
-#line 4958 "configure"
+#line 5280 "configure"
int testfunc()
{
#if defined(NeXT)
@@ -4967,7 +5289,7 @@ int testfunc()
#endif
}
EOF
- if { (eval echo configure:4971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
mv conftest.o func.o && \
( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
fi
@@ -4979,7 +5301,7 @@ EOF
cf_cv_link_dataonly=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 4983 "configure"
+#line 5305 "configure"
#include "confdefs.h"
int main()
@@ -4989,7 +5311,7 @@ else
}
EOF
-if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_link_dataonly=yes
else
@@ -5006,67 +5328,19 @@ fi
fi
echo "$ac_t""$cf_cv_link_dataonly" 1>&6
-test $cf_cv_link_dataonly = no && cat >> confdefs.h <<\EOF
+test "$cf_cv_link_dataonly" = no && cat >> confdefs.h <<\EOF
#define BROKEN_LINKER 1
EOF
-echo $ac_n "checking for speed_t""... $ac_c" 1>&6
-echo "configure:5017: checking for speed_t" >&5
-OSPEED_INCLUDES=
-cat > conftest.$ac_ext <<EOF
-#line 5020 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-int main() {
-speed_t some_variable = 0
-; return 0; }
-EOF
-if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- OSPEED_TYPE=speed_t
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- OSPEED_TYPE=unsigned
-fi
-rm -f conftest*
-cat > conftest.$ac_ext <<EOF
-#line 5038 "configure"
-#include "confdefs.h"
-#include <termios.h>
-int main() {
-speed_t some_variable = 0
-; return 0; }
-EOF
-if { (eval echo configure:5045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- OSPEED_TYPE=speed_t
- OSPEED_INCLUDES="#include <termios.h>"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-
-
-if test "$OSPEED_TYPE" = "unsigned" ; then
- echo "$ac_t""no" 1>&6
- cat >> confdefs.h <<\EOF
-#define speed_t unsigned
-EOF
-
-else
- echo "$ac_t""yes" 1>&6
-fi
-
-
### Checks for library functions.
for ac_func in \
getcwd \
+getegid \
+geteuid \
getttynam \
+issetugid \
memccpy \
mkstemp \
nanosleep \
@@ -5080,7 +5354,6 @@ sigaction \
sigvec \
strdup \
strstr \
-tcgetattr \
tcgetpgrp \
times \
vfscanf \
@@ -5089,12 +5362,12 @@ vsscanf \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5093: checking for $ac_func" >&5
+echo "configure:5366: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5098 "configure"
+#line 5371 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5117,7 +5390,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5144,13 +5417,13 @@ done
if test "$with_getcap" = "yes" ; then
echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6
-echo "configure:5148: checking for terminal-capability database functions" >&5
+echo "configure:5421: checking for terminal-capability database functions" >&5
if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5154 "configure"
+#line 5427 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5165,7 +5438,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_cgetent=yes
else
@@ -5179,7 +5452,7 @@ rm -f conftest*
fi
echo "$ac_t""$cf_cv_cgetent" 1>&6
-test $cf_cv_cgetent = yes && cat >> confdefs.h <<\EOF
+test "$cf_cv_cgetent" = yes && cat >> confdefs.h <<\EOF
#define HAVE_BSD_CGETENT 1
EOF
@@ -5188,20 +5461,20 @@ fi
echo $ac_n "checking for isascii""... $ac_c" 1>&6
-echo "configure:5192: checking for isascii" >&5
+echo "configure:5465: checking for isascii" >&5
if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5198 "configure"
+#line 5471 "configure"
#include "confdefs.h"
#include <ctype.h>
int main() {
int x = isascii(' ')
; return 0; }
EOF
-if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_have_isascii=yes
else
@@ -5214,17 +5487,17 @@ rm -f conftest*
fi
echo "$ac_t""$cf_cv_have_isascii" 1>&6
-test $cf_cv_have_isascii = yes && cat >> confdefs.h <<\EOF
+test "$cf_cv_have_isascii" = yes && cat >> confdefs.h <<\EOF
#define HAVE_ISASCII 1
EOF
-if test $ac_cv_func_sigaction = yes; then
+if test "$ac_cv_func_sigaction" = yes; then
echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
-echo "configure:5226: checking whether sigaction needs _POSIX_SOURCE" >&5
+echo "configure:5499: checking whether sigaction needs _POSIX_SOURCE" >&5
cat > conftest.$ac_ext <<EOF
-#line 5228 "configure"
+#line 5501 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -5233,7 +5506,7 @@ int main() {
struct sigaction act
; return 0; }
EOF
-if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
sigact_bad=no
else
@@ -5242,7 +5515,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5246 "configure"
+#line 5519 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -5252,7 +5525,7 @@ int main() {
struct sigaction act
; return 0; }
EOF
-if { (eval echo configure:5256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
sigact_bad=yes
cat >> confdefs.h <<\EOF
@@ -5272,24 +5545,110 @@ echo "$ac_t""$sigact_bad" 1>&6
fi
-if test $ac_cv_header_termios_h = yes ; then
+for ac_hdr in \
+termio.h \
+termios.h \
+unistd.h \
+
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5557: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5562 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+if test "$ISC" = yes ; then
+ for ac_hdr in sys/termio.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5598: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 5603 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+fi
+if test "$ac_cv_header_termios_h" = yes ; then
case "$CFLAGS" in
*-D_POSIX_SOURCE*)
termios_bad=dunno ;;
*) termios_bad=maybe ;;
esac
- if test $termios_bad = maybe ; then
+ if test "$termios_bad" = maybe ; then
echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6
-echo "configure:5284: checking whether termios.h needs _POSIX_SOURCE" >&5
+echo "configure:5643: checking whether termios.h needs _POSIX_SOURCE" >&5
cat > conftest.$ac_ext <<EOF
-#line 5286 "configure"
+#line 5645 "configure"
#include "confdefs.h"
#include <termios.h>
int main() {
struct termios foo; int x = foo.c_iflag
; return 0; }
EOF
-if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
termios_bad=no
else
@@ -5298,7 +5657,7 @@ else
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5302 "configure"
+#line 5661 "configure"
#include "confdefs.h"
#define _POSIX_SOURCE
@@ -5307,7 +5666,7 @@ int main() {
struct termios foo; int x = foo.c_iflag
; return 0; }
EOF
-if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
termios_bad=unknown
else
@@ -5328,11 +5687,61 @@ rm -f conftest*
fi
+
+echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
+echo "configure:5693: checking for tcgetattr" >&5
+if eval "test \"`echo '$''{'cf_cv_have_tcgetattr'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+cat > conftest.$ac_ext <<EOF
+#line 5699 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#define TTY struct termios
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#define TTY struct termio
+#endif
+#endif
+
+int main() {
+
+TTY foo;
+tcgetattr(1, &foo);
+; return 0; }
+EOF
+if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cf_cv_have_tcgetattr=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_cv_have_tcgetattr=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$cf_cv_have_tcgetattr" 1>&6
+test "$cf_cv_have_tcgetattr" = yes && cat >> confdefs.h <<\EOF
+#define HAVE_TCGETATTR 1
+EOF
+
+
+
if test "$cross_compiling" = yes ; then
echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2
else
echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
-echo "configure:5336: checking whether setvbuf arguments are reversed" >&5
+echo "configure:5745: checking whether setvbuf arguments are reversed" >&5
if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5340,7 +5749,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 5344 "configure"
+#line 5753 "configure"
#include "confdefs.h"
#include <stdio.h>
/* If setvbuf has the reversed format, exit 0. */
@@ -5354,7 +5763,7 @@ main () {
exit(0); /* Non-reversed systems segv here. */
}
EOF
-if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_setvbuf_reversed=yes
else
@@ -5379,12 +5788,12 @@ fi
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:5383: checking return type of signal handlers" >&5
+echo "configure:5792: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5388 "configure"
+#line 5797 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -5401,7 +5810,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:5405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -5421,13 +5830,13 @@ EOF
echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6
-echo "configure:5425: checking for type sigaction_t" >&5
+echo "configure:5834: checking for type sigaction_t" >&5
if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5431 "configure"
+#line 5840 "configure"
#include "confdefs.h"
#include <signal.h>
@@ -5435,7 +5844,7 @@ int main() {
sigaction_t x
; return 0; }
EOF
-if { (eval echo configure:5439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_type_sigaction=yes
else
@@ -5448,14 +5857,15 @@ rm -f conftest*
fi
echo "$ac_t""$cf_cv_type_sigaction" 1>&6
-test $cf_cv_type_sigaction = yes && cat >> confdefs.h <<\EOF
+test "$cf_cv_type_sigaction" = yes && cat >> confdefs.h <<\EOF
#define HAVE_TYPE_SIGACTION 1
EOF
+
echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
-echo "configure:5459: checking declaration of size-change" >&5
+echo "configure:5869: checking declaration of size-change" >&5
if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5469,17 +5879,17 @@ do
CFLAGS="$cf_save_CFLAGS"
test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
cat > conftest.$ac_ext <<EOF
-#line 5473 "configure"
+#line 5883 "configure"
#include "confdefs.h"
#include <sys/types.h>
-#if HAVE_TERMIOS_H
+#ifdef HAVE_TERMIOS_H
#include <termios.h>
#else
-#if HAVE_TERMIO_H
+#ifdef HAVE_TERMIO_H
#include <termio.h>
#endif
#endif
-#if NEED_PTEM_H
+#ifdef NEED_PTEM_H
/* This is a workaround for SCO: they neglected to define struct winsize in
* termios.h -- it's only in termio.h and ptem.h
*/
@@ -5508,7 +5918,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_sizechange=yes
else
@@ -5522,30 +5932,37 @@ rm -f conftest*
CFLAGS="$cf_save_CFLAGS"
if test "$cf_cv_sizechange" = yes ; then
echo "size-change succeeded ($cf_opts)" >&5
- test -n "$cf_opts" && cat >> confdefs.h <<EOF
-#define $cf_opts 1
-EOF
-
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
break
fi
done
-
+
fi
echo "$ac_t""$cf_cv_sizechange" 1>&6
-test $cf_cv_sizechange != no && cat >> confdefs.h <<\EOF
+if test "$cf_cv_sizechange" != no ; then
+ cat >> confdefs.h <<\EOF
#define HAVE_SIZECHANGE 1
EOF
+ case $cf_cv_sizechange in #(vi
+ NEED*)
+ cat >> confdefs.h <<EOF
+#define $cf_cv_sizechange 1
+EOF
+
+ ;;
+ esac
+fi
echo $ac_n "checking for memmove""... $ac_c" 1>&6
-echo "configure:5544: checking for memmove" >&5
+echo "configure:5961: checking for memmove" >&5
if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5549 "configure"
+#line 5966 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char memmove(); below. */
@@ -5568,7 +5985,7 @@ memmove();
; return 0; }
EOF
-if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_memmove=yes"
else
@@ -5587,12 +6004,12 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for bcopy""... $ac_c" 1>&6
-echo "configure:5591: checking for bcopy" >&5
+echo "configure:6008: checking for bcopy" >&5
if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5596 "configure"
+#line 6013 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char bcopy(); below. */
@@ -5615,7 +6032,7 @@ bcopy();
; return 0; }
EOF
-if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_bcopy=yes"
else
@@ -5631,7 +6048,7 @@ if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
-echo "configure:5635: checking if bcopy does overlapping moves" >&5
+echo "configure:6052: checking if bcopy does overlapping moves" >&5
if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5640,7 +6057,7 @@ else
cf_cv_good_bcopy=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 5644 "configure"
+#line 6061 "configure"
#include "confdefs.h"
int main() {
@@ -5653,7 +6070,7 @@ int main() {
}
EOF
-if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_good_bcopy=yes
else
@@ -5675,7 +6092,7 @@ else
cf_cv_good_bcopy=no
fi
- if test $cf_cv_good_bcopy = yes ; then
+ if test "$cf_cv_good_bcopy" = yes ; then
cat >> confdefs.h <<\EOF
#define USE_OK_BCOPY 1
EOF
@@ -5691,7 +6108,7 @@ fi
echo $ac_n "checking if poll really works""... $ac_c" 1>&6
-echo "configure:5695: checking if poll really works" >&5
+echo "configure:6112: checking if poll really works" >&5
if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5700,7 +6117,7 @@ if test "$cross_compiling" = yes; then
cf_cv_working_poll=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 5704 "configure"
+#line 6121 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5720,7 +6137,7 @@ int main() {
exit(ret != 0);
}
EOF
-if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_working_poll=yes
else
@@ -5747,14 +6164,14 @@ if test -z "$cf_user_CFLAGS" ; then
fi
-echo $ac_n "checking for builtin $CC bool type""... $ac_c" 1>&6
-echo "configure:5752: checking for builtin $CC bool type" >&5
+echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
+echo "configure:6169: checking for builtin bool type" >&5
if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5758 "configure"
+#line 6175 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5764,7 +6181,7 @@ int main() {
bool x = false
; return 0; }
EOF
-if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_cc_bool_type=1
else
@@ -5777,7 +6194,7 @@ rm -f conftest*
fi
-if test $cf_cv_cc_bool_type = 1
+if test "$cf_cv_cc_bool_type" = 1
then echo "$ac_t""yes" 1>&6
else echo "$ac_t""no" 1>&6
fi
@@ -5801,7 +6218,7 @@ os2*) #(vi
;;
esac
echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6
-echo "configure:5805: checking for library $cf_stdcpp_libname" >&5
+echo "configure:6222: checking for library $cf_stdcpp_libname" >&5
if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5809,7 +6226,7 @@ else
cf_save="$LIBS"
LIBS="$LIBS -l$cf_stdcpp_libname"
cat > conftest.$ac_ext <<EOF
-#line 5813 "configure"
+#line 6230 "configure"
#include "confdefs.h"
#include <strstream.h>
@@ -5820,7 +6237,7 @@ strstreambuf foo(buf, sizeof(buf))
; return 0; }
EOF
-if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cv_libstdcpp=yes
else
@@ -5835,15 +6252,16 @@ rm -f conftest*
fi
echo "$ac_t""$cf_cv_libstdcpp" 1>&6
-test $cf_cv_libstdcpp = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
+test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
fi
- case "`${CXX-g++} --version`" in
- 1*|2.0-6*)
- cf_cxx_library=yes
- ;;
- 2.7*)
-
+ if test "$GXX" = yes; then
+ case "`${CXX-g++} --version`" in
+ 1*|2.0-6*)
+ cf_cxx_library=yes
+ ;;
+ 2.7*)
+
cf_cxx_library=unknown
case $cf_cv_system_name in #(vi
os2*) #(vi
@@ -5853,13 +6271,13 @@ os2*) #(vi
cf_gpp_libname=g++
;;
esac
-if test $ac_cv_prog_gxx = yes; then
+if test "$ac_cv_prog_gxx" = yes; then
echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6
-echo "configure:5859: checking for lib$cf_gpp_libname" >&5
+echo "configure:6277: checking for lib$cf_gpp_libname" >&5
cf_save="$LIBS"
LIBS="$LIBS -l$cf_gpp_libname"
cat > conftest.$ac_ext <<EOF
-#line 5863 "configure"
+#line 6281 "configure"
#include "confdefs.h"
#include <$cf_gpp_libname/builtin.h>
@@ -5868,7 +6286,7 @@ int main() {
two_arg_error_handler_t foo2 = lib_error_handler
; return 0; }
EOF
-if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -5888,7 +6306,7 @@ else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5892 "configure"
+#line 6310 "configure"
#include "confdefs.h"
#include <builtin.h>
@@ -5897,7 +6315,7 @@ int main() {
two_arg_error_handler_t foo2 = lib_error_handler
; return 0; }
EOF
-if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
@@ -5918,13 +6336,16 @@ rm -f conftest*
echo "$ac_t""$cf_cxx_library" 1>&6
fi
- ;;
- *)
- cf_cxx_library=no
- ;;
- esac
+ ;;
+ *)
+ cf_cxx_library=no
+ ;;
+ esac
+ else
+ cf_cxx_library=no
+ fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:5928: checking how to run the C++ preprocessor" >&5
+echo "configure:6349: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -5937,12 +6358,12 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 5941 "configure"
+#line 6362 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -5970,17 +6391,17 @@ for ac_hdr in typeinfo
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5974: checking for $ac_hdr" >&5
+echo "configure:6395: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5979 "configure"
+#line 6400 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6007,14 +6428,14 @@ fi
done
-echo $ac_n "checking for builtin $CXX bool type""... $ac_c" 1>&6
-echo "configure:6012: checking for builtin $CXX bool type" >&5
+echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
+echo "configure:6433: checking for builtin bool type" >&5
if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6018 "configure"
+#line 6439 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -6024,7 +6445,7 @@ int main() {
bool x = false
; return 0; }
EOF
-if { (eval echo configure:6028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_builtin_bool=1
else
@@ -6037,14 +6458,14 @@ rm -f conftest*
fi
-if test $cf_cv_builtin_bool = 1
+if test "$cf_cv_builtin_bool" = 1
then echo "$ac_t""yes" 1>&6
else echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for size of $CXX bool""... $ac_c" 1>&6
-echo "configure:6048: checking for size of $CXX bool" >&5
+echo $ac_n "checking for size of bool""... $ac_c" 1>&6
+echo "configure:6469: checking for size of bool" >&5
if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6054,7 +6475,7 @@ else
cf_cv_type_of_bool=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6058 "configure"
+#line 6479 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
@@ -6062,7 +6483,7 @@ extern "C" void exit(int);
#include <stdlib.h>
#include <stdio.h>
-#if HAVE_GXX_BUILTIN_H
+#ifdef HAVE_GXX_BUILTIN_H
#include <g++/builtin.h>
#elif HAVE_GPP_BUILTIN_H
#include <gpp/builtin.h>
@@ -6086,7 +6507,7 @@ main()
}
EOF
-if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_type_of_bool=`cat cf_test.out`
else
@@ -6110,7 +6531,7 @@ fi
echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6
-echo "configure:6114: checking for special defines needed for etip.h" >&5
+echo "configure:6535: checking for special defines needed for etip.h" >&5
cf_save_CXXFLAGS="$CXXFLAGS"
cf_result="none"
for cf_math in "" MATH_H
@@ -6121,7 +6542,7 @@ do
test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
cat > conftest.$ac_ext <<EOF
-#line 6125 "configure"
+#line 6546 "configure"
#include "confdefs.h"
#include <etip.h.in>
@@ -6130,7 +6551,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:6134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
test -n "$cf_math" && cat >> confdefs.h <<EOF
@@ -6155,9 +6576,9 @@ echo "$ac_t""$cf_result" 1>&6
CXXFLAGS="$cf_save_CXXFLAGS"
-if test -n "$CXX" ; then
+if test "$CXX" = yes ; then
echo $ac_n "checking if $CXX accepts parameter initialization""... $ac_c" 1>&6
-echo "configure:6161: checking if $CXX accepts parameter initialization" >&5
+echo "configure:6582: checking if $CXX accepts parameter initialization" >&5
if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6173,7 +6594,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
cf_cv_cpp_param_init=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6177 "configure"
+#line 6598 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
@@ -6194,7 +6615,7 @@ TEST::TEST(int x = 1) // some compilers do not like second initializer
void main() { }
EOF
-if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_cpp_param_init=yes
else
@@ -6236,7 +6657,7 @@ else
# may change.
echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6
-echo "configure:6240: checking for fallback type of bool" >&5
+echo "configure:6661: checking for fallback type of bool" >&5
case "$host_cpu" in #(vi
i?86) cf_cv_type_of_bool=char ;; #(vi
*) cf_cv_type_of_bool=int ;;
@@ -6252,7 +6673,7 @@ cf_ada_make=gnatmake
# Extract the first word of "$cf_ada_make", so it can be a program name with args.
set dummy $cf_ada_make; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6256: checking for $ac_word" >&5
+echo "configure:6677: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6306,40 +6727,40 @@ esac
# Extract the first word of "m4", so it can be a program name with args.
set dummy m4; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6310: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_m4_exists'+set}'`\" = set"; then
+echo "configure:6731: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_M4_exists'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$m4_exists"; then
- ac_cv_prog_m4_exists="$m4_exists" # Let the user override the test.
+ if test -n "$M4_exists"; then
+ ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
- ac_cv_prog_m4_exists="yes"
+ ac_cv_prog_M4_exists="yes"
break
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_m4_exists" && ac_cv_prog_m4_exists="no"
+ test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
fi
fi
-m4_exists="$ac_cv_prog_m4_exists"
-if test -n "$m4_exists"; then
- echo "$ac_t""$m4_exists" 1>&6
+M4_exists="$ac_cv_prog_M4_exists"
+if test -n "$M4_exists"; then
+ echo "$ac_t""$M4_exists" 1>&6
else
echo "$ac_t""no" 1>&6
fi
- if test "$ac_cv_prog_m4_exists" = no; then
+ if test "$ac_cv_prog_M4_exists" = no; then
cf_cv_prog_gnat_correct=no
echo Ada95 binding required program m4 not found. Ada95 binding disabled.
fi
if test "$cf_cv_prog_gnat_correct" = yes; then
echo $ac_n "checking if GNAT works""... $ac_c" 1>&6
-echo "configure:6343: checking if GNAT works" >&5
+echo "configure:6764: checking if GNAT works" >&5
rm -f conftest*
cat >>conftest.ads <<CF_EOF
@@ -6459,11 +6880,6 @@ eval ADA_OBJECTS="$withval"
-# This has been fixed!
-# if test $with_shared = no
-# then
-# AC_MSG_WARN(Ada95 applications will not link properly with static libraries)
-# fi
fi
fi
@@ -6471,7 +6887,7 @@ fi
### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
### badly to consider using for development purposes, but 2.5.8 is okay.
if test -n "$with_warnings"; then
- if test -n "$GCC"; then
+ if test "$GCC" = yes; then
case "`$CC --version`" in
2.6.3)
if test "$cf_cv_type_of_bool" != "char"; then
@@ -6488,7 +6904,7 @@ fi
### Construct the library-subsets, if any, from this set of keywords:
### none, base, ext_funcs, termlib.
echo $ac_n "checking for library subsets""... $ac_c" 1>&6
-echo "configure:6492: checking for library subsets" >&5
+echo "configure:6908: checking for library subsets" >&5
if test "$with_termlib" = yes ; then
LIB_SUBSETS="termlib "
else
@@ -6511,7 +6927,7 @@ CPPFLAGS="$CPPFLAGS -I. -I../include"
if test "$srcdir" != "."; then
CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
fi
-if test -z "$GCC"; then
+if test "$GCC" != yes; then
CPPFLAGS="$CPPFLAGS -I\$(includedir)"
elif test "$includedir" != "/usr/include"; then
if test "$includedir" = '${prefix}/include' ; then
@@ -6529,7 +6945,7 @@ ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
if test "$srcdir" != "."; then
ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
fi
-if test -z "$GCC"; then
+if test "$GCC" != yes; then
ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
elif test "$includedir" != "/usr/include"; then
if test "$includedir" = '${prefix}/include' ; then
@@ -6545,7 +6961,7 @@ fi
### Build up pieces for makefile rules
echo $ac_n "checking default library suffix""... $ac_c" 1>&6
-echo "configure:6549: checking default library suffix" >&5
+echo "configure:6965: checking default library suffix" >&5
case $DFT_LWR_MODEL in
normal) DFT_ARG_SUFFIX='' ;;
@@ -6557,7 +6973,7 @@ echo "configure:6549: checking default library suffix" >&5
echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6
echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6
-echo "configure:6561: checking default library-dependency suffix" >&5
+echo "configure:6977: checking default library-dependency suffix" >&5
case $DFT_LWR_MODEL in
@@ -6566,15 +6982,6 @@ echo "configure:6561: checking default library-dependency suffix" >&5
profile) DFT_DEP_SUFFIX='_p.a' ;;
shared)
case $cf_cv_system_name in
- openbsd*|freebsd*)
- DFT_DEP_SUFFIX='.so.$(REL_VERSION)' ;;
- netbsd*)
- if test -f /usr/libexec/ld.elf_so; then
- DFT_DEP_SUFFIX='.so'
- else
- DFT_DEP_SUFFIX='.so.$(REL_VERSION)'
- fi
- ;;
hpux*) DFT_DEP_SUFFIX='.sl' ;;
*) DFT_DEP_SUFFIX='.so' ;;
esac
@@ -6583,7 +6990,7 @@ echo "configure:6561: checking default library-dependency suffix" >&5
echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6
echo $ac_n "checking default object directory""... $ac_c" 1>&6
-echo "configure:6587: checking default object directory" >&5
+echo "configure:6994: checking default object directory" >&5
case $DFT_LWR_MODEL in
normal) DFT_OBJ_SUBDIR='objects' ;;
@@ -6594,10 +7001,10 @@ echo "configure:6587: checking default object directory" >&5
echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6
TINFO_LIST="$SHLIB_LIST"
-test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6
-echo "configure:6601: checking where we will install curses.h" >&5
+echo "configure:7008: checking where we will install curses.h" >&5
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
@@ -6621,7 +7028,7 @@ PROG_ARGS="$TEST_ARGS"
echo $ac_n "checking for src modules""... $ac_c" 1>&6
-echo "configure:6625: checking for src modules" >&5
+echo "configure:7032: checking for src modules" >&5
# dependencies and linker-arguments for test-programs
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
@@ -6657,7 +7064,7 @@ do
continue
elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
-cf_have_include=`echo $cf_dir | tr '[a-z]' '[A-Z]'`
+cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
cat >> confdefs.h <<EOF
#define HAVE_${cf_have_include}_H 1
@@ -6686,7 +7093,7 @@ do
SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
done
SRC_SUBDIRS="$SRC_SUBDIRS misc test"
-test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
+test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
ADA_SUBDIRS=
if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
@@ -6823,7 +7230,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13.19990117"
+ echo "$CONFIG_STATUS generated by autoconf version 2.13.20000819"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@@ -6839,6 +7246,7 @@ trap 'rm -fr `echo "\
include/curses.h \
include/termcap.h \
include/unctrl.h \
+ misc/run_tic.sh:misc/run_tic.in \
$SUB_MAKEFILES \
Makefile include/ncurses_cfg.h:include/ncurses_cfg.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
@@ -6885,6 +7293,16 @@ s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
s%@host_vendor@%$host_vendor%g
s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@BUILD_CC@%$BUILD_CC%g
s%@CPP@%$CPP%g
@@ -6898,6 +7316,8 @@ s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
+s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
+s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
s%@LINT@%$LINT%g
s%@MAN@%$MAN%g
s%@LINT_OPTS@%$LINT_OPTS%g
@@ -6905,7 +7325,7 @@ s%@LD@%$LD%g
s%@AR@%$AR%g
s%@AR_OPTS@%$AR_OPTS%g
s%@cf_cv_makeflags@%$cf_cv_makeflags%g
-s%@INSTALL_PREFIX@%$INSTALL_PREFIX%g
+s%@DESTDIR@%$DESTDIR%g
s%@cf_list_models@%$cf_list_models%g
s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g
s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
@@ -6925,8 +7345,10 @@ s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g
s%@INSTALL_LIB@%$INSTALL_LIB%g
+s%@TERMINFO_SRC@%$TERMINFO_SRC%g
s%@FALLBACK_LIST@%$FALLBACK_LIST%g
s%@TERMINFO_DIRS@%$TERMINFO_DIRS%g
+s%@TERMINFO@%$TERMINFO%g
s%@NCURSES_CONST@%$NCURSES_CONST%g
s%@NCURSES_XNAMES@%$NCURSES_XNAMES%g
s%@ECHO_LINK@%$ECHO_LINK%g
@@ -6936,13 +7358,11 @@ s%@cf_cv_typeof_chtype@%$cf_cv_typeof_chtype%g
s%@cf_cv_1UL@%$cf_cv_1UL%g
s%@cf_cv_shift_limit@%$cf_cv_shift_limit%g
s%@cf_cv_widec_shift@%$cf_cv_widec_shift%g
-s%@OSPEED_TYPE@%$OSPEED_TYPE%g
-s%@OSPEED_INCLUDES@%$OSPEED_INCLUDES%g
s%@CXXCPP@%$CXXCPP%g
s%@CXXLDFLAGS@%$CXXLDFLAGS%g
s%@CXXLIBS@%$CXXLIBS%g
s%@gnat_exists@%$gnat_exists%g
-s%@m4_exists@%$m4_exists%g
+s%@M4_exists@%$M4_exists%g
s%@cf_ada_make@%$cf_ada_make%g
s%@cf_ada_compiler@%$cf_ada_compiler%g
s%@cf_ada_package@%$cf_ada_package%g
@@ -7009,6 +7429,7 @@ CONFIG_FILES=\${CONFIG_FILES-"\
include/curses.h \
include/termcap.h \
include/unctrl.h \
+ misc/run_tic.sh:misc/run_tic.in \
$SUB_MAKEFILES \
Makefile"}
EOF
@@ -7186,6 +7607,7 @@ LIB_SUFFIX="$LIB_SUFFIX"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_TRACING="$LIB_TRACING"
SRC_SUBDIRS="$SRC_SUBDIRS"
+TERMINFO="$TERMINFO"
TINFO_NAME="$TINFO_NAME"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
@@ -7195,6 +7617,7 @@ cf_cv_rel_version="$cf_cv_rel_version"
cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
cf_cv_system_name="$cf_cv_system_name"
cf_with_cxx_binding="$cf_with_cxx_binding"
+cf_cv_shlib_version="$cf_cv_shlib_version"
target="$target"
@@ -7227,26 +7650,25 @@ do
profile) cf_suffix='_p.a' ;;
shared)
case $cf_cv_system_name in
- openbsd*|freebsd*)
- cf_suffix='.so.$(REL_VERSION)' ;;
- netbsd*)
- if test -f /usr/libexec/ld.elf_so; then
- cf_suffix='.so'
- else
- cf_suffix='.so.$(REL_VERSION)'
- fi
- ;;
hpux*) cf_suffix='.sl' ;;
*) cf_suffix='.so' ;;
esac
esac
test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
+ if test $cf_item = shared ; then
+ if test "$cf_cv_do_symlinks" = yes ; then
+ case "$cf_cv_shlib_version" in #(vi
+ rel) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; #(vi
+ abi) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
+ esac
+ fi
+ fi
cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
done
if test $cf_dir = ncurses ; then
- case "$LIB_SUBSETS" in
+ case "$LIB_SUBSETS" in #(vi
termlib+*) #(vi
;;
*) #(vi
@@ -7268,7 +7690,7 @@ do
do
echo 'Appending rules for '$cf_item' model ('$cf_dir')'
-CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'`
+CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
@@ -7278,15 +7700,6 @@ CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'`
profile) cf_suffix='_p.a' ;;
shared)
case $cf_cv_system_name in
- openbsd*|freebsd*)
- cf_suffix='.so.$(REL_VERSION)' ;;
- netbsd*)
- if test -f /usr/libexec/ld.elf_so; then
- cf_suffix='.so'
- else
- cf_suffix='.so.$(REL_VERSION)'
- fi
- ;;
hpux*) cf_suffix='.sl' ;;
*) cf_suffix='.so' ;;
esac
@@ -7327,6 +7740,7 @@ CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'`
prefix=$cf_prefix \
suffix=$cf_suffix \
subset=$cf_subset \
+ ShlibVer=$cf_cv_shlib_version \
DoLinks=$cf_cv_do_symlinks \
rmSoLocs=$cf_cv_rm_so_locs \
ldconfig="$LDCONFIG" \
@@ -7413,6 +7827,18 @@ distclean ::
rm -rf \$(DIRS_TO_MAKE)
CF_EOF
+# Special case: tack's manpage lives in its own directory.
+if test -d tack ; then
+if test -f $srcdir/$tack.h; then
+cat >> Makefile <<CF_EOF
+
+install.man \
+uninstall.man ::
+ cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
+CF_EOF
+fi
+fi
+
rm -f headers.sed headers.sh
@@ -7444,7 +7870,7 @@ case \$DST in
done
rm -f \$TMPSRC
sed -f \$TMPSED \$SRC > \$TMPSRC
- eval \$PRG \$TMPSRC \$DST/\$SRC
+ eval \$PRG \$TMPSRC \$DST/\`basename \$SRC\`
rm -f \$TMPSRC \$TMPSED
;;
*)
@@ -7459,12 +7885,12 @@ for cf_dir in $SRC_SUBDIRS
do
if test -f $srcdir/$cf_dir/headers; then
cat >>$cf_dir/Makefile <<CF_EOF
-\$(INSTALL_PREFIX)\$(includedir) :
+\$(DESTDIR)\$(includedir) :
\$(srcdir)/../mkinstalldirs \$@
install \\
install.libs \\
-install.includes :: \$(INSTALL_PREFIX)\$(includedir) \\
+install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
CF_EOF
j=""
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
@@ -7475,8 +7901,8 @@ CF_EOF
echo " $j" >>$cf_dir/Makefile
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
- echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(INSTALL_PREFIX)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
- test $i = curses.h && echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
+ echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
+ test $i = curses.h && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
done
cat >>$cf_dir/Makefile <<CF_EOF
@@ -7488,8 +7914,8 @@ CF_EOF
for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
do
i=`basename $i`
- echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
- test $i = curses.h && echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
+ echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
+ test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
done
fi
done
diff --git a/contrib/ncurses/configure.in b/contrib/ncurses/configure.in
index dbc724b475bb..aa1993b69ff3 100644
--- a/contrib/ncurses/configure.in
+++ b/contrib/ncurses/configure.in
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -28,15 +28,19 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
dnl
-dnl $Id: configure.in,v 1.194 2000/07/01 21:31:07 tom Exp $
+dnl $Id: configure.in,v 1.217 2000/10/08 01:02:43 tom Exp $
dnl Process this file with autoconf to produce a configure script.
-AC_PREREQ(2.12.971230)
-AC_REVISION($Revision: 1.194 $)
+dnl
+dnl See http://dickey.his.com/autoconf/ for additional information.
+dnl
+dnl ---------------------------------------------------------------------------
+AC_PREREQ(2.13.20000819)
+AC_REVISION($Revision: 1.217 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
CF_SUBST_NCURSES_VERSION
-CF_CHECK_CACHE
+CF_CHECK_CACHE([AC_CANONICAL_SYSTEM])
AC_ARG_WITH(system-type,
[ --with-system-type=XXX test: override derived host system-type],
[AC_MSG_WARN(overriding system type to $withval)
@@ -79,13 +83,16 @@ CF_CFG_DEFAULTS
### Checks for programs.
AC_PROG_CC
-if test -n "$GCC" ; then
-AC_MSG_CHECKING(version of gcc)
-eval "$CC --version"
+if test "$GCC" = yes ; then
+ AC_MSG_CHECKING(version of gcc)
+ eval "$CC --version"
fi
-if test $host != $build; then
- AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)
+if test "$host" != $build; then
+ AC_CHECK_PROGS(BUILD_CC, $CC gcc cc)
+else
+ BUILD_CC="$CC"
fi
+AC_SUBST(BUILD_CC)
AC_PROG_CPP
AC_PROG_GCC_TRADITIONAL
AC_ISC_POSIX
@@ -121,8 +128,17 @@ else
AC_PROG_CXX
popdef([AC_MSG_ERROR])dnl
fi
+
changequote(,)dnl
-if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi
+if test "$GXX" = yes; then
+ case "`${CXX-g++} --version`" in
+ 1*|2.[0-6]*)
+ GXX=""; CXX=""; ac_cv_prog_gxx=no
+ cf_cxx_library=no
+ echo No: templates do not work
+ ;;
+ esac
+fi
changequote([,])dnl
AC_MSG_CHECKING(if you want to build C++ binding and demo)
@@ -152,12 +168,15 @@ modules_to_build="$modules_to_build progs tack"
fi
modules_to_build="$modules_to_build panel menu form"
+AC_ARG_PROGRAM
AC_PROG_AWK
AC_PROG_MAKE_SET
CF_PROG_INSTALL
AC_SYS_LONG_FILE_NAMES
+CF_MIXEDCASE_FILENAMES
AC_PROG_LN_S
AC_PROG_RANLIB
+CF_MAKE_TAGS
AC_CHECK_PROGS(LINT, tdlint lint alint)
AC_CHECK_PROGS(MAN, man man_db)
AC_SUBST(LINT_OPTS)
@@ -178,14 +197,11 @@ AC_ARG_WITH(install-prefix,
[case "$withval" in #(vi
yes|no) #(vi
;;
- *) INSTALL_PREFIX="$withval"
+ *) DESTDIR="$withval"
;;
esac])
-AC_MSG_RESULT($INSTALL_PREFIX)
-AC_SUBST(INSTALL_PREFIX)
-
-###############################################################################
-CF_MAN_PAGES
+AC_MSG_RESULT($DESTDIR)
+AC_SUBST(DESTDIR)
###############################################################################
CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
@@ -275,7 +291,7 @@ AC_ARG_WITH(dbmalloc,
[with_dbmalloc=$withval],
[with_dbmalloc=no])
AC_MSG_RESULT($with_dbmalloc)
-if test $with_dbmalloc = yes ; then
+if test "$with_dbmalloc" = yes ; then
AC_CHECK_LIB(dbmalloc,debug_malloc)
fi
@@ -285,7 +301,7 @@ AC_ARG_WITH(dmalloc,
[with_dmalloc=$withval],
[with_dmalloc=no])
AC_MSG_RESULT($with_dmalloc)
-if test $with_dmalloc = yes ; then
+if test "$with_dmalloc" = yes ; then
AC_CHECK_LIB(dmalloc,dmalloc_debug)
fi
@@ -296,7 +312,7 @@ AC_ARG_WITH(gpm,
[with_gpm=$withval],
[with_gpm=no])
AC_MSG_RESULT($with_gpm)
-if test $with_gpm = yes ; then
+if test "$with_gpm" = yes ; then
AC_CHECK_LIB(gpm,Gpm_Open,[
EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
SHLIB_LIST="-lgpm $SHLIB_LIST"
@@ -359,10 +375,28 @@ AC_MSG_RESULT($with_overwrite)
AC_MSG_CHECKING(if external terminfo-database is used)
AC_ARG_ENABLE(database,
[ --disable-database use only built-in data],
- [with_database=$enableval],
- [with_database=yes])
-AC_MSG_RESULT($with_database)
-test $with_database != no && AC_DEFINE(USE_DATABASE)
+ [use_database=$enableval],
+ [use_database=yes])
+AC_MSG_RESULT($use_database)
+
+case $host_os in #(vi
+os2*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/emx.src'
+ ;;
+*) #(vi
+ TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
+ ;;
+esac
+AC_SUBST(TERMINFO_SRC)
+
+if test "$use_database" != no ; then
+ AC_DEFINE(USE_DATABASE)
+ AC_MSG_CHECKING(which terminfo source-file will be installed)
+ AC_ARG_ENABLE(database,
+ [ --with-database=XXX specify terminfo source to install],
+ [TERMINFO_SRC=$withval])
+ AC_MSG_RESULT($TERMINFO_SRC)
+fi
AC_MSG_CHECKING(for list of fallback descriptions)
AC_ARG_WITH(fallbacks,
@@ -373,6 +407,13 @@ AC_MSG_RESULT($with_fallback)
FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
AC_SUBST(FALLBACK_LIST)
+if test "$use_database" = no ; then
+ if test -z $with_fallback ; then
+ AC_ERROR(You have disabled the database w/o specifying fallbacks)
+ fi
+ TERMINFO="${datadir}/terminfo"
+else
+
AC_MSG_CHECKING(for list of terminfo directories)
CF_WITH_PATHLIST(terminfo-dirs,
[ --with-terminfo-dirs=XXX specify list of terminfo directories],
@@ -382,12 +423,19 @@ CF_WITH_PATHLIST(terminfo-dirs,
AC_MSG_RESULT($TERMINFO_DIRS)
test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS")
-if test $with_database = no ; then
- if test -z $with_fallback ; then
- AC_ERROR(You have disabled the database w/o specifying fallbacks)
- fi
+AC_MSG_CHECKING(for default terminfo directory)
+CF_WITH_PATH(default-terminfo-dir,
+ [ --with-default-terminfo-dir=DIR default terminfo directory],
+ TERMINFO,
+ DATADIR/terminfo,
+ ${datadir}/terminfo)
+AC_MSG_RESULT($TERMINFO)
+AC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO")
+
fi
+AC_SUBST(TERMINFO)
+
### use option --disable-big-core to make tic run on small machines
### We need 4Mb, check if we can allocate 50% more than that.
AC_MSG_CHECKING(if big-core option selected)
@@ -397,7 +445,13 @@ AC_ARG_ENABLE(big-core,
[AC_TRY_RUN([
#include <stdlib.h>
#include <string.h>
-int main() { exit(malloc(6000000L) == 0); }],
+int main() {
+ unsigned long n = 6000000L;
+ char *s = malloc(n);
+ if (s != 0)
+ s[0] = s[n-1] = 0;
+ exit(s == 0);
+}],
[with_big_core=yes],
[with_big_core=no],
[with_big_core=no])])
@@ -498,6 +552,9 @@ AC_MSG_RESULT($with_rcs_ids)
test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
###############################################################################
+CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
+
+###############################################################################
CF_HELP_MESSAGE(Extensions:)
### Note that some functions (such as const) are normally disabled anyway.
@@ -508,6 +565,7 @@ AC_ARG_ENABLE(ext-funcs,
[with_ext_funcs=yes])
AC_MSG_RESULT($with_ext_funcs)
if test "$with_ext_funcs" = yes ; then
+ AC_DEFINE(HAVE_CURSES_VERSION)
AC_DEFINE(HAVE_HAS_KEY)
AC_DEFINE(HAVE_RESIZETERM)
AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
@@ -522,22 +580,12 @@ AC_ARG_ENABLE(const,
[with_ext_const=$enableval],
[with_ext_const=no])
AC_MSG_RESULT($with_ext_const)
-NCURSES_CONST=""
+NCURSES_CONST='/*nothing*/'
if test "$with_ext_const" = yes ; then
- AC_DEFINE(NCURSES_CONST,const)
NCURSES_CONST=const
fi
AC_SUBST(NCURSES_CONST)
-### use option --enable-hashmap to turn on use of hashmap scrolling logic
-AC_MSG_CHECKING(if you want hashmap scrolling-optimization code)
-AC_ARG_ENABLE(hashmap,
- [ --enable-hashmap compile with hashmap scrolling-optimization code],
- [with_hashmap=$enableval],
- [with_hashmap=yes])
-AC_MSG_RESULT($with_hashmap)
-test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
-
AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code)
AC_ARG_ENABLE(no-padding,
[ --enable-no-padding compile with \$NCURSES_NO_PADDING code],
@@ -567,32 +615,71 @@ test "$with_tcap_names" = yes && NCURSES_XNAMES=1
AC_SUBST(NCURSES_XNAMES)
###############################################################################
-CF_HELP_MESSAGE(Experimental Code:)
-AC_MSG_CHECKING(if you want all experimental code)
+# These options are relatively safe to experiment with.
+CF_HELP_MESSAGE(Development Code:)
+AC_MSG_CHECKING(if you want all development code)
AC_ARG_WITH(develop,
- [ --with-develop enable all experimental options for testing],
+ [ --with-develop enable all development options],
[with_develop=$withval],
[with_develop=no])
AC_MSG_RESULT($with_develop)
### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
-AC_MSG_CHECKING(if you want experimental colorfgbg code)
+AC_MSG_CHECKING(if you want colorfgbg code)
AC_ARG_ENABLE(hard-tabs,
- [ --enable-colorfgbg compile with experimental \$COLORFGBG code],
+ [ --enable-colorfgbg compile with \$COLORFGBG code],
[with_colorfgbg=$enableval],
[with_colorfgbg=$with_develop])
AC_MSG_RESULT($with_colorfgbg)
test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
### use option --enable-hard-tabs to turn on use of hard-tabs optimize
-AC_MSG_CHECKING(if you want experimental hard-tabs code)
+AC_MSG_CHECKING(if you want hard-tabs code)
AC_ARG_ENABLE(hard-tabs,
- [ --enable-hard-tabs compile with experimental hard-tabs code],
+ [ --enable-hard-tabs compile with hard-tabs code],
[with_hardtabs=$enableval],
[with_hardtabs=$with_develop])
AC_MSG_RESULT($with_hardtabs)
test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
+AC_MSG_CHECKING(if you want to use restrict environment when running as root)
+AC_ARG_ENABLE(root-environ,
+ [ --disable-root-environ limit environment when running as root],
+ [with_root_environ=$enableval],
+ [with_root_environ=yes])
+AC_MSG_RESULT($with_root_environ)
+test "$with_root_environ" = yes && AC_DEFINE(USE_ROOT_ENVIRON)
+
+### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
+AC_MSG_CHECKING(if you want limited support for xmc)
+AC_ARG_ENABLE(xmc-glitch,
+ [ --enable-xmc-glitch compile with limited support for xmc],
+ [with_xmc_glitch=$enableval],
+ [with_xmc_glitch=$with_develop])
+AC_MSG_RESULT($with_xmc_glitch)
+test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
+
+###############################################################################
+# These are just experimental, probably should not be in a package:
+CF_HELP_MESSAGE(Experimental Code:)
+
+AC_MSG_CHECKING(if you do not want to assume colors are white-on-black)
+AC_ARG_ENABLE(assumed-color,
+ [ --disable-assumed-color do not assume anything about default-colors],
+ [with_assumed_color=$enableval],
+ [with_assumed_color=yes])
+AC_MSG_RESULT($with_assumed_color)
+test "$with_assumed_color" = yes && AC_DEFINE(USE_ASSUMED_COLOR)
+
+### use option --enable-hashmap to turn on use of hashmap scrolling logic
+AC_MSG_CHECKING(if you want hashmap scrolling-optimization code)
+AC_ARG_ENABLE(hashmap,
+ [ --disable-hashmap compile without hashmap scrolling-optimization],
+ [with_hashmap=$enableval],
+ [with_hashmap=yes])
+AC_MSG_RESULT($with_hashmap)
+test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
+
AC_MSG_CHECKING(if you want experimental safe-sprintf code)
AC_ARG_ENABLE(safe-sprintf,
[ --enable-safe-sprintf compile with experimental safe-sprintf code],
@@ -616,7 +703,7 @@ fi
### use option --enable-widec to turn on use of wide-character support
AC_MSG_CHECKING(if you want experimental wide-character code)
AC_ARG_ENABLE(widec,
- [ --enable-widec compile with experimental wide-char code],
+ [ --enable-widec compile with experimental wide-char/UTF-8 code],
[with_widec=$enableval],
[with_widec=no])
AC_MSG_RESULT($with_widec)
@@ -625,19 +712,11 @@ if test "$with_widec" = yes ; then
AC_DEFINE(USE_WIDEC_SUPPORT)
fi
-### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
-AC_MSG_CHECKING(if you want experimental xmc code)
-AC_ARG_ENABLE(xmc-glitch,
- [ --enable-xmc-glitch compile with experimental xmc code],
- [with_xmc_glitch=$enableval],
- [with_xmc_glitch=$with_develop])
-AC_MSG_RESULT($with_xmc_glitch)
-test "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT)
-
###############################################################################
CF_HELP_MESSAGE(Testing/development Options:)
### use option --disable-echo to suppress full display compiling commands
+AC_MSG_CHECKING(if you want to display full commands during build)
AC_ARG_ENABLE(echo,
[ --enable-echo build: display "compiling" commands (default)],
[with_echo=$enableval],
@@ -647,9 +726,11 @@ if test "$with_echo" = yes; then
else
ECHO_LINK='@ echo linking $@ ... ;'
fi
+AC_MSG_RESULT($with_echo)
AC_SUBST(ECHO_LINK)
### use option --enable-warnings to turn on all gcc warnings
+AC_MSG_CHECKING(if you want to see compiler warnings)
AC_ARG_ENABLE(warnings,
[ --enable-warnings build: turn on GCC compiler warnings],
[with_warnings=$enableval])
@@ -657,16 +738,19 @@ if test -n "$with_warnings"; then
ADAFLAGS="$ADAFLAGS -gnatg"
CF_GCC_WARNINGS
fi
+AC_MSG_RESULT($with_warnings)
CF_GCC_ATTRIBUTES
### use option --enable-assertions to turn on generation of assertion code
+AC_MSG_CHECKING(if you want to enable runtime assertions)
AC_ARG_ENABLE(assertions,
[ --enable-assertions test: turn on generation of assertion code],
[with_assertions=$enableval],
[with_assertions=no])
+AC_MSG_RESULT($with_assertions)
if test -n "$GCC"
then
- if test $with_assertions = no
+ if test "$with_assertions" = no
then
AC_DEFINE(NDEBUG)
CPPFLAGS="$CPPFLAGS -DNDEBUG"
@@ -678,18 +762,18 @@ fi
### use option --disable-leaks to suppress "permanent" leaks, for testing
AC_ARG_ENABLE(leaks,
[ --disable-leaks test: suppress permanent memory-leaks],
- [test $enableval = no && AC_DEFINE(NO_LEAKS)])
+ [test "$enableval" = no && AC_DEFINE(NO_LEAKS)])
AC_DEFINE(HAVE_NC_ALLOC_H)
### use option --enable-expanded to generate certain macros as functions
AC_ARG_ENABLE(expanded,
[ --enable-expanded test: generate functions for certain macros],
- [test $enableval = yes && AC_DEFINE(NCURSES_EXPANDED)])
+ [test "$enableval" = yes && AC_DEFINE(NCURSES_EXPANDED)])
### use option --disable-macros to suppress macros in favor of functions
AC_ARG_ENABLE(macros,
[ --disable-macros test: use functions rather than macros],
- [test $enableval = no && AC_DEFINE(NCURSES_NOMACROS)])
+ [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS)])
### Checks for libraries.
AC_CHECK_FUNC(gettimeofday,
@@ -722,8 +806,6 @@ sys/poll.h \
sys/select.h \
sys/time.h \
sys/times.h \
-termio.h \
-termios.h \
ttyent.h \
unistd.h \
)
@@ -733,7 +815,6 @@ unistd.h \
if test "$ISC" = yes ; then
AC_CHECK_LIB(cposix,main)
AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
- AC_CHECK_HEADERS( sys/termio.h )
fi
CF_SYS_TIME_SELECT
@@ -742,7 +823,7 @@ CF_SYS_TIME_SELECT
AC_LANG_C
AC_C_CONST
AC_C_INLINE
-test $ac_cv_c_inline != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
+test "$ac_cv_c_inline" != no && AC_DEFINE(CC_HAS_INLINE_FUNCS)
CF_TYPEOF_CHTYPE
CF_WIDEC_SHIFT
@@ -750,12 +831,14 @@ CF_WIDEC_SHIFT
### Checks for external-data
CF_ERRNO
CF_LINK_DATAONLY
-CF_SPEED_TYPE
### Checks for library functions.
AC_CHECK_FUNCS( \
getcwd \
+getegid \
+geteuid \
getttynam \
+issetugid \
memccpy \
mkstemp \
nanosleep \
@@ -769,7 +852,6 @@ sigaction \
sigvec \
strdup \
strstr \
-tcgetattr \
tcgetpgrp \
times \
vfscanf \
@@ -782,7 +864,7 @@ fi
CF_ISASCII
CF_STRUCT_SIGACTION
-CF_STRUCT_TERMIOS
+CF_FUNC_TERMIOS
dnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS
if test "$cross_compiling" = yes ; then
@@ -807,17 +889,21 @@ CF_BOOL_DECL(cf_cv_cc_bool_type)
if test -n "$CXX" ; then
AC_LANG_CPLUSPLUS
CF_STDCPP_LIBRARY
- case "`${CXX-g++} --version`" in
- 1*|2.[0-6]*)
- cf_cxx_library=yes
- ;;
- 2.7*)
- CF_GPP_LIBRARY
- ;;
- *)
- cf_cxx_library=no
- ;;
- esac
+ if test "$GXX" = yes; then
+ case "`${CXX-g++} --version`" in
+ 1*|2.[0-6]*)
+ cf_cxx_library=yes
+ ;;
+ 2.7*)
+ CF_GPP_LIBRARY
+ ;;
+ *)
+ cf_cxx_library=no
+ ;;
+ esac
+ else
+ cf_cxx_library=no
+ fi
AC_CHECK_HEADERS(typeinfo)
CF_BOOL_DECL
CF_BOOL_SIZE
@@ -862,8 +948,8 @@ if test "$ac_cv_prog_gnat_exists" = no; then
cf_ada_make=
else
CF_GNAT_VERSION
- AC_CHECK_PROG(m4_exists, m4, yes, no)
- if test "$ac_cv_prog_m4_exists" = no; then
+ AC_CHECK_PROG(M4_exists, m4, yes, no)
+ if test "$ac_cv_prog_M4_exists" = no; then
cf_cv_prog_gnat_correct=no
echo Ada95 binding required program m4 not found. Ada95 binding disabled.
fi
@@ -885,7 +971,7 @@ if test "$cf_cv_prog_gnat_correct" = yes; then
ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
AC_ARG_WITH(ada-compiler,
- [ --with-ada-compiler=CMD Specify Ada95 compiler command (default gnatmake)],
+ [ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
[cf_ada_compiler=$withval],
[cf_ada_compiler=gnatmake])
@@ -912,11 +998,6 @@ if test "$cf_cv_prog_gnat_correct" = yes; then
[$]prefix/lib/ada/adalib)
AC_SUBST(ADA_OBJECTS)
-# This has been fixed!
-# if test $with_shared = no
-# then
-# AC_MSG_WARN(Ada95 applications will not link properly with static libraries)
-# fi
fi
fi
@@ -924,7 +1005,7 @@ fi
### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
### badly to consider using for development purposes, but 2.5.8 is okay.
if test -n "$with_warnings"; then
- if test -n "$GCC"; then
+ if test "$GCC" = yes; then
case "`$CC --version`" in
2.6.3)
if test "$cf_cv_type_of_bool" != "char"; then
@@ -978,7 +1059,7 @@ AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
AC_MSG_RESULT($DFT_OBJ_SUBDIR)
TINFO_LIST="$SHLIB_LIST"
-test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
+test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
AC_MSG_CHECKING(where we will install curses.h)
test "$with_overwrite" = no && \
@@ -1014,6 +1095,7 @@ AC_OUTPUT( \
include/curses.h \
include/termcap.h \
include/unctrl.h \
+ misc/run_tic.sh:misc/run_tic.in \
$SUB_MAKEFILES \
Makefile,[
CF_LIB_RULES
@@ -1030,6 +1112,7 @@ LIB_SUFFIX="$LIB_SUFFIX"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_TRACING="$LIB_TRACING"
SRC_SUBDIRS="$SRC_SUBDIRS"
+TERMINFO="$TERMINFO"
TINFO_NAME="$TINFO_NAME"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
@@ -1039,6 +1122,7 @@ cf_cv_rel_version="$cf_cv_rel_version"
cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
cf_cv_system_name="$cf_cv_system_name"
cf_with_cxx_binding="$cf_with_cxx_binding"
+cf_cv_shlib_version="$cf_cv_shlib_version"
target="$target"
],sort)dnl
diff --git a/contrib/ncurses/convert_configure.pl b/contrib/ncurses/convert_configure.pl
index 9d1026d16878..dea92ca5d8cc 100644
--- a/contrib/ncurses/convert_configure.pl
+++ b/contrib/ncurses/convert_configure.pl
@@ -8,47 +8,83 @@ extproc perl -S -w
#
# run the result like this:
# .\configure
-;
+
+# Some frequent manual intervention:
+# a) Some makefiles hardwire SHELL = /bin/sh ==> change to: sh
+# b) Some makefiles recognize that exe files terminate on .exe
+# You need to give this script -no-zexe option...
+
+shift, $no_zexe = 1 if @ARGV and $ARGV[0] eq '-no-zexe';
mkdir '/tmp', 0777 unless -d '/tmp';
print <<EOF;
extproc sh
+EOF
+
+print <<EOF unless $no_zexe;
# Make sensible defaults:
-CC="gcc -Zexe"
+CC="gcc -Zexe -Zmt"
export CC
+CXX="gcc -Zexe -Zmt"
+export CXX
#GCCOPT="$GCCOPT -Zexe"
#export GCCOPT
+EOF
+
+print <<EOF;
CONFIG_SHELL=sh
+export CONFIG_SHELL
+
+# Optimization (GNU make 3.74 cannot be loaded :-():
+emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
+emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
+emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
+
EOF
$checking_path = 0;
while (<>) {
- if (/for\s+(\w+)\s+in\s*\$PATH\s*;/) {
+ if (/for\s+(\w+)\s+in\s*\$(PATH|ac_dummy)\s*;/) {
$checking_path = 1;
$varname = $1;
$subst= <<EOS
$varname="`echo -E \\"\$$varname\\" | tr \\\\\\\\\\\\\\\\ / `"
EOS
}
- $checking_path = 0 if /^\s*done\s*$/;
+ if (/if\s+test\s+-z\s+\"\$INSTALL\"/) {
+ $checking_install = 1;
+ }
+ $checking_install = $checking_path = 0 if /^\s*done\s*$/;
# We want to create an extra line like this one:
# ac_dir="`echo -E \"$ac_dir\" | tr \\\\\\\\ / `"
s{^((\s*)if\s+test)\s*-f\s*(\$$varname/\S+)\s*;}
- {$2$subst$1 -f $3 -o -f $3.exe ;}
+ {$2$subst$1 -f $3 -o -f $3.exe ;}
if $checking_path; # Checking for executables
- s/^host=NONE$/host=os2/; # Make default host
+ # change |/usr/sbin/*| to |/usr/sbin/*|?:[\\/]os2[\\/]install[\\/]*|
+ # in the list of things to skip (with both cases)
+ s{\Q|/usr/sbin/*|}
+ {|/usr/sbin/*|?:[\\\\/]os2[\\\\/]install[\\\\/]*|?:[\\\\/]OS2[\\\\/]INSTALL[\\\\/]*|}
+ if $checking_install; # Do not accept d:/os2/install/install.exe
+ s/^(host|build)=NONE$/$1=x86-emx-os2/; # Make default host/build
s/"\$\{IFS}:"$/"\${IFS};"/; # Fix IFS line
+ s/\bIFS=\":\"$/IFS=";"/; # Fix another IFS line
s/\btest\s+-s\s+conftest\b/test -f conftest/g; # Fix exe test
# This one is needed for curses:
- s/host=`\$ac_config_sub \$host_alias`/$&\nif test -z "$host"; then host=\$host_alias; fi/;
+ s/^\s*host=`.*\$ac_config_sub \$host_alias`/$&\nif test -z "\$host"; then host=\$host_alias; fi/;
s,/bin/sh(?![/\w]),sh,g;
+ s,^(\s*/usr/sbin/sendmail\s*)\\$,$1 "`whence sendmail | tr '\\\\\\\\' / `" \\,;
print;
}
__END__
-Changes: 98/11 : support check for executables in ncurses.
+Changes: 98/11 : support check for executables in ncurses.
+ 99/2 : support INSTALL,
+ new IFS=':' style
+ 99/11 : find sendmail
+ 00/01 : export CONFIG_SHELL
+ 00/10 : new syntax for host=`...` line
diff --git a/contrib/ncurses/dist.mk b/contrib/ncurses/dist.mk
index ba715008cbdb..8d60a1742cc3 100644
--- a/contrib/ncurses/dist.mk
+++ b/contrib/ncurses/dist.mk
@@ -1,4 +1,4 @@
-# $Id: dist.mk,v 1.207 2000/06/29 23:08:38 tom Exp $
+# $Id: dist.mk,v 1.224 2000/10/09 22:47:15 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@@ -10,7 +10,7 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 1
-NCURSES_PATCH = 20000701
+NCURSES_PATCH = 20001009
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
diff --git a/contrib/ncurses/doc/html/announce.html b/contrib/ncurses/doc/html/announce.html
index d3c68d07ad3e..e7a79d6c899d 100644
--- a/contrib/ncurses/doc/html/announce.html
+++ b/contrib/ncurses/doc/html/announce.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
- $Id: announce.html,v 1.37 2000/07/02 01:50:20 tom Exp $
+ $Id: announce.html,v 1.38 2000/07/04 22:41:38 tom Exp $
-->
<HTML>
<HEAD>
@@ -33,7 +33,7 @@ the library and tools.<P>
The ncurses distribution is available via anonymous FTP at
the GNU distribution site
<A HREF="ftp://ftp.gnu.org/pub/gnu/ncurses">ftp://ftp.gnu.org/pub/gnu/ncurses</A>.
-It is also available at
+<br>It is also available at
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H1>Release Notes</H1>
@@ -68,8 +68,14 @@ New features:
provide better control over the use of default colors. This is
the principal visible difference between ncurses 5.1 and preceding
versions. The new extension allows an application to specify what
- colors pair 0 uses. It defaults to white on black, unless you
- have invoked <code>use_default_colors()</code>.
+ colors pair 0 uses.
+ <p>
+ <em>NOTE</em>: Pair 0 defaults to white on black unless
+ you have invoked <code>use_default_colors()</code> or set it via
+ <code>assume_default_colors()</code>. An application that calls
+ <code>start_colors()</code> without setting the background color
+ will consistently have a black background no matter what color your
+ terminal's background actually is.
<li>made several fixes to the terminfo-to-termcap conversion, and
have been using the generated termcaps without further hand-tuning.
@@ -103,11 +109,13 @@ New features:
</ul>
<li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
- IEXTEN flag which affects stty lnext on systems such as FreeBSD
+ IEXTEN flag which affects <code>stty lnext</code> on systems such as FreeBSD
- <li>reordered tests during mouse initialization to allow for gpm to run in
- xterm, or for xterm to be used under OS/2 EMX. Also dropped test for
- $DISPLAY in favor of kmous=\E[M or $TERM containing "xterm".
+ <li>reordered tests during mouse initialization to allow for gpm to run
+ in xterm, or for xterm to be used under OS/2 EMX. Also dropped test
+ for <code>$DISPLAY</code> in favor of the terminfo capability
+ <code>kmous=\E[M</code> or
+ if <code>$TERM</code> environment variable contains "xterm".
<li>added configure option <code>--with-manpage-symlinks</code>, which
provides for fully indexing manpage entries by making symbolic links
@@ -275,7 +283,8 @@ including (versions starting with those noted):
<DT> cdk
<DD> Curses Development Kit
<br>
-<A HREF="http://www.vexus.ca/CDK.html">Curses Development Kit</a>
+<A HREF="http://www.vexus.ca/CDK.html">http://www.vexus.ca/CDK.html</a>
+<br>
<A HREF="http://dickey.his.com/cdk/cdk.html">http://dickey.his.com/cdk</A>.
<DT> ded
<DD> directory-editor
@@ -292,27 +301,39 @@ for similar applications on GNU/Linux.
<A HREF="http://lynx.isc.org/release/">http://lynx.isc.org/release</A>.
<DT> Midnight Commander 4.1
<DD> file manager
+<br>
+<A HREF="www.gnome.org/mc/">www.gnome.org/mc/</A>.
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org">http://www.mutt.org</A>.
<DT> ncftp
<DD> file-transfer utility
+<br>
+<A HREF="http://www.ncftp.com">http://www.ncftp.com</A>.
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
+<br>
+<A HREF="http://www.bostic.com/vi/">http://www.bostic.com/vi/</A>.
<DT> tin
<DD> newsreader, supporting color, MIME
<br>
<A HREF="http://www.tin.org">http://www.tin.org</A>.
<DT> taper
<DD> tape archive utility
+<br>
+<A HREF="http://members.iinet.net.au/~yusuf/taper/">http://members.iinet.net.au/~yusuf/taper/</A>.
<DT> vh-1.6
<DD> Volks-Hypertext browser for the Jargon File
+<br>
+<A HREF="http://www.bg.debian.org/Packages/unstable/text/vh.html">http://www.bg.debian.org/Packages/unstable/text/vh.html</A>.
</DL>
as well as some that use ncurses for the terminfo support alone:
<DL>
<DT> minicom
<DD> terminal emulator
+<br>
+<A HREF="http://www.pp.clinet.fi/~walker/minicom.html">http://www.pp.clinet.fi/~walker/minicom.html</A>.
<DT> vile
<DD> vi-like-emacs
<br>
diff --git a/contrib/ncurses/form/Makefile.in b/contrib/ncurses/form/Makefile.in
index dd65638af9c8..9c40f8aade58 100644
--- a/contrib/ncurses/form/Makefile.in
+++ b/contrib/ncurses/form/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.28 2000/05/28 01:40:18 tom Exp $
+# $Id: Makefile.in,v 1.30 2000/08/26 21:51:44 tom Exp $
##############################################################################
# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
# #
@@ -46,7 +46,7 @@ SHELL = /bin/sh
THIS = Makefile
MODEL = @DFT_LWR_MODEL@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -108,7 +108,7 @@ install :: $(AUTO_SRC) $(LIBRARIES)
sources : $(AUTO_SRC)
-$(INSTALL_PREFIX)$(libdir) :
+$(DESTDIR)$(libdir) :
$(srcdir)/../mkinstalldirs $@
# make copies to simplify include-paths while still keeping form's include
@@ -127,8 +127,8 @@ FORM_PRIV_H = \
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/form/fty_enum.c b/contrib/ncurses/form/fty_enum.c
index 701d80f81f11..490bf261842b 100644
--- a/contrib/ncurses/form/fty_enum.c
+++ b/contrib/ncurses/form/fty_enum.c
@@ -13,7 +13,7 @@
#include "form.priv.h"
-MODULE_ID("$Id: fty_enum.c,v 1.11 2000/03/19 01:09:56 Bruno.Haible Exp $")
+MODULE_ID("$Id: fty_enum.c,v 1.13 2000/09/10 00:55:26 juergen Exp $")
typedef struct {
char **kwds;
@@ -33,20 +33,21 @@ typedef struct {
static void *Make_Enum_Type(va_list * ap)
{
enumARG *argp = (enumARG *)malloc(sizeof(enumARG));
- char **kp;
- int cnt=0;
if (argp)
{
+ int cnt = 0;
+ char **kp = (char **)0;
int ccase, cunique;
+
argp->kwds = va_arg(*ap,char **);
ccase = va_arg(*ap,int);
cunique = va_arg(*ap,int);
argp->checkcase = ccase ? TRUE : FALSE;
argp->checkunique = cunique ? TRUE : FALSE;
-
+
kp = argp->kwds;
- while( (*kp++) ) cnt++;
+ while( (kp && *kp++) ) cnt++;
argp->count = cnt;
}
return (void *)argp;
@@ -62,11 +63,12 @@ static void *Make_Enum_Type(va_list * ap)
+--------------------------------------------------------------------------*/
static void *Copy_Enum_Type(const void * argp)
{
- const enumARG *ap = (const enumARG *)argp;
enumARG *result = (enumARG *)0;
if (argp)
{
+ const enumARG *ap = (const enumARG *)argp;
+
result = (enumARG *)malloc(sizeof(enumARG));
if (result)
*result = *ap;
@@ -165,14 +167,14 @@ static bool Check_Enum_Field(FIELD * field, const void * argp)
char *s, *t, *p;
int res;
- while( (s=(*kwds++)) )
+ while( kwds && (s=(*kwds++)) )
{
if ((res=Compare((unsigned char *)s,bp,ccase))!=NOMATCH)
{
p=t=s; /* t is at least a partial match */
if ((unique && res!=EXACT))
{
- while( (p = *kwds++) )
+ while( kwds && (p = *kwds++) )
{
if ((res=Compare((unsigned char *)p,bp,ccase))!=NOMATCH)
{
@@ -218,18 +220,20 @@ static bool Next_Enum(FIELD * field, const void * argp)
int cnt = args->count;
unsigned char *bp = (unsigned char *)field_buffer(field,0);
- while(cnt--)
- {
- if (Compare((unsigned char *)(*kwds++),bp,ccase)==EXACT)
- break;
- }
- if (cnt<=0)
- kwds = args->kwds;
- if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
- {
- set_field_buffer(field,0,*kwds);
- return TRUE;
- }
+ if (kwds) {
+ while(cnt--)
+ {
+ if (Compare((unsigned char *)(*kwds++),bp,ccase)==EXACT)
+ break;
+ }
+ if (cnt<=0)
+ kwds = args->kwds;
+ if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
+ {
+ set_field_buffer(field,0,*kwds);
+ return TRUE;
+ }
+ }
return FALSE;
}
@@ -252,20 +256,22 @@ static bool Previous_Enum(FIELD * field, const void * argp)
bool ccase = args->checkcase;
unsigned char *bp = (unsigned char *)field_buffer(field,0);
- while(cnt--)
- {
- if (Compare((unsigned char *)(*kwds--),bp,ccase)==EXACT)
- break;
- }
-
- if (cnt<=0)
- kwds = &args->kwds[args->count-1];
-
- if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
- {
- set_field_buffer(field,0,*kwds);
- return TRUE;
- }
+ if (kwds) {
+ while(cnt--)
+ {
+ if (Compare((unsigned char *)(*kwds--),bp,ccase)==EXACT)
+ break;
+ }
+
+ if (cnt<=0)
+ kwds = &args->kwds[args->count-1];
+
+ if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
+ {
+ set_field_buffer(field,0,*kwds);
+ return TRUE;
+ }
+ }
return FALSE;
}
diff --git a/contrib/ncurses/include/Caps b/contrib/ncurses/include/Caps
index 8e4435cc2b38..62054fe8d085 100644
--- a/contrib/ncurses/include/Caps
+++ b/contrib/ncurses/include/Caps
@@ -29,7 +29,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
-# $Id: Caps,v 1.25 1999/11/27 20:13:55 tom Exp $
+# $Id: Caps,v 1.28 2000/10/01 02:07:36 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@@ -334,7 +334,7 @@ cursor_down cud1 str do YBCGE down one line
cursor_home home str ho YBCGE home cursor (if no cup)
cursor_invisible civis str vi YB-G- make cursor invisible
cursor_left cub1 str le YBCGE move left one space
-cursor_mem_address mrcup str CM YB-G- memory relative cursor addressing
+cursor_mem_address mrcup str CM YB-G- memory relative cursor addressing, move to row #1 columns #2
cursor_normal cnorm str ve YBCGE make cursor appear normal (undo civis/cvvis)
cursor_right cuf1 str nd YBCGE non-destructive space (move right one space)
cursor_to_ll ll str ll YBCGE last line, first column (if no cup)
@@ -454,7 +454,7 @@ set_attributes sgr str sa YB-G- define video attributes #1-#9 (PG9)
set_tab hts str st YB-G- set a tab in every row, current columns
set_window wind str wi -B-GE current window is lines #1-#2 cols #3-#4
tab ht str ta YBCGE tab to next 8-space hardware tab stop
-to_status_line tsl str ts YB-G- move to status line
+to_status_line tsl str ts YB-G- move to status line, column #1
underline_char uc str uc YBCG- underline char and move past it
up_half_line hu str hu YB-G- half a line up
init_prog iprog str iP -B--- path name of program for initialization
@@ -633,10 +633,10 @@ set_background setb str Sb ----- Set background color #1
#
# SVr4 added these capabilities to support printers
#
-change_char_pitch cpi str ZA ----- Change number of characters per inch
-change_line_pitch lpi str ZB ----- Change number of lines per inch
-change_res_horz chr str ZC ----- Change horizontal resolution
-change_res_vert cvr str ZD ----- Change vertical resolution
+change_char_pitch cpi str ZA ----- Change number of characters per inch to #1
+change_line_pitch lpi str ZB ----- Change number of lines per inch to #1
+change_res_horz chr str ZC ----- Change horizontal resolution to #1
+change_res_vert cvr str ZD ----- Change vertical resolution to #1
define_char defc str ZE ----- Define a character
enter_doublewide_mode swidm str ZF ----- Enter double-wide mode
enter_draft_quality sdrfq str ZG ----- Enter draft-quality mode
@@ -661,14 +661,14 @@ micro_column_address mhpa str ZY ----- Like column_address in micro mode
micro_down mcud1 str ZZ ----- Like cursor_down in micro mode
micro_left mcub1 str Za ----- Like cursor_left in micro mode
micro_right mcuf1 str Zb ----- Like cursor_right in micro mode
-micro_row_address mvpa str Zc ----- Like row_address in micro mode
+micro_row_address mvpa str Zc ----- Like row_address #1 in micro mode
micro_up mcuu1 str Zd ----- Like cursor_up in micro mode
order_of_pins porder str Ze ----- Match software bits to print-head pins
parm_down_micro mcud str Zf ----- Like parm_down_cursor in micro mode
parm_left_micro mcub str Zg ----- Like parm_left_cursor in micro mode
parm_right_micro mcuf str Zh ----- Like parm_right_cursor in micro mode
parm_up_micro mcuu str Zi ----- Like parm_up_cursor in micro mode
-select_char_set scs str Zj ----- Select character set
+select_char_set scs str Zj ----- Select character set, #1
set_bottom_margin smgb str Zk ----- Set bottom margin at current line
set_bottom_margin_parm smgbp str Zl ----- Set bottom margin at line #1 or #2 lines from bottom
set_left_margin_parm smglp str Zm ----- Set left (right) margin at column #1 (#2)
@@ -701,9 +701,9 @@ char_set_names csnm str Zy ----- List of character set names
key_mouse kmous str Km ----- Mouse event has occurred
mouse_info minfo str Mi ----- Mouse status information
req_mouse_pos reqmp str RQ ----- Request mouse position
-get_mouse getm str Gm ----- Curses should get button events
-set_a_foreground setaf str AF ----- Set foreground color using ANSI escape
-set_a_background setab str AB ----- Set background color using ANSI escape
+get_mouse getm str Gm ----- Curses should get button events, parameter #1 not documented.
+set_a_foreground setaf str AF ----- Set foreground color to #1, using ANSI escape
+set_a_background setab str AB ----- Set background color to #1, using ANSI escape
pkey_plab pfxl str xl ----- Program function key #1 to type string #2 and show string #3
device_type devt str dv ----- Indicate language/codeset support
code_set_init csin str ci ----- Init sequence for multiple codesets
@@ -724,7 +724,7 @@ set_page_length slines str YZ ----- Set page length to #1 lines
#
# SVr4 added these capabilities for direct PC-clone support
#
-display_pc_char dispc str S1 ----- Display PC character
+display_pc_char dispc str S1 ----- Display PC character #1
enter_pc_charset_mode smpch str S2 ----- Enter PC character display mode
exit_pc_charset_mode rmpch str S3 ----- Exit PC character display mode
enter_scancode_mode smsc str S4 ----- Enter PC scancode mode
diff --git a/contrib/ncurses/include/MKncurses_def.sh b/contrib/ncurses/include/MKncurses_def.sh
new file mode 100755
index 000000000000..3ca08c33dd31
--- /dev/null
+++ b/contrib/ncurses/include/MKncurses_def.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# $Id: MKncurses_def.sh,v 1.1 2000/09/02 17:37:35 tom Exp $
+##############################################################################
+# Copyright (c) 2000 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# MKncurses_def.sh -- generate fallback definitions for ncurses_cfg.h
+#
+# Author: Thomas E. Dickey <dickey@herndon4.his.com> 2000
+#
+# Given the choice between constructs such as
+#
+# #if defined(foo) && foo
+# #if foo
+#
+# we chose the latter. It is guaranteed by the language standard, and there
+# appear to be no broken compilers that do not honor that detail. But some
+# people want to use gcc's -Wundef option (corresponding to one of the less
+# useful features in Watcom's compiler) to check for misspellings. So we
+# generate a set of fallback definitions to quiet the warnings without making
+# the code ugly.
+#
+DEFS="${1-ncurses_defs}"
+cat <<EOF
+/*
+ * This file is generated by $0
+ */
+
+#ifndef NC_DEFINE_H
+#define NC_DEFINE_H 1
+
+EOF
+
+${AWK-awk} <$DEFS '
+!/^[@#]/ {
+ if ( NF == 1 )
+ {
+ print "#ifndef", $1
+ print "#define", $1, "0"
+ print "#endif"
+ print ""
+ } else if ( NF != 0 ) {
+ print "#ifndef", $1
+ printf "#define"
+ for (n = 1; n <= NF; n++) {
+ printf " %s", $n
+ }
+ print ""
+ print "#endif"
+ print ""
+ }
+}
+END {
+print "#endif /* NC_DEFINE_H */"
+ }
+'
diff --git a/contrib/ncurses/include/MKparametrized.sh b/contrib/ncurses/include/MKparametrized.sh
index cbbc3e0d62eb..4c3365529816 100755
--- a/contrib/ncurses/include/MKparametrized.sh
+++ b/contrib/ncurses/include/MKparametrized.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# $Id: MKparametrized.sh,v 1.5 2000/10/01 00:57:24 tom Exp $
#
# MKparametrized.sh -- generate indirection vectors for various sort methods
#
@@ -10,7 +11,7 @@ cat <<EOF
/*
* parametrized.h --- is a termcap capability parametrized?
*
- * Note: this file is generated using parametrized.sh, do not edit by hand.
+ * Note: this file is generated using MKparametrized.sh, do not edit by hand.
* A value of -1 in the table means suppress both pad and % translations.
* A value of 0 in the table means do pad but not % translations.
* A value of 1 in the table means do both pad and % translations.
diff --git a/contrib/ncurses/include/Makefile.in b/contrib/ncurses/include/Makefile.in
index 29c0d7cc4521..49190916d681 100644
--- a/contrib/ncurses/include/Makefile.in
+++ b/contrib/ncurses/include/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.23 2000/05/28 01:33:52 tom Exp $
+# $Id: Makefile.in,v 1.26 2000/09/02 17:53:40 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@@ -42,7 +42,7 @@
SHELL = /bin/sh
THIS = Makefile
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -66,6 +66,7 @@ CONFIG_SRC = \
# These files are generated by this makefile
AUTO_SRC = \
hashsize.h \
+ ncurses_def.h \
parametrized.h \
term.h
@@ -82,14 +83,17 @@ term.h: $(srcdir)/Caps MKterm.h.awk
hashsize.h: $(srcdir)/Caps $(srcdir)/MKhashsize.sh
sh $(srcdir)/MKhashsize.sh $(srcdir)/Caps >$@
+ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
+ AWK=$(AWK) sh $(srcdir)/MKncurses_def.sh $(srcdir)/ncurses_defs >$@
+
parametrized.h: $(srcdir)/Caps $(srcdir)/MKparametrized.sh
AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(srcdir)/Caps >$@
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/include/curses.h.in b/contrib/ncurses/include/curses.h.in
index 48100875cc80..5b9e19be266d 100644
--- a/contrib/ncurses/include/curses.h.in
+++ b/contrib/ncurses/include/curses.h.in
@@ -31,7 +31,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-/* $Id: curses.h.in,v 1.92 2000/04/29 18:52:53 tom Exp $ */
+/* $Id: curses.h.in,v 1.96 2000/09/16 16:11:01 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@@ -357,13 +357,13 @@ extern int wresize (WINDOW *, int, int);
* We cannot define these in ncurses_cfg.h, since they require parameters to be
* passed (that's non-portable).
*/
-#if GCC_PRINTF
+#ifdef GCC_PRINTF
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#else
#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
#endif
-#if GCC_SCANF
+#ifdef GCC_SCANF
#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
#else
#define GCC_SCANFLIKE(fmt,var) /*nothing*/
@@ -726,6 +726,8 @@ extern int tigetflag(NCURSES_CONST char *); /* implemented */
extern int tigetnum(NCURSES_CONST char *); /* implemented */
extern char *tigetstr(NCURSES_CONST char *); /* implemented */
extern void timeout(int); /* generated */
+extern int touchline(WINDOW *, int, int); /* generated */
+extern int touchwin(WINDOW *); /* generated */
extern char *tparm(NCURSES_CONST char *, ...); /* implemented */
extern int typeahead(int); /* implemented */
extern int ungetch(int); /* implemented */
@@ -1341,6 +1343,7 @@ extern void trace(const unsigned int);
#define TRACE_ICALLS 0x0200 /* trace internal/nested calls */
#define TRACE_CCALLS 0x0400 /* trace per-character calls */
#define TRACE_DATABASE 0x0800 /* trace read/write of terminfo/termcap data */
+#define TRACE_ATTRS 0x1000 /* trace attribute updates */
#define TRACE_MAXIMUM 0xffff /* maximum trace level */
#if defined(TRACE) || defined(NCURSES_TEST)
diff --git a/contrib/ncurses/include/edit_cfg.sh b/contrib/ncurses/include/edit_cfg.sh
index baa31f687d1e..ef9694cb83ee 100755
--- a/contrib/ncurses/include/edit_cfg.sh
+++ b/contrib/ncurses/include/edit_cfg.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: edit_cfg.sh,v 1.9 1998/02/11 12:13:46 tom Exp $
+# $Id: edit_cfg.sh,v 1.10 2000/09/09 20:29:58 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -28,7 +28,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,2000
#
# Edit the default value of the term.h file based on the autoconf-generated
# values:
@@ -43,7 +43,6 @@ for name in \
HAVE_TCGETATTR \
HAVE_TERMIOS_H \
HAVE_TERMIO_H \
- NCURSES_CONST \
BROKEN_LINKER
do
mv $2 $BAK
diff --git a/contrib/ncurses/include/ncurses_cfg.hin b/contrib/ncurses/include/ncurses_cfg.hin
index f80fb83f0cd1..4d40dab8848b 100644
--- a/contrib/ncurses/include/ncurses_cfg.hin
+++ b/contrib/ncurses/include/ncurses_cfg.hin
@@ -30,18 +30,24 @@
* Author: Thomas E. Dickey <dickey@clark.net> 1997 *
****************************************************************************/
/*
- * $Id: ncurses_cfg.hin,v 1.2 1998/02/11 12:13:46 tom Exp $
+ * $Id: ncurses_cfg.hin,v 1.3 2000/09/02 17:13:32 tom Exp $
*
* This is a template-file used to generate the "ncurses_cfg.h" file.
*
- * Rather than list every definition, the configuration script substitutes
- * the definitions that it finds using 'sed'. You need a patch (971222)
- * to autoconf 2.12 to do this.
+ * Rather than list every definition, the configuration script substitutes the
+ * definitions that it finds using 'sed'. You need a patch (original date
+ * 971222) to autoconf 2.12 or 2.13 to do this.
+ *
+ * See:
+ * http://dickey.his.com/autoconf/
+ * ftp://dickey.his.com/autoconf/
*/
#ifndef NC_CONFIG_H
#define NC_CONFIG_H
@DEFS@
+#include <ncurses_def.h>
+
/* The C compiler may not treat these properly but C++ has to */
#ifdef __cplusplus
#undef const
diff --git a/contrib/ncurses/include/ncurses_defs b/contrib/ncurses/include/ncurses_defs
new file mode 100644
index 000000000000..e4a391f1fd67
--- /dev/null
+++ b/contrib/ncurses/include/ncurses_defs
@@ -0,0 +1,151 @@
+# $Id: ncurses_defs,v 1.4 2000/10/08 01:04:00 tom Exp $
+##############################################################################
+# Copyright (c) 2000 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# See "MKncurses_def.sh" for an explanation.
+#
+# (hint: don't try to define NDEBUG ;-)
+
+BROKEN_LINKER
+BSD_TPUTS
+CC_HAS_INLINE_FUNCS
+CC_HAS_PROTOS
+CPP_HAS_PARAM_INIT
+DECL_ERRNO
+ETIP_NEEDS_MATH_H
+GCC_NORETURN /* nothing */
+GCC_UNUSED /* nothing */
+HAVE_BIG_CORE
+HAVE_BSD_CGETENT
+HAVE_BUILTIN_H
+HAVE_DIRENT_H
+HAVE_ERRNO
+HAVE_FCNTL_H
+HAVE_FORM_H
+HAVE_GETCWD
+HAVE_GETEGID
+HAVE_GETEUID
+HAVE_GETOPT_H
+HAVE_GETTIMEOFDAY
+HAVE_GETTTYNAM
+HAVE_GPP_BUILTIN_H
+HAVE_GXX_BUILTIN_H
+HAVE_HAS_KEY
+HAVE_ISASCII
+HAVE_ISSETUGID
+HAVE_LIBDBMALLOC
+HAVE_LIBDMALLOC
+HAVE_LIBFORM
+HAVE_LIBGPM
+HAVE_LIBMENU
+HAVE_LIBPANEL
+HAVE_LIMITS_H
+HAVE_LINK
+HAVE_LOCALE_H
+HAVE_LONG_FILE_NAMES
+HAVE_MEMCCPY
+HAVE_MENU_H
+HAVE_MKSTEMP
+HAVE_NANOSLEEP
+HAVE_NC_ALLOC_H
+HAVE_PANEL_H
+HAVE_POLL
+HAVE_POLL_H
+HAVE_REGEXPR_H_FUNCS
+HAVE_REGEXP_H_FUNCS
+HAVE_REGEX_H_FUNCS
+HAVE_REMOVE
+HAVE_RESIZETERM
+HAVE_SELECT
+HAVE_SETBUF
+HAVE_SETBUFFER
+HAVE_SETVBUF
+HAVE_SIGACTION
+HAVE_SIGVEC
+HAVE_SIZECHANGE
+HAVE_STRDUP
+HAVE_STRSTR
+HAVE_SYMLINK
+HAVE_SYS_BSDTYPES_H
+HAVE_SYS_IOCTL_H
+HAVE_SYS_PARAM_H
+HAVE_SYS_POLL_H
+HAVE_SYS_SELECT_H
+HAVE_SYS_TERMIO_H
+HAVE_SYS_TIMES_H
+HAVE_SYS_TIME_H
+HAVE_SYS_TIME_SELECT
+HAVE_TCGETATTR
+HAVE_TCGETPGRP
+HAVE_TELL
+HAVE_TERMIOS_H
+HAVE_TERMIO_H
+HAVE_TIMES
+HAVE_TTYENT_H
+HAVE_TYPEINFO
+HAVE_TYPE_SIGACTION
+HAVE_UNISTD_H
+HAVE_UNLINK
+HAVE_USE_DEFAULT_COLORS
+HAVE_VFSCANF
+HAVE_VSNPRINTF
+HAVE_VSSCANF
+HAVE_WORKING_POLL
+HAVE_WRESIZE
+MIXEDCASE_FILENAMES
+NCURSES_EXPANDED
+NCURSES_EXT_FUNCS
+NCURSES_NOMACROS
+NCURSES_NO_PADDING
+NDEBUG
+NEED_PTEM_H
+NO_LEAKS
+PURE_TERMINFO
+RETSIGTYPE
+STDC_HEADERS
+SVR4_ACTION
+SVR4_TERMIO
+SYSTEM_NAME "unknown"
+TERMINFO "none"
+TYPEOF_CHTYPE
+USE_COLORFGBG
+USE_DATABASE
+USE_GETCAP
+USE_GETCAP_CACHE
+USE_HARD_TABS
+USE_HASHMAP
+USE_LINKS
+USE_MY_MEMMOVE
+USE_OK_BCOPY
+USE_RCS_IDS
+USE_SAFE_SPRINTF
+USE_SCROLL_HINTS
+USE_SIGWINCH
+USE_SYMLINKS
+USE_WIDEC_SUPPORT
+USE_XMC_SUPPORT
diff --git a/contrib/ncurses/include/termcap.h.in b/contrib/ncurses/include/termcap.h.in
index 5c6c07a8e8d0..21c62398e0bd 100644
--- a/contrib/ncurses/include/termcap.h.in
+++ b/contrib/ncurses/include/termcap.h.in
@@ -31,7 +31,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-/* $Id: termcap.h.in,v 1.10 1999/01/09 22:38:04 Uchiyama.Yasushi Exp $ */
+/* $Id: termcap.h.in,v 1.12 2000/10/08 01:06:37 tom Exp $ */
#ifndef _NCU_TERMCAP_H
#define _NCU_TERMCAP_H 1
@@ -45,7 +45,6 @@ extern "C"
#endif /* __cplusplus */
#include <sys/types.h>
-@OSPEED_INCLUDES@
#undef NCURSES_CONST
#define NCURSES_CONST @NCURSES_CONST@
@@ -53,7 +52,7 @@ extern "C"
extern char PC;
extern char *UP;
extern char *BC;
-extern @OSPEED_TYPE@ ospeed;
+extern short ospeed;
#if !defined(_NCU_TERM_H)
extern char *tgetstr(NCURSES_CONST char *, char **);
diff --git a/contrib/ncurses/include/tic.h b/contrib/ncurses/include/tic.h
index 24f12bcc79be..bba0c0ffbff4 100644
--- a/contrib/ncurses/include/tic.h
+++ b/contrib/ncurses/include/tic.h
@@ -32,9 +32,9 @@
****************************************************************************/
/*
+ * $Id: tic.h,v 1.35 2000/09/09 19:47:16 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
- *
*/
#ifndef __TIC_H
@@ -237,6 +237,9 @@ extern const struct name_table_entry * const *_nc_get_hash_table(bool);
#define TERMINFO "/usr/share/terminfo"
#endif
+/* access.c */
+extern char *_nc_basename(char *);
+
/* comp_hash.c: name lookup */
struct name_table_entry const *_nc_find_entry(const char *,
const struct name_table_entry *const *);
diff --git a/contrib/ncurses/man/Makefile.in b/contrib/ncurses/man/Makefile.in
index a43bc25dee8b..0d7648acd7ae 100644
--- a/contrib/ncurses/man/Makefile.in
+++ b/contrib/ncurses/man/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.26 2000/04/01 22:15:22 tom Exp $
+# $Id: Makefile.in,v 1.28 2000/08/19 19:15:44 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -36,27 +36,25 @@
SHELL = /bin/sh
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
mandir = @mandir@
-ticdir = $(datadir)/terminfo
-
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
all \
sources: terminfo.5
-$(INSTALL_PREFIX)$(mandir) :
+$(DESTDIR)$(mandir) :
$(srcdir)/../mkinstalldirs $@
-EDITARGS = $(INSTALL_PREFIX)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
+EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
-install install.man : terminfo.5 $(INSTALL_PREFIX)$(mandir)
+install install.man : terminfo.5 $(DESTDIR)$(mandir)
sh ./edit_man.sh installing $(EDITARGS)
uninstall uninstall.man :
diff --git a/contrib/ncurses/man/captoinfo.1m b/contrib/ncurses/man/captoinfo.1m
index 16dbe805537f..40c09f5a213f 100644
--- a/contrib/ncurses/man/captoinfo.1m
+++ b/contrib/ncurses/man/captoinfo.1m
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: captoinfo.1m,v 1.14 2000/03/19 02:20:28 tom Exp $
+.\" $Id: captoinfo.1m,v 1.16 2000/08/13 01:56:49 tom Exp $
.TH captoinfo 1M ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBcaptoinfo\fR - convert a \fItermcap\fR description into a \fIterminfo\fR description
.SH SYNOPSIS
@@ -178,7 +178,7 @@ You can use other \fItic\fR options such as \fB-f\fR and \fB-x\fR.
The trace option isn't identical to SVr4's. Under SVr4, instead of following
the -v with a trace level n, you repeat it n times.
.SH SEE ALSO
-\fBcurses\fR(3X), \fBinfocmp\fR(1M), \fBterminfo\fR(\*n)
+\fBcurses\fR(3X), \fB@INFOCMP@\fR(1M), \fBterminfo\fR(\*n)
.SH AUTHOR
Eric S. Raymond <esr@snark.thyrsus.com>
.\"#
diff --git a/contrib/ncurses/man/clear.1 b/contrib/ncurses/man/clear.1
index 71d2883b747e..4c4991f1d1a3 100644
--- a/contrib/ncurses/man/clear.1
+++ b/contrib/ncurses/man/clear.1
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: clear.1,v 1.2 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: clear.1,v 1.3 2000/07/15 23:59:35 china Exp $
.TH clear 1 ""
.ds n 5
.SH NAME
@@ -39,7 +39,7 @@
environment for the terminal type and then in the \fBterminfo\fR database to
figure out how to clear the screen.
.SH SEE ALSO
-\fBtput\fR(1), \fBterminfo\fR(\*n)
+\fB@TPUT@\fR(1), \fBterminfo\fR(\*n)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
diff --git a/contrib/ncurses/man/curs_attr.3x b/contrib/ncurses/man/curs_attr.3x
index 03c8668029ca..e884fa888bb0 100644
--- a/contrib/ncurses/man/curs_attr.3x
+++ b/contrib/ncurses/man/curs_attr.3x
@@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_attr.3x,v 1.21 2000/07/01 16:50:07 tom Exp $
+.\" $Id: curs_attr.3x,v 1.22 2000/07/08 11:59:58 tom Exp $
.TH curs_attr 3X ""
.SH NAME
\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
@@ -38,7 +38,8 @@
\fBattr_on\fR, \fBwattr_on\fR,
\fBattr_set\fR, \fBwattr_set\fR,
\fBchgat\fR, \fBwchgat\fR,
-\fBmvchgat\fR, \fBmvwchgat\fR - \fBcurses\fR character and window attribute control routines
+\fBmvchgat\fR, \fBmvwchgat\fR,
+\fBPAIR_NUMBER\fR - \fBcurses\fR character and window attribute control routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
diff --git a/contrib/ncurses/man/curs_color.3x b/contrib/ncurses/man/curs_color.3x
index 03cbba6349e6..ccf8cf82cfb7 100644
--- a/contrib/ncurses/man/curs_color.3x
+++ b/contrib/ncurses/man/curs_color.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,13 +26,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_color.3x,v 1.10 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_color.3x,v 1.16 2000/07/15 22:57:03 tom Exp $
.TH curs_color 3X ""
.SH NAME
-\fBstart_color\fR, \fBinit_pair\fR,
-\fBinit_color\fR, \fBhas_colors\fR, \fBcan_change_color\fR,
-\fBcolor_content\fR, \fBpair_content\fR - \fBcurses\fR color
-manipulation routines
+\fBstart_color\fR,
+\fBinit_pair\fR,
+\fBinit_color\fR,
+\fBhas_colors\fR,
+\fBcan_change_color\fR,
+\fBcolor_content\fR,
+\fBpair_content\fR,
+\fBCOLOR_PAIR\fR - \fBcurses\fR color manipulation routines
.SH SYNOPSIS
\fB# include <curses.h>\fR
.br
@@ -83,13 +87,27 @@ just turned on.
The \fBinit_pair\fR routine changes the definition of a color-pair. It takes
three arguments: the number of the color-pair to be changed, the foreground
-color number, and the background color number. The value of the first argument
-must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR. The value of the second and
+color number, and the background color number.
+For portable applications:
+.TP 5
+-
+The value of the first argument
+must be between \fB1\fR and \fBCOLOR_PAIRS-1\fR.
+.TP 5
+-
+The value of the second and
third arguments must be between 0 and \fBCOLORS\fR (the 0 color pair is wired
-to white on black and cannot be changed). If the color-pair was previously
+to white on black and cannot be changed).
+.PP
+If the color-pair was previously
initialized, the screen is refreshed and all occurrences of that color-pair is
changed to the new definition.
+As an extension, ncurses allows you to set color pair 0 via
+the \fBassume_default_colors\fR routine, or to specify the use of
+default colors (color number \fB-1\fR) if you first invoke the
+\fBuse_default_colors\fR routine.
+
The \fBinit_color\fR routine changes the definition of a color. It takes four
arguments: the number of the color to be changed followed by three RGB values
(for the amounts of red, green, and blue components). The value of the first
@@ -160,15 +178,18 @@ the background color used when parts of a window are blanked by erasing or
scrolling operations, see \fBcurs_bkgd\fR(3X).
Several caveats apply on 386 and 486 machines with VGA-compatible graphics:
-
+.TP 5
+-
COLOR_YELLOW is actually brown. To get yellow, use COLOR_YELLOW combined with
the \fBA_BOLD\fR attribute.
-
+.TP 5
+-
The A_BLINK attribute should in theory cause the background to go bright. This
often fails to work, and even some cards for which it mostly works (such as the
Paradise and compatibles) do the wrong thing when you try to set a bright
"yellow" background (you get a blinking yellow foreground instead).
-
+.TP 5
+-
Color RGB values are not settable.
.SH PORTABILITY
This implementation satisfies XSI Curses's minimum maximums
@@ -177,11 +198,16 @@ for \fBCOLORS\fR and \fBCOLOR_PAIRS\fR.
The \fBinit_pair\fP routine accepts negative values of foreground
and background color to support the \fBuse_default_colors\fP extension,
but only if that routine has been first invoked.
+.PP
+The assumption that \fBCOLOR_BLACK\fR is the default
+background color for all terminals can be modified using the
+\fBassume_default_colors\fP extension,
+..
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_initscr\fR(3X),
\fBcurs_attr\fR(3X),
-\fBdft_fgbg\fR(3X)
+\fBdefault_colors\fR(3X)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
diff --git a/contrib/ncurses/man/curs_extend.3x b/contrib/ncurses/man/curs_extend.3x
index 16a3f80b27aa..632fc38273d0 100644
--- a/contrib/ncurses/man/curs_extend.3x
+++ b/contrib/ncurses/man/curs_extend.3x
@@ -28,8 +28,8 @@
.\"
.\" Author: Thomas E. Dickey <dickey@clark.net> 1999
.\"
-.\" $Id: curs_extend.3x,v 1.4 2000/07/01 16:43:11 tom Exp $
-.TH use_default_colors 3X ""
+.\" $Id: curs_extend.3x,v 1.6 2000/07/15 22:57:20 tom Exp $
+.TH curs_extend 3X ""
.SH NAME
\fBcurs_extend\fR:
\fBcurses_version\fP,
@@ -72,8 +72,8 @@ any code depending on them be conditioned using NCURSES_VERSION.
\fBcurs_getch\fR(3X),
\fBcurs_mouse\fR(3X),
\fBcurs_print\fR(3X),
+\fBdefault_colors\fR(3X),
\fBdefine_key\fR(3X),
-\fBdft_fgbg\fR(3X),
\fBkeybound\fR(3X),
\fBkeyok\fR(3X),
\fBresizeterm\fR(3X),
diff --git a/contrib/ncurses/man/curs_initscr.3x b/contrib/ncurses/man/curs_initscr.3x
index 594d53fa6196..daa5e1e822de 100644
--- a/contrib/ncurses/man/curs_initscr.3x
+++ b/contrib/ncurses/man/curs_initscr.3x
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_initscr.3x,v 1.9 2000/07/01 19:56:51 tom Exp $
+.\" $Id: curs_initscr.3x,v 1.10 2000/07/08 12:47:39 tom Exp $
.TH curs_initscr 3X ""
.SH NAME
\fBinitscr\fR,
@@ -42,7 +42,7 @@
.br
\fBint endwin(void);\fR
.br
-\fBint isendwin(void);\fR
+\fBbool isendwin(void);\fR
.br
\fBSCREEN *newterm(const char *type, FILE *outfd, FILE *infd);\fR
.br
diff --git a/contrib/ncurses/man/curs_mouse.3x b/contrib/ncurses/man/curs_mouse.3x
index 45fdd2a38f79..316598a5594c 100644
--- a/contrib/ncurses/man/curs_mouse.3x
+++ b/contrib/ncurses/man/curs_mouse.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,12 +27,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.'" $Id: curs_mouse.3x,v 1.13 1999/09/11 17:28:28 tom Exp $
+.'" $Id: curs_mouse.3x,v 1.15 2000/07/08 12:50:08 tom Exp $
.TH curs_mouse 3X ""
.SH NAME
\fBgetmouse\fR, \fBungetmouse\fR,
\fBmousemask\fR, \fBwenclose\fR,
-\fBwmouse_trafo\fR, \fBmouseinterval\fR - mouse interface through curses
+\fBmouse_trafo\fR, \fBwmouse_trafo\fR,
+\fBmouseinterval\fR - mouse interface through curses
.SH SYNOPSIS
.nf
\fB#include <curses.h>\fR
@@ -56,7 +57,11 @@ MEVENT;\fR
.br
\fBbool wenclose(WINDOW *win, int y, int x);\fR
.br
-\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen);\fR
+\fBbool mouse_trafo(int* pY, int* pX, bool to_screen);\fR
+.br
+\fBbool wmouse_trafo(const WINDOW* win, int* pY, int* pX,\fR
+.br
+ \fBbool to_screen);\fR
.br
\fBint mouseinterval(int erval);\fR
.br
diff --git a/contrib/ncurses/man/curs_pad.3x b/contrib/ncurses/man/curs_pad.3x
index 35138f120336..0813a0a48f64 100644
--- a/contrib/ncurses/man/curs_pad.3x
+++ b/contrib/ncurses/man/curs_pad.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,12 +26,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_pad.3x,v 1.8 1998/12/26 20:09:03 tom Exp $
+.\" $Id: curs_pad.3x,v 1.9 2000/07/04 22:38:13 tom Exp $
.TH curs_pad 3X ""
.SH NAME
\fBnewpad\fR, \fBsubpad\fR, \fBprefresh\fR,
-\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBcurses\fR
-pads
+\fBpnoutrefresh\fR, \fBpechochar\fR - create and display \fBcurses\fR pads
.SH SYNOPSIS
\fB#include <curses.h>\fR
diff --git a/contrib/ncurses/man/curs_scanw.3x b/contrib/ncurses/man/curs_scanw.3x
index c0053315c255..b7f3795d8101 100644
--- a/contrib/ncurses/man/curs_scanw.3x
+++ b/contrib/ncurses/man/curs_scanw.3x
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_scanw.3x,v 1.10 2000/07/01 20:06:29 tom Exp $
+.\" $Id: curs_scanw.3x,v 1.11 2000/07/15 21:48:17 tom Exp $
.TH curs_scanw 3X ""
.SH NAME
\fBscanw\fR,
\fBwscanw\fR,
\fBmvscanw\fR,
\fBmvwscanw\fR,
-\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR widow
+\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
diff --git a/contrib/ncurses/man/curs_termattrs.3x b/contrib/ncurses/man/curs_termattrs.3x
index 2ece5a3587df..3938bc0f0326 100644
--- a/contrib/ncurses/man/curs_termattrs.3x
+++ b/contrib/ncurses/man/curs_termattrs.3x
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_termattrs.3x,v 1.4 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: curs_termattrs.3x,v 1.6 2000/07/08 12:53:34 tom Exp $
.TH curs_termattrs 3X ""
.SH NAME
\fBbaudrate\fR, \fBerasechar\fR, \fBhas_ic\fR,
@@ -39,9 +39,9 @@
.br
\fBchar erasechar(void);\fR
.br
-\fBint has_ic(void);\fR
+\fBbool has_ic(void);\fR
.br
-\fBint has_il(void);\fR
+\fBbool has_il(void);\fR
.br
\fBchar killchar(void);\fR
.br
diff --git a/contrib/ncurses/man/curs_touch.3x b/contrib/ncurses/man/curs_touch.3x
index 8211b06a7490..58ffa9f6042b 100644
--- a/contrib/ncurses/man/curs_touch.3x
+++ b/contrib/ncurses/man/curs_touch.3x
@@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_touch.3x,v 1.7 2000/07/01 20:08:04 tom Exp $
+.\" $Id: curs_touch.3x,v 1.8 2000/07/08 11:07:57 tom Exp $
.TH curs_touch 3X ""
.SH NAME
\fBtouchwin\fR,
@@ -46,9 +46,9 @@
.br
\fBint wtouchln(WINDOW *win, int y, int n, int changed);\fR
.br
-\fBint is_linetouched(WINDOW *win, int line);\fR
+\fBbool is_linetouched(WINDOW *win, int line);\fR
.br
-\fBint is_wintouched(WINDOW *win);\fR
+\fBbool is_wintouched(WINDOW *win);\fR
.br
.SH DESCRIPTION
The \fBtouchwin\fR and \fBtouchline\fR routines throw away all
diff --git a/contrib/ncurses/man/curs_trace.3x b/contrib/ncurses/man/curs_trace.3x
new file mode 100644
index 000000000000..a9dc57c7c7b3
--- /dev/null
+++ b/contrib/ncurses/man/curs_trace.3x
@@ -0,0 +1,150 @@
+.\"***************************************************************************
+.\" Copyright (c) 2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: curs_trace.3x,v 1.3 2000/07/29 16:34:24 tom Exp $
+.TH curs_trace 3X ""
+.SH NAME
+\fB_tracef\fR,
+\fB_tracedump\fR,
+\fB_traceattr\fR,
+\fB_traceattr2\fR,
+\fB_nc_tracebits\fR,
+\fB_tracechar\fR,
+\fB_tracechtype\fR,
+\fB_tracechtype2\fR,
+\fB_tracemouse\fR,
+\fBtrace\fR - \fBcurses\fR debugging routines
+.SH SYNOPSIS
+\fB#include <curses.h>\fR
+.br
+\fBvoid _tracef(const char *format, ...);\fR
+.br
+\fBvoid _tracedump(const char *label, WINDOW *win);\fR
+.br
+\fBchar *_traceattr(attr_t attr);\fR
+.br
+\fBchar *_traceattr2(int buffer, chtype ch);\fR
+.br
+\fBchar *_nc_tracebits(void);\fR
+.br
+\fBchar *_tracechar(const unsigned char ch);\fR
+.br
+\fBchar *_tracechtype(chtype ch);\fR
+.br
+\fBchar *_tracechtype2(int buffer, chtype ch);\fR
+.br
+\fBchar *_tracemouse(const MEVENT *event);\fR
+.br
+\fBvoid trace(const unsigned int param);\fR
+.SH DESCRIPTION
+The \fBtrace\fR routines are used for debugging the ncurses libraries,
+as well as applications which use the ncurses libraries.
+These functions are normally available only with the debugging library
+\fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
+profile) by defining the symbol \fBTRACE\fR.
+
+The principal parts of this interface are the \fBtrace\fR routine which
+selectively enables different tracing features, and the \fB_tracef\fR
+routine which writes formatted data to the \fItrace\fR file.
+
+Calling \fBtrace\fR with a nonzero parameter opens the file \fBtrace\fR
+in the current directory for output. The parameter is formed by OR'ing
+values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB<curses.h>\fR.
+These include:
+.TP 5
+TRACE_DISABLE
+turn off tracing.
+.TP 5
+TRACE_TIMES
+trace user and system times of updates.
+.TP 5
+TRACE_TPUTS
+trace tputs calls.
+.TP 5
+TRACE_UPDATE
+trace update actions, old & new screens.
+.TP 5
+TRACE_MOVE
+trace cursor movement and scrolling.
+.TP 5
+TRACE_CHARPUT
+trace all character outputs.
+.TP 5
+TRACE_ORDINARY
+trace all update actions.
+The old and new screen contents are written to the trace file
+for each refresh.
+.TP 5
+TRACE_CALLS
+trace all curses calls.
+The parameters for each call are traced, as well as return values.
+.TP 5
+TRACE_VIRTPUT
+trace virtual character puts, i.e., calls to \fBaddch\fR.
+.TP 5
+TRACE_IEVENT
+trace low-level input processing, including timeouts.
+.TP 5
+TRACE_BITS
+trace state of TTY control bits.
+.TP 5
+TRACE_ICALLS
+trace internal/nested calls.
+.TP 5
+TRACE_CCALLS
+trace per-character calls.
+.TP 5
+TRACE_DATABASE
+trace read/write of terminfo/termcap data.
+.TP 5
+TRACE_ATTRS
+trace changes to video attributes and colors.
+.TP 5
+TRACE_MAXIMUM
+maximum trace level, enables all of the separate trace features.
+
+Some tracing features are enabled whenever the \fBtrace\fR parameter
+is nonzero. Some features overlap.
+The specific names are used as a guideline.
+..
+.SH RETURN VALUE
+Routines which return a value are designed to be used as parameters
+to the \fB_tracef\fR routine.
+.SH PORTABILITY
+These functions are not part of the XSI interface.
+Some other curses implementations are known to
+have similar, undocumented features,
+but they are not compatible with ncurses.
+.SH SEE ALSO
+\fBcurses\fR(3X).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/contrib/ncurses/man/default_colors.3x b/contrib/ncurses/man/default_colors.3x
new file mode 100644
index 000000000000..9d6d97c9e803
--- /dev/null
+++ b/contrib/ncurses/man/default_colors.3x
@@ -0,0 +1,133 @@
+.\"***************************************************************************
+.\" Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999,2000
+.\"
+.\" $Id: default_colors.3x,v 1.13 2000/07/15 22:06:50 tom Exp $
+.TH default_colors 3X ""
+.SH NAME
+\fBdefault_colors\fR:
+\fBuse_default_colors\fR,
+\fBassume_default_colors\fR \- use terminal's default colors
+..
+.SH SYNOPSIS
+\fB#include <curses.h>\fP
+
+\fBint use_default_colors(void);\fP
+.br
+\fBint assume_default_colors(int fg, int bg);\fP
+..
+.SH DESCRIPTION
+The
+.I use_default_colors()
+and
+.I assume_default_colors()
+functions are extensions to the curses library.
+They are used with terminals that support ISO 6429 color, or equivalent.
+These terminals allow the application to reset color to an unspecified
+default value (e.g., with SGR 39 or SGR 49).
+.PP
+Applications that paint a colored background over the whole screen
+do not take advantage of SGR 39 and SGR 49.
+Some applications are designed to work with the default background,
+using colors only for text.
+For example, there are several implementations of the \fBls\fP program
+which use colors to denote different file types or permissions.
+These "color ls" programs do not necessarily modify the background color,
+typically using only the \fIsetaf\fP terminfo capability to set the
+foreground color.
+Full-screen applications that use default colors can achieve similar
+visual effects.
+.PP
+The first function,
+.I use_default_colors()
+tells the curses library to assign terminal default
+foreground/background colors to color number -1. So init_pair(x,COLOR_RED,-1)
+will initialize pair x as red on default background and init_pair(x,-1,COLOR_BLUE) will
+initialize pair x as default foreground on blue.
+.PP
+The other,
+.I assume_default_colors()
+is a refinement which tells which colors to paint for color pair 0.
+This function recognizes a special color number -1,
+which denotes the default terminal color.
+.PP
+The following are equivalent:
+.RS
+.br
+.I use_default_colors();
+.br
+.I assume_default_colors(-1,-1);
+.RE
+.PP
+These are ncurses extensions.
+For other curses implementations, color
+number -1 does not mean anything, just as for ncurses before a
+successful call of \fIuse_default_colors()\fP or \fIassume_default_colors()\fP.
+.PP
+Other curses implementations do not allow an application to modify color pair 0.
+They assume that the background is COLOR_BLACK,
+but do not ensure that the color pair 0 is painted to match the
+assumption.
+If your application does not use either
+.I use_default_colors()
+or
+.I assume_default_colors()
+ncurses will paint a white foreground (text) with black background
+for color pair 0.
+..
+.SH RETURN VALUE
+These functions return the integer \fBERR\fP upon failure and \fBOK\fP on success.
+They will fail if either the terminal does not support
+the \fIorig_pair\fP or \fIorig_colors\fP capability.
+If the \fIinitialize_pair\fP capability is found, this causes an
+error as well.
+..
+.SH NOTES
+Associated with this extension, the \fBinit_pair\fR(3X) function accepts
+negative arguments to specify default foreground or background
+colors.
+..
+.SH PORTABILITY
+These routines are specific to ncurses. They were not supported on
+Version 7, BSD or System V implementations. It is recommended that
+any code depending on them be conditioned using NCURSES_VERSION.
+..
+.SH SEE ALSO
+\fBcurs_color\fR(3X),
+\fBded\fP(1).
+..
+.SH AUTHOR
+Thomas Dickey (from an analysis of the requirements for color xterm
+for XFree86 3.1.2C, February 1996).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/contrib/ncurses/man/form_fieldtype.3x b/contrib/ncurses/man/form_fieldtype.3x
index 4c5dcb6616f8..d93ba281a1c8 100644
--- a/contrib/ncurses/man/form_fieldtype.3x
+++ b/contrib/ncurses/man/form_fieldtype.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,8 +27,8 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_fieldtype.3x,v 1.7 1998/11/29 01:07:16 Rick.Ohnemus Exp $
-.TH form_field 3X ""
+.\" $Id: form_fieldtype.3x,v 1.8 2000/07/15 22:02:03 tom Exp $
+.TH form_fieldtype 3X ""
.SH NAME
\fBform_fieldtype\fR - define validation-field types
.SH SYNOPSIS
diff --git a/contrib/ncurses/man/infocmp.1m b/contrib/ncurses/man/infocmp.1m
index a7449892d128..1276cca51837 100644
--- a/contrib/ncurses/man/infocmp.1m
+++ b/contrib/ncurses/man/infocmp.1m
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: infocmp.1m,v 1.25 2000/06/11 02:08:16 tom Exp $
+.\" $Id: infocmp.1m,v 1.27 2000/08/19 18:51:05 tom Exp $
.TH infocmp 1M ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions
.SH SYNOPSIS
@@ -171,7 +171,7 @@ were not needed.
The location of the compiled \fBterminfo\fR database is taken from the
environment variable \fBTERMINFO\fR . If the variable is not defined, or the
terminal is not found in that location, the system \fBterminfo\fR database,
-in \fB@DATADIR@/terminfo\fR, will be used. The options \fB-A\fR
+in \fB@TERMINFO@\fR, will be used. The options \fB-A\fR
and \fB-B\fR may be used to override this location. The \fB-A\fR option will
set \fBTERMINFO\fR for the first \fItermname\fR and the \fB-B\fR option will
set \fBTERMINFO\fR for the other \fItermnames\fR. With this, it is possible to
@@ -245,7 +245,7 @@ This is mainly useful for testing and analysis, since the compiled
descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
.TP 5
\fB-V\fR
-prints out the version of the program in use on standard error and exits.
+reports the version of ncurses which was used in this program, and exits.
.TP 5
\fB-e\fR
Dump the capabilities of the given terminal as a C initializer for a
@@ -347,6 +347,7 @@ The
\fB-G\fR,
\fB-R\fR,
\fB-T\fR,
+\fB-V\fR,
\fB-a\fR,
\fB-e\fR,
\fB-f\fR,
diff --git a/contrib/ncurses/man/infotocap.1m b/contrib/ncurses/man/infotocap.1m
index 867840da0edf..ef8735b7be54 100644
--- a/contrib/ncurses/man/infotocap.1m
+++ b/contrib/ncurses/man/infotocap.1m
@@ -27,10 +27,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: infotocap.1m,v 1.2 2000/03/19 02:19:49 tom Exp $
+.\" $Id: infotocap.1m,v 1.3 2000/08/13 01:56:03 tom Exp $
.TH infotocap 1M ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBinfotocap\fR - convert a \fIterminfo\fR description into a \fItermcap\fR description
.SH SYNOPSIS
diff --git a/contrib/ncurses/man/man_db.renames b/contrib/ncurses/man/man_db.renames
index fd6cbdb31d9f..b824861003c0 100644
--- a/contrib/ncurses/man/man_db.renames
+++ b/contrib/ncurses/man/man_db.renames
@@ -1,4 +1,4 @@
-# $Id: man_db.renames,v 0.18 2000/03/19 00:10:15 tom Exp $
+# $Id: man_db.renames,v 0.20 2000/07/15 22:58:35 tom Exp $
# Manual-page renamings for the man_db program
#
captoinfo.1m captoinfo.1
@@ -42,11 +42,12 @@ curs_termattrs.3x termattrs.3ncurses
curs_termcap.3x termcap.3ncurses
curs_terminfo.3x terminfo.3ncurses
curs_touch.3x touch.3ncurses
+curs_trace.3x trace.3ncurses
curs_util.3x util.3ncurses
curs_window.3x window.3ncurses
curses.3x ncurses.3ncurses
+default_colors.3x default_colors.3ncurses
define_key.3x define_key.3ncurses
-dft_fgbg.3x use_default_colors.3ncurses
form.3x form.3form
form_cursor.3x cursor.3form
form_data.3x data.3form
@@ -75,7 +76,7 @@ infotocap.1m infotocap.1
keybound.3x keybound.3ncurses
keyok.3x keyok.3ncurses
menu.3x menu.3menu
-menu_attribs.3x attribs.3menu
+menu_attributes.3x attributes.3menu
menu_cursor.3x cursor.3menu
menu_driver.3x driver.3menu
menu_format.3x format.3menu
diff --git a/contrib/ncurses/man/manlinks.sed b/contrib/ncurses/man/manlinks.sed
index 922141955218..e175148aab9a 100644
--- a/contrib/ncurses/man/manlinks.sed
+++ b/contrib/ncurses/man/manlinks.sed
@@ -1,4 +1,4 @@
-# $Id: manlinks.sed,v 1.7 2000/07/01 19:50:06 tom Exp $
+# $Id: manlinks.sed,v 1.9 2000/09/30 23:32:24 tom Exp $
##############################################################################
# Copyright (c) 2000 Free Software Foundation, Inc. #
# #
@@ -53,11 +53,11 @@ s/\\-.*/ -/
s/ /\
/g
}
-:syn
/^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{
/^#/d
/^[^(]*$/d
- s/^\([^ (]\+ [*]*\)\+//g
+ s/^\([^ (]* [^ (]* [*]*\)//g
+ s/^\([^ (]* [*]*\)//g
s/\.SH_(/.SH_/
s/(.*//
s/\.SH_/.SH_(/
diff --git a/contrib/ncurses/man/menu.3x b/contrib/ncurses/man/menu.3x
index adbfffd92c74..8279844a39e2 100644
--- a/contrib/ncurses/man/menu.3x
+++ b/contrib/ncurses/man/menu.3x
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: menu.3x,v 1.13 1998/11/29 01:09:07 Rick.Ohnemus Exp $
+.\" $Id: menu.3x,v 1.14 2000/07/15 22:55:59 tom Exp $
.TH menu 3X ""
.SH NAME
\fBmenu\fR - curses extension for programming menus
@@ -77,18 +77,18 @@ item_term \fBmenu_hook\fR(3X)
item_userptr \fBmitem_userptr\fR(3X)
item_value \fBmitem_value\fR(3X)
item_visible \fBmitem_visible\fR(3X)
-menu_back \fBmenu_attribs\fR(3X)
+menu_back \fBmenu_attributes\fR(3X)
menu_driver \fBmenu_driver\fR(3X)
-menu_fore \fBmenu_attribs\fR(3X)
+menu_fore \fBmenu_attributes\fR(3X)
menu_format \fBmenu_format\fR(3X)
-menu_grey \fBmenu_attribs\fR(3X)
+menu_grey \fBmenu_attributes\fR(3X)
menu_init \fBmenu_hook\fR(3X)
menu_items \fBmenu_items\fR(3X)
menu_mark \fBmenu_mark\fR(3X)
menu_opts \fBmenu_opts\fR(3X)
menu_opts_off \fBmenu_opts\fR(3X)
menu_opts_on \fBmenu_opts\fR(3X)
-menu_pad \fBmenu_attribs\fR(3X)
+menu_pad \fBmenu_attributes\fR(3X)
menu_pattern \fBmenu_pattern\fR(3X)
menu_request_by_name \fBmenu_requestname\fR(3X)
menu_request_name \fBmenu_requestname\fR(3X)
@@ -108,15 +108,15 @@ set_item_opts \fBmitem_opts\fR(3X)
set_item_term \fBmenu_hook\fR(3X)
set_item_userptr \fBmitem_userptr\fR(3X)
set_item_value \fBmitem_value\fR(3X)
-set_menu_back \fBmenu_attribs\fR(3X)
-set_menu_fore \fBmenu_attribs\fR(3X)
+set_menu_back \fBmenu_attributes\fR(3X)
+set_menu_fore \fBmenu_attributes\fR(3X)
set_menu_format \fBmenu_format\fR(3X)
-set_menu_grey \fBmenu_attribs\fR(3X)
+set_menu_grey \fBmenu_attributes\fR(3X)
set_menu_init \fBmenu_hook\fR(3X)
set_menu_items \fBmenu_items\fR(3X)
set_menu_mark \fBmenu_mark\fR(3X)
set_menu_opts \fBmitem_opts\fR(3X)
-set_menu_pad \fBmenu_attribs\fR(3X)
+set_menu_pad \fBmenu_attributes\fR(3X)
set_menu_pattern \fBmenu_pattern\fR(3X)
set_menu_spacing \fBmenu_spacing\fR(3X)
set_menu_sub \fBmenu_win\fR(3X)
diff --git a/contrib/ncurses/man/menu_attributes.3x b/contrib/ncurses/man/menu_attributes.3x
new file mode 100644
index 000000000000..82412609c9ab
--- /dev/null
+++ b/contrib/ncurses/man/menu_attributes.3x
@@ -0,0 +1,100 @@
+'\" t
+.\"***************************************************************************
+.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" *
+.\" Permission is hereby granted, free of charge, to any person obtaining a *
+.\" copy of this software and associated documentation files (the *
+.\" "Software"), to deal in the Software without restriction, including *
+.\" without limitation the rights to use, copy, modify, merge, publish, *
+.\" distribute, distribute with modifications, sublicense, and/or sell *
+.\" copies of the Software, and to permit persons to whom the Software is *
+.\" furnished to do so, subject to the following conditions: *
+.\" *
+.\" The above copyright notice and this permission notice shall be included *
+.\" in all copies or substantial portions of the Software. *
+.\" *
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+.\" *
+.\" Except as contained in this notice, the name(s) of the above copyright *
+.\" holders shall not be used in advertising or otherwise to promote the *
+.\" sale, use or other dealings in this Software without prior written *
+.\" authorization. *
+.\"***************************************************************************
+.\"
+.\" $Id: menu_attributes.3x,v 1.6 1998/11/29 01:09:20 Rick.Ohnemus Exp $
+.TH menu_attributes 3X ""
+.SH NAME
+\fBmenu_attributes\fR - color and attribute control for menus
+.SH SYNOPSIS
+\fB#include <menu.h>\fR
+.br
+int set_menu_fore(MENU *menu, chtype attr);
+.br
+chtype menu_fore(const MENU *menu);
+.br
+int set_menu_back(MENU *menu, chtype attr);
+.br
+chtype menu_back(const MENU *menu);
+.br
+int set_menu_grey(MENU *menu, chtype attr);
+.br
+chtype menu_grey(const MENU *menu);
+.br
+int set_menu_pad(MENU *menu, int pad);
+.br
+int menu_pad(const MENU *menu);
+.br
+.SH DESCRIPTION
+The function \fBset_menu_fore\fR sets the foreground attribute of
+\fImenu\fR. This is the highlight used for selected menu items.
+\fBmenu_fore\fR returns the foreground attribute. The default
+is \fBA_STANDOUT\fR.
+
+The function \fBset_menu_back\fR sets the background attribute of
+\fImenu\fR. This is the highlight used for selectable (but not currently
+selected) menu items. The function \fBmenu_back\fR returns the background
+attribute. The default is \fBA_NORMAL\fR.
+
+The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is
+the highlight used for un-selectable menu items in menus that permit more than
+one selection. The function \fBmenu_grey\fR returns the grey attribute.
+The default is \fBA_UNDERLINE\fR.
+
+The function \fBset_menu_pad\fR sets the character used to fill the space
+between the name and description parts of a menu item. \fBmenu_pad\fR returns
+the given menu's pad character. The default is a blank.
+.SH RETURN VALUE
+These routines return one of the following:
+.TP 5
+\fBE_OK\fR
+The routine succeeded.
+.TP 5
+\fBE_SYSTEM_ERROR\fR
+System error occurred (see \fBerrno\fR).
+.TP 5
+\fBE_BAD_ARGUMENT\fR
+Routine detected an incorrect or out-of-range argument.
+.SH SEE ALSO
+\fBcurses\fR(3X) and 3X pages whose names begin "menu_" for detailed
+descriptions of the entry points.
+.SH NOTES
+The header file \fB<menu.h>\fR automatically includes the header file
+\fB<curses.h>\fR.
+.SH PORTABILITY
+These routines emulate the System V menu library. They were not supported on
+Version 7 or BSD versions.
+.SH AUTHORS
+Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
+S. Raymond.
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/contrib/ncurses/man/ncurses.3x b/contrib/ncurses/man/ncurses.3x
index ea59af42a8df..3b36fa9a6df1 100644
--- a/contrib/ncurses/man/ncurses.3x
+++ b/contrib/ncurses/man/ncurses.3x
@@ -27,11 +27,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: ncurses.3x,v 1.39 1999/12/19 01:53:04 tom Exp $
+.\" $Id: ncurses.3x,v 1.44 2000/10/08 01:39:26 tom Exp $
.hy 0
.TH ncurses 3X ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBncurses\fR - CRT screen handling and optimization package
.SH SYNOPSIS
@@ -198,12 +198,23 @@ l l
l l .
\fBcurses\fR Routine Name/Manual Page Name
=
+COLOR_PAIR/\fBcurs_color\fR(3X)
+PAIR_NUMBER/\fBcurs_attr\fR(3X)
+_nc_tracebits/\fBcurs_trace\fR(3X)*
+_traceattr/\fBcurs_trace\fR(3X)*
+_traceattr2/\fBcurs_trace\fR(3X)*
+_tracechar/\fBcurs_trace\fR(3X)*
+_tracechtype/\fBcurs_trace\fR(3X)*
+_tracechtype2/\fBcurs_trace\fR(3X)*
+_tracedump/\fBcurs_trace\fR(3X)*
+_tracef/\fBcurs_trace\fR(3X)*
+_tracemouse/\fBcurs_trace\fR(3X)*
addch/\fBcurs_addch\fR(3X)
addchnstr/\fBcurs_addchstr\fR(3X)
addchstr/\fBcurs_addchstr\fR(3X)
addnstr/\fBcurs_addstr\fR(3X)
addstr/\fBcurs_addstr\fR(3X)
-assume_default_colors/\fBdft_fgbg\fR(3X)*
+assume_default_colors/\fBdefault_colors\fR(3X)*
attr_get/\fBcurs_attr\fR(3X)
attr_off/\fBcurs_attr\fR(3X)
attr_on/\fBcurs_attr\fR(3X)
@@ -295,6 +306,7 @@ leaveok/\fBcurs_outopts\fR(3X)
longname/\fBcurs_termattrs\fR(3X)
mcprint/\fBcurs_print\fR(3X)*
meta/\fBcurs_inopts\fR(3X)
+mouse_trafo/\fBcurs_mouse\fR(3X)*
mouseinterval/\fBcurs_mouse\fR(3X)*
mousemask/\fBcurs_mouse\fR(3X)*
move/\fBcurs_move\fR(3X)
@@ -321,6 +333,7 @@ mvinsstr/\fBcurs_insstr\fR(3X)
mvinstr/\fBcurs_instr\fR(3X)
mvprintw/\fBcurs_printw\fR(3X)
mvscanw/\fBcurs_scanw\fR(3X)
+mvvline/\fBcurs_border\fR(3X)
mvwaddch/\fBcurs_addch\fR(3X)
mvwaddchnstr/\fBcurs_addchstr\fR(3X)
mvwaddchstr/\fBcurs_addchstr\fR(3X)
@@ -428,12 +441,13 @@ touchwin/\fBcurs_touch\fR(3X)
tparm/\fBcurs_terminfo\fR(3X)
tputs/\fBcurs_termcap\fR(3X)
tputs/\fBcurs_terminfo\fR(3X)
+trace/\fBcurs_trace\fR(3X)*
typeahead/\fBcurs_inopts\fR(3X)
unctrl/\fBcurs_util\fR(3X)
ungetch/\fBcurs_getch\fR(3X)
ungetmouse/\fBcurs_mouse\fR(3X)*
untouchwin/\fBcurs_touch\fR(3X)
-use_default_colors/\fBdft_fgbg\fR(3X)*
+use_default_colors/\fBdefault_colors\fR(3X)*
use_env/\fBcurs_util\fR(3X)
use_extended_names/\fBcurs_extend\fR(3X)*
vidattr/\fBcurs_terminfo\fR(3X)
@@ -680,7 +694,7 @@ directories listed in the TERMINFO_DIRS symbol
-
one or more directories whose names are configured and compiled into the
ncurses library, e.g.,
-@DATADIR@/terminfo
+@TERMINFO@
.RE
.TP 5
TERMINFO_DIRS
@@ -695,11 +709,16 @@ the TERMPATH symbol.
This is a list of filenames separated by colons (i.e., ":").
If the TERMPATH symbol is not set, \fBncurses\fR looks in the files
/etc/termcap, /usr/share/misc/termcap and $HOME/.termcap, in that order.
+.PP
+The library may be configured to disregard the following variables when the
+current user is the superuser (root), or if the application uses setuid or
+setgid permissions:
+$TERMINFO, $TERMINFO_DIRS, $TERMPATH, as well as $HOME.
.SH FILES
.TP 5
@DATADIR@/tabset
directory containing initialization files for the terminal capability database
-@DATADIR@/terminfo
+@TERMINFO@
terminal capability database
.SH SEE ALSO
\fBterminfo\fR(\*n) and 3X pages whose names begin "curs_" for detailed routine
diff --git a/contrib/ncurses/man/panel.3x b/contrib/ncurses/man/panel.3x
index 046778a8cf96..7ebecc00ff46 100644
--- a/contrib/ncurses/man/panel.3x
+++ b/contrib/ncurses/man/panel.3x
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: panel.3x,v 1.9 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: panel.3x,v 1.10 2000/08/13 01:56:47 tom Exp $
.TH panel 3X ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
panel - panel stack extension for curses
.SH SYNOPSIS
diff --git a/contrib/ncurses/man/term.5 b/contrib/ncurses/man/term.5
index f79679db608d..63a2d35f8411 100644
--- a/contrib/ncurses/man/term.5
+++ b/contrib/ncurses/man/term.5
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: term.5,v 1.9 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: term.5,v 1.10 2000/08/13 01:56:45 tom Exp $
.TH TERM 5
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
term \- format of compiled term file.
.SH SYNOPSIS
diff --git a/contrib/ncurses/man/term.7 b/contrib/ncurses/man/term.7
index e8f81bb6f0d7..5a48c5a303d3 100644
--- a/contrib/ncurses/man/term.7
+++ b/contrib/ncurses/man/term.7
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: term.7,v 1.11 1999/01/24 02:35:14 Todd.Miller Exp $
+.\" $Id: term.7,v 1.12 2000/08/13 01:56:42 tom Exp $
.TH TERM 7
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
term \- conventions for naming terminal types
.SH DESCRIPTION
diff --git a/contrib/ncurses/man/terminfo.head b/contrib/ncurses/man/terminfo.head
index 3118c1577fcf..36945ff2502b 100644
--- a/contrib/ncurses/man/terminfo.head
+++ b/contrib/ncurses/man/terminfo.head
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: terminfo.head,v 1.8 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: terminfo.head,v 1.9 2000/08/13 01:56:40 tom Exp $
.TH TERMINFO 5 "" "" "File Formats"
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
terminfo \- terminal capability data base
.SH SYNOPSIS
diff --git a/contrib/ncurses/man/tic.1m b/contrib/ncurses/man/tic.1m
index 40f790ca0f38..e3a095453d3c 100644
--- a/contrib/ncurses/man/tic.1m
+++ b/contrib/ncurses/man/tic.1m
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tic.1m,v 1.26 2000/03/19 02:18:18 tom Exp $
+.\" $Id: tic.1m,v 1.29 2000/08/19 18:51:05 tom Exp $
.TH tic 1M ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBtic\fR - the \fIterminfo\fR entry-description compiler
.SH SYNOPSIS
@@ -41,6 +41,7 @@ I\
N\
R\
T\
+V\
a\
c\
f\
@@ -147,6 +148,9 @@ eliminates size-restrictions on the generated text.
This is mainly useful for testing and analysis, since the compiled
descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo).
.TP
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP
\fB-r\fR
Force entry resolution (so there are no remaining tc capabilities) even
when doing translation to termcap format. This may be needed if you are
@@ -267,6 +271,7 @@ The
\fB-N\fR,
\fB-R\fR,
\fB-T\fR,
+\fB-V\fR,
\fB-a\fR,
\fB-e\fR,
\fB-f\fR,
@@ -286,8 +291,8 @@ System V does not compile entries to or read entries from your
\fB\*d/?/*\fR
Compiled terminal description database.
.SH SEE ALSO
-\fBinfocmp\fR(1M), \fBcaptoinfo\fR(1M), \fBinfotocap\fR(1M), \fBtoe\fR(1M),
-\fBcurses\fR(3X), \fBterminfo\fR(\*n).
+\fB@INFOCMP@\fR(1M), \fB@CAPTOINFO@\fR(1M), \fB@INFOTOCAP@\fR(1M),
+\fB@TOE@\fR(1M), \fBcurses\fR(3X), \fBterminfo\fR(\*n).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
diff --git a/contrib/ncurses/man/toe.1m b/contrib/ncurses/man/toe.1m
index ea277266db1a..399cf614f3f3 100644
--- a/contrib/ncurses/man/toe.1m
+++ b/contrib/ncurses/man/toe.1m
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,10 +26,10 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: toe.1m,v 1.7 1998/03/11 21:12:53 juergen Exp $
+.\" $Id: toe.1m,v 1.10 2000/08/19 18:51:05 tom Exp $
.TH toe 1M ""
.ds n 5
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.SH NAME
\fBtoe\fR - table of (terminfo) entries
.SH SYNOPSIS
@@ -65,14 +65,14 @@ information showing \fBtoe\fR's progress. The optional integer
\fIn\fR is a number from 1 to 10, interpreted as for \fBtic\fR(1).
.TP 5
\fB-V\fR
-prints out the version of the program in use on standard error and exits.
+reports the version of ncurses which was used in this program, and exits.
.SH FILES
.TP 5
\fB\*d/?/*\fR
Compiled terminal description database.
.SH SEE ALSO
-\fBtic\fR(1M), \fBinfocmp\fR(1M), \fBcaptoinfo\fR(1M), \fBinfotocap\fR(1M),
-\fBcurses\fR(3X), \fBterminfo\fR(\*n).
+\fB@TIC@\fR(1M), \fB@INFOCMP@\fR(1M), \fB@CAPTOINFO@\fR(1M),
+\fB@INFOTOCAP@\fR(1M), \fBcurses\fR(3X), \fBterminfo\fR(\*n).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
diff --git a/contrib/ncurses/man/tput.1 b/contrib/ncurses/man/tput.1
index 84b64b2588a1..898df1e606f5 100644
--- a/contrib/ncurses/man/tput.1
+++ b/contrib/ncurses/man/tput.1
@@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -27,12 +27,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tput.1,v 1.12 1999/01/24 02:44:26 Jeffrey.C.Honig Exp $
+.\" $Id: tput.1,v 1.16 2000/09/09 20:43:33 tom Exp $
.TH tput 1 ""
-.ds d @DATADIR@/terminfo
+.ds d @TERMINFO@
.ds n 5
.SH NAME
-\fBtput\fR - initialize a terminal or query terminfo database
+\fBtput\fR, \fBreset\fR - initialize a terminal or query terminfo database
.SH SYNOPSIS
\fBtput\fR [\fB-T\fR\fItype\fR] \fIcapname\fR [\fIparms\fR ... ]
.br
@@ -44,6 +44,8 @@
.br
\fBtput -S\fR \fB<<\fR
.br
+\fBtput -V\fR
+.br
.SH DESCRIPTION
The \fBtput\fR utility uses the \fBterminfo\fR database to make the
values of terminal-dependent capabilities and information available to
@@ -85,6 +87,9 @@ instead of from the command line (see example). Only one
meaning of the \fB0\fR and \fB1\fR boolean and string exit codes (see the
EXIT CODES section).
.TP
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP
\fBinit\fR
If the \fBterminfo\fR database is present and an entry for the user's
terminal exists (see \fB-T\fR\fItype\fR, above), the following will
@@ -110,6 +115,10 @@ user's terminal exists (see \fB-T\fR\fItype\fR above), then the long name
of the terminal will be put out. The long name is the last
name in the first line of the terminal's description in the
\fBterminfo\fR database [see \fBterm\fR(5)].
+.PP
+If \fBtput\fR is invoked by a link named \fBreset\fR, this has the
+same effect as \fBtput reset\fR.
+See \fBtset\fR for comparison, which has similar behavior.
.SH EXAMPLES
.TP 5
\fBtput init\fR
@@ -153,7 +162,8 @@ Send the sequence to move the cursor to row 23, column 4.
Print the long name from the \fBterminfo\fR database for the
type of terminal specified in the environmental
variable \fBTERM\fR.
-.TP 0
+.PP
+.RS 5
\fBtput -S <<!\fR
.br
\fB> clear\fR
@@ -163,6 +173,7 @@ variable \fBTERM\fR.
\fB> bold\fR
.br
\fB> !\fR
+.RE
.TP 5
\&
This example shows tput processing several capabilities in one
@@ -187,47 +198,51 @@ sequences that set margins and tabs); for more
information, see the "Tabs and Initialization"
section of \fBterminfo\fR(4)
.SH SEE ALSO
-\fBclear\fR(1), \fBstty\fR(1), \fBtabs\fR(\*n). \fBprofile\fR(\*n),
+\fB@CLEAR@\fR(1), \fBstty\fR(1), \fBtabs\fR(\*n). \fBprofile\fR(\*n),
\fBterminfo\fR(4) in the \fISystem\fR \fIAdministrator\fR'\fIs\fR
\fIReference\fR \fIManual\fR. Chapter 10 of the
\fIProgrammer\fR'\fIs\fR \fIGuide\fR.
.SH EXIT CODES
If \fIcapname\fR is of type boolean, a value of \fB0\fR is set for
TRUE and \fB1\fR for FALSE unless the \fB-S\fR option is used.
-
+.PP
If \fIcapname\fR is of type string, a value of \fB0\fR is set if the
\fIcapname\fR is defined for this terminal \fItype\fR (the value of
\fIcapname\fR is returned on standard output); a value of \fB1\fR is
set if \fIcapname\fR is not defined for this terminal \fItype\fR (a
null value is returned on standard output).
-
+.PP
If \fIcapname\fR is of type boolean or string and the \fB-S\fR option
is used, a value of \fB0\fR is returned to indicate that all lines
were successful. No indication of which line failed can be given so
exit code \fB1\fR will never appear. Exit codes \fB2\fR, \fB3\fR, and
\fB4\fR retain their usual interpretation.
-
+.PP
If \fIcapname\fR is of type integer, a value of \fB0\fR is always set,
whether or not \fIcapname\fR is defined for this terminal \fItype\fR.
To determine if \fIcapname\fR is defined for this terminal \fItype\fR,
the user must test the value of standard output. A value of \fB-1\fR
means that \fIcapname\fR is not defined for this terminal \fItype\fR.
-
+.PP
Any other exit code indicates an error; see the DIAGNOSTICS section.
.SH DIAGNOSTICS
\fBtput\fR prints the following error messages and sets the corresponding exit
codes.
-
+.PP
.TS
l l.
exit code error message
-\fB0\fR (\fIcapname\fR is a numeric variable that is not specified in the
- \fBterminfo\fR(\*n) database for this terminal type, e.g.
- \fBtput -T450 lines\fR and \fBtput -T2621 xmc\fR)
+=
+\fB0\fR T{
+(\fIcapname\fR is a numeric variable that is not specified in the
+\fBterminfo\fR(\*n) database for this terminal type, e.g.
+\fBtput -T450 lines\fR and \fBtput -T2621 xmc\fR)
+T}
\fB1\fR no error message is printed, see the \fBEXIT CODES\fR section.
\fB2\fR usage error
\fB3\fR unknown terminal \fItype\fR or no \fBterminfo\fR database
\fB4\fR unknown \fBterminfo\fR capability \fIcapname\fR
+=
.TE
.SH PORTABILITY
The \fBlongname\fR and \fB-S\fR options, and the parameter-substitution
diff --git a/contrib/ncurses/man/tset.1 b/contrib/ncurses/man/tset.1
index 50d58e109574..897d9edb5446 100644
--- a/contrib/ncurses/man/tset.1
+++ b/contrib/ncurses/man/tset.1
@@ -1,5 +1,5 @@
.\"***************************************************************************
-.\" Copyright (c) 1998 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998,2000 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@@ -26,14 +26,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: tset.1,v 1.8 1998/12/26 01:44:41 tom Exp $
+.\" $Id: tset.1,v 1.12 2000/09/09 20:33:07 tom Exp $
.TH tset 1 ""
.SH NAME
-\fBtset\fR - terminal initialization
+\fBtset\fR, \fBreset\fR - terminal initialization
.SH SYNOPSIS
-tset [-IQqrs] [-] [-e \fIch\fR] [-i \fIch\fR] [-k \fIch\fR] [-m \fImapping\fR] [\fIterminal\fR]
+tset [-IQVqrs] [-] [-e \fIch\fR] [-i \fIch\fR] [-k \fIch\fR] [-m \fImapping\fR] [\fIterminal\fR]
.br
-reset [-IQqrs] [-] [-e \fIch\fR] [-i \fIch\fR] [-k \fIch\fR] [-m \fImapping\fR] [\fIterminal\fR]
+reset [-IQVqrs] [-] [-e \fIch\fR] [-i \fIch\fR] [-k \fIch\fR] [-m \fImapping\fR] [\fIterminal\fR]
.SH DESCRIPTION
\&\fBTset\fR initializes terminals.
\fBTset\fR first determines the type of terminal that you are using.
@@ -92,6 +92,12 @@ Set the erase character to \fIch\fR.
-I
Do not send the terminal or tab initialization strings to the terminal.
.TP 5
+-Q
+Don't display any values for the erase, interrupt and line kill characters.
+.TP
+\fB-V\fR
+reports the version of ncurses which was used in this program, and exits.
+.TP 5
-i
Set the interrupt character to \fIch\fR.
.TP 5
@@ -102,9 +108,6 @@ Set the line kill character to \fIch\fR.
Specify a mapping from a port type to a terminal.
See below for more information.
.TP 5
--Q
-Don't display any values for the erase, interrupt and line kill characters.
-.TP 5
-r
Print the terminal type to the standard error output.
.TP 5
@@ -228,7 +231,7 @@ environment variables.
/etc/ttys
system port name to terminal type mapping database (BSD versions only).
.TP 5
-@DATADIR@/terminfo
+@TERMINFO@
terminal capability database
.SH SEE ALSO
csh(1),
diff --git a/contrib/ncurses/menu/Makefile.in b/contrib/ncurses/menu/Makefile.in
index 3d802c07fe69..322e94e6f670 100644
--- a/contrib/ncurses/menu/Makefile.in
+++ b/contrib/ncurses/menu/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.28 2000/05/28 01:40:08 tom Exp $
+# $Id: Makefile.in,v 1.30 2000/08/26 21:51:35 tom Exp $
##############################################################################
# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
# #
@@ -46,7 +46,7 @@ SHELL = /bin/sh
THIS = Makefile
MODEL = @DFT_LWR_MODEL@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -111,7 +111,7 @@ install :: $(AUTO_SRC) $(LIBRARIES)
sources : $(AUTO_SRC)
-$(INSTALL_PREFIX)$(libdir) :
+$(DESTDIR)$(libdir) :
$(srcdir)/../mkinstalldirs $@
# make copies to simplify include-paths while still keeping menu's include
@@ -134,8 +134,8 @@ MENU_PRIV_H = \
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/menu/menu.h b/contrib/ncurses/menu/menu.h
index 4b4a286a63a2..5be728b1c5df 100644
--- a/contrib/ncurses/menu/menu.h
+++ b/contrib/ncurses/menu/menu.h
@@ -33,6 +33,10 @@
#ifndef ETI_MENU
#define ETI_MENU
+#ifdef AMIGA
+#define TEXT TEXT_ncurses
+#endif
+
#include <curses.h>
#include <eti.h>
diff --git a/contrib/ncurses/menu/mf_common.h b/contrib/ncurses/menu/mf_common.h
index c13f6c893a04..6b1e8feee2c9 100644
--- a/contrib/ncurses/menu/mf_common.h
+++ b/contrib/ncurses/menu/mf_common.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -56,7 +56,7 @@ extern int errno;
#include <nc_alloc.h>
-#ifdef USE_RCS_IDS
+#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
#else
#define MODULE_ID(id) /*nothing*/
diff --git a/contrib/ncurses/misc/Makefile.in b/contrib/ncurses/misc/Makefile.in
index 2b6d2e62ea25..4ea04461e7f1 100644
--- a/contrib/ncurses/misc/Makefile.in
+++ b/contrib/ncurses/misc/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.20 1998/02/11 12:13:52 tom Exp $
+# $Id: Makefile.in,v 1.29 2000/09/30 20:01:10 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -48,7 +48,8 @@ THIS = Makefile
CF_MFLAGS = @cf_cv_makeflags@
@SET_MAKE@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
+top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -57,7 +58,8 @@ libdir = @libdir@
datadir = @datadir@
tabsetdir = $(datadir)/tabset
-ticdir = $(datadir)/terminfo
+ticdir = @TERMINFO@
+source = @TERMINFO_SRC@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -69,29 +71,40 @@ sources:
install: install.data
-install.data: $(INSTALL_PREFIX)$(libdir) \
- $(INSTALL_PREFIX)$(ticdir) \
- $(INSTALL_PREFIX)$(tabsetdir)
- sh $(srcdir)/run_tic.sh $(bindir) $(srcdir) $(ticdir) $(INSTALL_PREFIX)
+install.data : $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(ticdir) \
+ $(DESTDIR)$(tabsetdir)
+ DESTDIR=${DESTDIR} \
+ prefix=${prefix} \
+ exec_prefix=${exec_prefix} \
+ bindir=${bindir} \
+ top_srcdir=${top_srcdir} \
+ srcdir=${srcdir} \
+ datadir=${datadir} \
+ ticdir=${ticdir} \
+ source=${source} \
+ $(SHELL) ./run_tic.sh
@cd $(srcdir)/tabset && \
- sh -c 'for i in `echo * | fgrep -v CVS | fgrep -v RCS`; do \
- echo installing $$i; \
- $(INSTALL_DATA) $$i $(INSTALL_PREFIX)$(tabsetdir); done'
-
-$(INSTALL_PREFIX)$(libdir) \
-$(INSTALL_PREFIX)$(tabsetdir) \
-$(INSTALL_PREFIX)$(ticdir) :
+ $(SHELL) -c 'for i in * ; do \
+ if test -f $$i ; then \
+ echo installing $$i; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(tabsetdir)/$$i; \
+ fi; done'
+
+$(DESTDIR)$(libdir) \
+$(DESTDIR)$(tabsetdir) \
+$(DESTDIR)$(ticdir) :
$(srcdir)/../mkinstalldirs $@
uninstall: uninstall.data
uninstall.data:
- -cd $(INSTALL_PREFIX)$(ticdir) && rm -rf *
- -cd $(INSTALL_PREFIX)$(tabsetdir) && rm -rf *
+ -cd $(DESTDIR)$(ticdir) && rm -rf *
+ -cd $(DESTDIR)$(tabsetdir) && rm -rf *
tags:
-TAGS:
+@MAKE_UPPER_TAGS@TAGS:
mostlyclean:
-rm -f core tags TAGS *~ *.ln *.atac trace
@@ -99,7 +112,7 @@ mostlyclean:
clean :: mostlyclean
distclean: clean
- -rm -f Makefile
+ -rm -f Makefile run_tic.sh
realclean: distclean
diff --git a/contrib/ncurses/misc/emx.src b/contrib/ncurses/misc/emx.src
index 7319f5d83cf8..96625116168b 100644
--- a/contrib/ncurses/misc/emx.src
+++ b/contrib/ncurses/misc/emx.src
@@ -1,4 +1,4 @@
-# $Id: emx.src,v 1.6 1999/08/15 01:56:54 tom Exp $
+# $Id: emx.src,v 1.7 2000/08/27 02:16:08 jmcoopr Exp $
# This is a reformatted copy of the terminfo source for OS/2 EMX from
# Juan Jose Garcia Ripoll <worm@arrakis.es>.
# http://www.arrakis.es/~worm/
@@ -193,7 +193,7 @@ ansi.sys|ANSI.SYS 3.1 and later versions,
# kcub1 kb2 kcuf1
#
# End=\0O Down=\0P NxPag=\0Q
-# kc1,kend kcud1 kc3,knp
+# kc1,kend kcud1 kc3,knp
#
# Ins=\0R Del=\0S
# kich1 kdch1
@@ -318,6 +318,19 @@ window|ANSI.SYS window,
smso=\E[1;37;47m,
smul=\E[1;31;47m,
use=emx-base,
+os2|OS/2-emx ANSI.SYS,
+ cuu=\E[%p1%dA,
+ cuu1=\E[A,
+ cud=\E[%p1%dB,
+ cud1=\E[B,
+ cuf=\E[%p1%dC,
+ cuf1=\E[C,
+ cub=\E[%p1%dD,
+ cub1=\E[D,
+ sc=\E[s,
+ rc=\E[u,
+ use=ansi,
+ use=mono,
mono|ANSI.SYS mono,
blink=\E[5m,
bold=\E[1m,
diff --git a/contrib/ncurses/misc/form.def b/contrib/ncurses/misc/form.def
index 3fbe2b56f725..ea43b5953d99 100644
--- a/contrib/ncurses/misc/form.def
+++ b/contrib/ncurses/misc/form.def
@@ -1,5 +1,5 @@
LIBRARY form5 INITINSTANCE TERMINSTANCE
-DESCRIPTION "NCurses-5-0-990828, module form"
+DESCRIPTION "NCurses-5-1-20000704, module form"
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
EXPORTS
diff --git a/contrib/ncurses/misc/indent.pro b/contrib/ncurses/misc/indent.pro
index 7ddfe9b75ceb..14cf385a1cf7 100644
--- a/contrib/ncurses/misc/indent.pro
+++ b/contrib/ncurses/misc/indent.pro
@@ -14,7 +14,7 @@
/* format braces inline */
-br
/* do not line up parentheses */
--nlp
+-lp
/* put the type of a procedure on the line before its name */
-psl
/* do not insert a space between procedure name and '(' */
diff --git a/contrib/ncurses/misc/menu.def b/contrib/ncurses/misc/menu.def
index a84e63d1cdbe..01f973c286ca 100644
--- a/contrib/ncurses/misc/menu.def
+++ b/contrib/ncurses/misc/menu.def
@@ -1,5 +1,5 @@
LIBRARY menu5 INITINSTANCE TERMINSTANCE
-DESCRIPTION "NCurses-5-0-990828, module menu"
+DESCRIPTION "NCurses-5-1-20000704, module menu"
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
EXPORTS
diff --git a/contrib/ncurses/misc/ncurses.def b/contrib/ncurses/misc/ncurses.def
index 13db4bf0cb22..fa50456f5cd0 100644
--- a/contrib/ncurses/misc/ncurses.def
+++ b/contrib/ncurses/misc/ncurses.def
@@ -1,5 +1,5 @@
LIBRARY ncurses5 INITINSTANCE TERMINSTANCE
-DESCRIPTION "NCurses-5-0-990828, module ncurses"
+DESCRIPTION "NCurses-5-1-20000704, module ncurses"
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
EXPORTS
@@ -33,8 +33,8 @@ EXPORTS
"_nc_curr_file_pos" @817 NONAME
"_nc_curr_line" @815 NONAME
"_nc_curr_token" @803 NONAME
+ "_nc_disable_period" @23 NONAME
"_nc_do_color" @1037 NONAME
- "_nc_do_xmc_glitch" @23 NONAME
"_nc_doalloc" @25 NONAME
"_nc_entry_match" @710 NONAME
"_nc_err_abort" @826 NONAME
@@ -44,115 +44,109 @@ EXPORTS
"_nc_find_entry" @809 NONAME
"_nc_find_type_entry" @810 NONAME
"_nc_first_name" @622 NONAME
+ "_nc_flush" @54 NONAME
"_nc_free_entries" @712 NONAME
- "_nc_free_termtype" @54 NONAME
- "_nc_freeall" @58 NONAME
- "_nc_freewin" @59 NONAME
- "_nc_get_hash_table" @60 NONAME
+ "_nc_free_termtype" @58 NONAME
+ "_nc_freeall" @59 NONAME
+ "_nc_freewin" @60 NONAME
+ "_nc_get_hash_table" @63 NONAME
"_nc_get_table" @808 NONAME
"_nc_get_token" @811 NONAME
- "_nc_get_tty_mode" @63 NONAME
+ "_nc_get_tty_mode" @65 NONAME
"_nc_get_type" @823 NONAME
- "_nc_getenv_num" @65 NONAME
- "_nc_has_mouse" @67 NONAME
- "_nc_hash_map" @73 NONAME
+ "_nc_getenv_num" @67 NONAME
+ "_nc_has_mouse" @73 NONAME
+ "_nc_hash_map" @84 NONAME
"_nc_head" @700 NONAME
- "_nc_home_terminfo" @84 NONAME
+ "_nc_home_terminfo" @91 NONAME
"_nc_info_hash_table" @804 NONAME
"_nc_infoalias_table" @807 NONAME
"_nc_infotocap" @830 NONAME
- "_nc_init_acs" @91 NONAME
+ "_nc_init_acs" @92 NONAME
"_nc_init_entry" @702 NONAME
- "_nc_init_keytry" @92 NONAME
- "_nc_keep_tic_dir" @93 NONAME
- "_nc_key_names" @95 NONAME
+ "_nc_init_keytry" @93 NONAME
+ "_nc_keep_tic_dir" @95 NONAME
+ "_nc_key_names" @96 NONAME
"_nc_keypad" @1024 NONAME
- "_nc_lib_traceatr" @96 NONAME
- "_nc_lib_tracedmp" @97 NONAME
- "_nc_lib_tracemouse" @98 NONAME
- "_nc_make_oldhash" @103 NONAME
+ "_nc_make_oldhash" @97 NONAME
"_nc_makenew" @1025 NONAME
- "_nc_memmove" @106 NONAME
+ "_nc_memmove" @98 NONAME
"_nc_merge_entry" @704 NONAME
- "_nc_msec_cost" @116 NONAME
+ "_nc_msec_cost" @103 NONAME
"_nc_mvcur_init" @1014 NONAME
- "_nc_mvcur_resume" @117 NONAME
+ "_nc_mvcur_resume" @106 NONAME
"_nc_mvcur_wrap" @1015 NONAME
"_nc_name_match" @623 NONAME
- "_nc_nulls_sent" @118 NONAME
- "_nc_oldnums" @119 NONAME
- "_nc_ospeed" @120 NONAME
+ "_nc_nulls_sent" @116 NONAME
+ "_nc_oldnums" @117 NONAME
+ "_nc_ospeed" @118 NONAME
"_nc_outch" @1026 NONAME
"_nc_outstr" @1033 NONAME
- "_nc_panelhook" @127 NONAME
+ "_nc_panelhook" @119 NONAME
"_nc_panic_mode" @814 NONAME
"_nc_parse_entry" @706 NONAME
- "_nc_printf_string" @129 NONAME
+ "_nc_printf_string" @120 NONAME
"_nc_push_token" @812 NONAME
"_nc_read_entry" @620 NONAME
"_nc_read_entry_source" @709 NONAME
"_nc_read_file_entry" @621 NONAME
- "_nc_read_termcap" @130 NONAME
- "_nc_remove_key" @132 NONAME
- "_nc_remove_string" @137 NONAME
+ "_nc_read_termcap" @127 NONAME
+ "_nc_remove_key" @129 NONAME
+ "_nc_remove_string" @130 NONAME
"_nc_render" @1027 NONAME
"_nc_reset_input" @813 NONAME
"_nc_resolve_uses" @711 NONAME
- "_nc_ripoffline" @142 NONAME
+ "_nc_ripoffline" @132 NONAME
"_nc_save_str" @703 NONAME
- "_nc_screen_chain" @143 NONAME
- "_nc_screen_init" @144 NONAME
- "_nc_screen_resume" @145 NONAME
- "_nc_screen_wrap" @146 NONAME
- "_nc_scroll_oldhash" @147 NONAME
+ "_nc_screen_chain" @137 NONAME
+ "_nc_screen_init" @142 NONAME
+ "_nc_screen_resume" @143 NONAME
+ "_nc_screen_wrap" @144 NONAME
+ "_nc_scroll_oldhash" @145 NONAME
"_nc_scroll_optimize" @1029 NONAME
"_nc_scroll_window" @1030 NONAME
- "_nc_scrolln" @148 NONAME
- "_nc_set_buffer" @152 NONAME
+ "_nc_scrolln" @146 NONAME
+ "_nc_set_buffer" @147 NONAME
"_nc_set_source" @822 NONAME
- "_nc_set_tty_mode" @158 NONAME
+ "_nc_set_tty_mode" @148 NONAME
"_nc_set_type" @824 NONAME
- "_nc_set_writedir" @159 NONAME
+ "_nc_set_writedir" @152 NONAME
"_nc_setupscreen" @1031 NONAME
- "_nc_sigaction" @160 NONAME
+ "_nc_sigaction" @158 NONAME
"_nc_signal_handler" @1034 NONAME
- "_nc_slk_format" @161 NONAME
- "_nc_slk_initialize" @162 NONAME
+ "_nc_slk_format" @159 NONAME
+ "_nc_slk_initialize" @160 NONAME
"_nc_start_line" @821 NONAME
"_nc_suppress_warnings" @828 NONAME
"_nc_synchook" @1035 NONAME
"_nc_syntax" @820 NONAME
"_nc_syserr_abort" @825 NONAME
"_nc_tail" @701 NONAME
- "_nc_tic_dir" @167 NONAME
- "_nc_tic_expand" @169 NONAME
- "_nc_tic_written" @170 NONAME
+ "_nc_tic_dir" @161 NONAME
+ "_nc_tic_expand" @162 NONAME
+ "_nc_tic_written" @167 NONAME
"_nc_timed_wait" @1036 NONAME
- "_nc_tinfo_fkeys" @172 NONAME
- "_nc_trace_buf" @178 NONAME
- "_nc_trace_tries" @183 NONAME
- "_nc_trace_xnames" @184 NONAME
- "_nc_tracebits" @185 NONAME
+ "_nc_tinfo_fkeys" @169 NONAME
"_nc_tracing" @1010 NONAME
- "_nc_trans_string" @186 NONAME
- "_nc_user_definable" @187 NONAME
+ "_nc_trans_string" @170 NONAME
+ "_nc_user_definable" @172 NONAME
"_nc_visbuf" @1012 NONAME
- "_nc_visbuf2" @188 NONAME
- "_nc_vsscanf" @189 NONAME
+ "_nc_visbuf2" @178 NONAME
+ "_nc_vsscanf" @183 NONAME
"_nc_waddch_nosync" @1028 NONAME
"_nc_warning" @827 NONAME
"_nc_wrap_entry" @705 NONAME
"_nc_write_entry" @708 NONAME
- "_tracechar" @403 NONAME
"acs_map" @506 NONAME
"addch" @1 NONAME
"addchnstr" @2 NONAME
"addchstr" @3 NONAME
"addnstr" @4 NONAME
"addstr" @5 NONAME
+ "assume_default_colors" @184 NONAME
"attr_get" @14 NONAME
- "attr_off" @193 NONAME
- "attr_on" @211 NONAME
+ "attr_off" @185 NONAME
+ "attr_on" @186 NONAME
"attr_set" @17 NONAME
"attroff" @11 NONAME
"attron" @12 NONAME
@@ -174,14 +168,15 @@ EXPORTS
"clrtobot" @33 NONAME
"clrtoeol" @34 NONAME
"color_content" @35 NONAME
- "color_set" @234 NONAME
+ "color_set" @187 NONAME
"copywin" @37 NONAME
"cur_term" @515 NONAME
"curs_set" @38 NONAME
"curscr" @501 NONAME
+ "curses_version" @188 NONAME
"def_prog_mode" @39 NONAME
"def_shell_mode" @40 NONAME
- "define_key" @238 NONAME
+ "define_key" @189 NONAME
"del_curterm" @641 NONAME
"delay_output" @41 NONAME
"delch" @42 NONAME
@@ -194,11 +189,12 @@ EXPORTS
"echo" @49 NONAME
"echochar" @50 NONAME
"endwin" @52 NONAME
+ "erase" @193 NONAME
"erasechar" @53 NONAME
"filter" @55 NONAME
"flash" @56 NONAME
"flushinp" @57 NONAME
- "getbkgd" @240 NONAME
+ "getbkgd" @211 NONAME
"getch" @61 NONAME
"getmouse" @356 NONAME
"getnstr" @62 NONAME
@@ -208,7 +204,7 @@ EXPORTS
"has_colors" @69 NONAME
"has_ic" @70 NONAME
"has_il" @71 NONAME
- "has_key" @242 NONAME
+ "has_key" @234 NONAME
"hline" @72 NONAME
"idcok" @74 NONAME
"idlok" @75 NONAME
@@ -230,16 +226,16 @@ EXPORTS
"is_linetouched" @100 NONAME
"is_wintouched" @101 NONAME
"isendwin" @99 NONAME
- "keybound" @251 NONAME
+ "keybound" @238 NONAME
"keyname" @102 NONAME
- "keyok" @263 NONAME
+ "keyok" @240 NONAME
"keypad" @104 NONAME
"killchar" @105 NONAME
"leaveok" @107 NONAME
"longname" @108 NONAME
- "mcprint" @266 NONAME
+ "mcprint" @242 NONAME
"meta" @109 NONAME
- "mouse_trafo" @270 NONAME
+ "mouse_trafo" @251 NONAME
"mouseinterval" @360 NONAME
"mousemask" @358 NONAME
"move" @110 NONAME
@@ -323,7 +319,7 @@ EXPORTS
"reset_prog_mode" @222 NONAME
"reset_shell_mode" @223 NONAME
"resetty" @221 NONAME
- "resizeterm" @272 NONAME
+ "resizeterm" @263 NONAME
"restartterm" @643 NONAME
"ripoffline" @224 NONAME
"savetty" @225 NONAME
@@ -339,13 +335,13 @@ EXPORTS
"set_term" @236 NONAME
"setscrreg" @235 NONAME
"setupterm" @644 NONAME
- "slk_attr" @274 NONAME
- "slk_attr_set" @276 NONAME
+ "slk_attr" @266 NONAME
+ "slk_attr_set" @270 NONAME
"slk_attroff" @237 NONAME
"slk_attron" @239 NONAME
"slk_attrset" @241 NONAME
"slk_clear" @243 NONAME
- "slk_color" @278 NONAME
+ "slk_color" @272 NONAME
"slk_init" @244 NONAME
"slk_label" @245 NONAME
"slk_noutrefresh" @246 NONAME
@@ -373,24 +369,23 @@ EXPORTS
"tigetflag" @260 NONAME
"tigetnum" @261 NONAME
"tigetstr" @262 NONAME
- "timeout" @284 NONAME
+ "timeout" @274 NONAME
"tparm" @653 NONAME
"tputs" @655 NONAME
- "trace" @405 NONAME
"ttytype" @514 NONAME
"typeahead" @264 NONAME
"unctrl" @361 NONAME
"ungetch" @265 NONAME
"ungetmouse" @357 NONAME
"untouchwin" @267 NONAME
- "use_default_colors" @285 NONAME
+ "use_default_colors" @276 NONAME
"use_env" @268 NONAME
- "use_extended_names" @286 NONAME
+ "use_extended_names" @278 NONAME
"vidattr" @269 NONAME
"vidputs" @271 NONAME
"vline" @273 NONAME
- "vw_printw" @287 NONAME
- "vw_scanw" @294 NONAME
+ "vw_printw" @284 NONAME
+ "vw_scanw" @285 NONAME
"vwprintw" @275 NONAME
"vwscanw" @277 NONAME
"waddch" @279 NONAME
@@ -401,7 +396,7 @@ EXPORTS
"wattr_get" @291 NONAME
"wattr_off" @293 NONAME
"wattr_on" @292 NONAME
- "wattr_set" @297 NONAME
+ "wattr_set" @286 NONAME
"wattroff" @289 NONAME
"wattron" @288 NONAME
"wattrset" @290 NONAME
@@ -412,7 +407,7 @@ EXPORTS
"wclear" @302 NONAME
"wclrtobot" @303 NONAME
"wclrtoeol" @304 NONAME
- "wcolor_set" @298 NONAME
+ "wcolor_set" @287 NONAME
"wcursyncup" @305 NONAME
"wdelch" @306 NONAME
"wdeleteln" @307 NONAME
@@ -433,7 +428,7 @@ EXPORTS
"winsnstr" @328 NONAME
"winsstr" @329 NONAME
"winstr" @330 NONAME
- "wmouse_trafo" @300 NONAME
+ "wmouse_trafo" @294 NONAME
"wmove" @338 NONAME
"wnoutrefresh" @339 NONAME
"wprintw" @340 NONAME
diff --git a/contrib/ncurses/misc/panel.def b/contrib/ncurses/misc/panel.def
index 3d7dc9cab80c..30ce1d65ac80 100644
--- a/contrib/ncurses/misc/panel.def
+++ b/contrib/ncurses/misc/panel.def
@@ -1,13 +1,8 @@
LIBRARY panel5 INITINSTANCE TERMINSTANCE
-DESCRIPTION "NCurses-5-0-990828, module panel"
+DESCRIPTION "NCurses-5-1-20000704, module panel"
CODE LOADONCALL
DATA LOADONCALL NONSHARED MULTIPLE
EXPORTS
- "_nc_calculate_obscure" @16 NONAME
- "_nc_free_obscure" @17 NONAME
- "_nc_override" @18 NONAME
- "_nc_panel_is_linked" @19 NONAME
- "_nc_panel_link_bottom" @20 NONAME
"bottom_panel" @7 NONAME
"del_panel" @5 NONAME
"hide_panel" @3 NONAME
diff --git a/contrib/ncurses/misc/run_tic.in b/contrib/ncurses/misc/run_tic.in
new file mode 100644
index 000000000000..59ae3279d688
--- /dev/null
+++ b/contrib/ncurses/misc/run_tic.in
@@ -0,0 +1,146 @@
+#!@SHELL@
+##############################################################################
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
+# #
+# Permission is hereby granted, free of charge, to any person obtaining a #
+# copy of this software and associated documentation files (the "Software"), #
+# to deal in the Software without restriction, including without limitation #
+# the rights to use, copy, modify, merge, publish, distribute, distribute #
+# with modifications, sublicense, and/or sell copies of the Software, and to #
+# permit persons to whom the Software is furnished to do so, subject to the #
+# following conditions: #
+# #
+# The above copyright notice and this permission notice shall be included in #
+# all copies or substantial portions of the Software. #
+# #
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, #
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL #
+# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER #
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING #
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER #
+# DEALINGS IN THE SOFTWARE. #
+# #
+# Except as contained in this notice, the name(s) of the above copyright #
+# holders shall not be used in advertising or otherwise to promote the sale, #
+# use or other dealings in this Software without prior written #
+# authorization. #
+##############################################################################
+#
+# Author: Thomas E. Dickey 1996,2000
+#
+# $Id: run_tic.in,v 1.10 2000/10/09 22:57:35 tom Exp $
+# This script is used to install terminfo.src using tic. We use a script
+# because the path checking is too awkward to do in a makefile.
+#
+# Assumes:
+# The leaf directory names (lib, tabset, terminfo)
+#
+echo '** Building terminfo database, please wait...'
+#
+# The script is designed to be run from the misc/Makefile as
+# make install.data
+
+: ${suffix=@PROG_EXT@}
+: ${DESTDIR=@DESTDIR@}
+: ${prefix=@prefix@}
+: ${exec_prefix=@exec_prefix@}
+: ${bindir=@bindir@}
+: ${top_srcdir=@top_srcdir@}
+: ${srcdir=@srcdir@}
+: ${datadir=@datadir@}
+: ${ticdir=@TERMINFO@}
+: ${source=@TERMINFO_SRC@}
+: ${LN_S="@LN_S@"}
+
+test -z "${DESTDIR}" && DESTDIR=
+
+# Allow tic to run either from the install-path, or from the build-directory
+case "$PATH" in
+:*) PATH=../progs:${DESTDIR}$bindir$PATH ;;
+*) PATH=../progs:${DESTDIR}$bindir:$PATH ;;
+esac
+export PATH
+
+#
+# set another env var that doesn't get reset when `shlib' runs, so `shlib' uses
+# the PATH we just set.
+#
+NEWPATH=$PATH
+export NEWPATH
+PROG_BIN_DIR=${DESTDIR}$bindir
+export PROG_BIN_DIR
+
+TERMINFO=${DESTDIR}$ticdir ; export TERMINFO
+umask 022
+
+# Construct the name of the old (obsolete) pathname, e.g., /usr/lib/terminfo.
+TICDIR=`echo $TERMINFO | sed -e 's@/share/@/lib/@'`
+
+# Remove the old terminfo stuff; we don't care if it existed before, and it
+# would generate a lot of confusing error messages if we tried to overwrite it.
+# We explicitly remove its contents rather than the directory itself, in case
+# the directory is actually a symbolic link.
+( cd $TERMINFO && rm -fr ? 2>/dev/null )
+
+# If we're not installing into /usr/share/, we'll have to adjust the location
+# of the tabset files in terminfo.src (which are in a parallel directory).
+TABSET=`echo $ticdir | sed -e 's@/terminfo$@/tabset@'`
+if test "x$TABSET" != "x/usr/share/tabset" ; then
+ echo '** adjusting tabset paths'
+ TMP=${TMPDIR-/tmp}/$$
+ sed -e s:/usr/share/tabset:$TABSET:g $source >$TMP
+ trap "rm -f $TMP" 0 1 2 5 15
+ source=$TMP
+fi
+
+cat <<EOF
+Running tic to install $TERMINFO ...
+
+ You may see messages regarding unknown capabilities, e.g., AX.
+ These are extended terminal capabilities which can be compiled
+ using
+ tic -x
+ Read the INSTALL document before doing this - it can cause
+ problems for older ncurses applications.
+
+EOF
+if ( $srcdir/shlib tic$suffix -s -o $TERMINFO $source )
+then
+ echo '** built new '$TERMINFO
+else
+ echo '? tic could not build '$TERMINFO
+ exit 1
+fi
+
+# Make a symbolic link to provide compatibility with applications that expect
+# to find terminfo under /usr/lib. That is, we'll _try_ to do that. Not
+# all systems support symbolic links, and those that do provide a variety
+# of options for 'test'.
+if test "$TICDIR" != "$TERMINFO" ; then
+ ( rm -f $TICDIR 2>/dev/null )
+ if ( cd $TICDIR 2>/dev/null )
+ then
+ cd $TICDIR
+ TICDIR=`pwd`
+ if test $TICDIR != $TERMINFO ; then
+ # Well, we tried. Some systems lie to us, so the
+ # installer will have to double-check.
+ echo "Verify if $TICDIR and $TERMINFO are the same."
+ echo "The new terminfo is in $TERMINFO; the other should be a link to it."
+ echo "Otherwise, remove $TICDIR and link it to $TERMINFO."
+ fi
+ else
+ cd ${DESTDIR}$prefix
+ # Construct a symbolic link that only assumes $ticdir has the
+ # same $prefix as the other installed directories.
+ RELATIVE=`echo $ticdir|sed -e 's:^'$prefix'/::'`
+ if test "$RELATIVE" != "$ticdir" ; then
+ RELATIVE=../`echo $ticdir|sed -e 's:^'$prefix'/::' -e 's:^/::'`
+ fi
+ if ( @LN_S@ $RELATIVE $TICDIR )
+ then
+ echo '** linked '$TICDIR' for compatibility'
+ fi
+ fi
+fi
diff --git a/contrib/ncurses/misc/terminfo.src b/contrib/ncurses/misc/terminfo.src
index c99b21325af5..9e58d167e191 100644
--- a/contrib/ncurses/misc/terminfo.src
+++ b/contrib/ncurses/misc/terminfo.src
@@ -5,7 +5,7 @@
# bug-ncurses@gnu.org
#
# Version 10.2.1
-# $Date: 2000/07/01 21:23:58 $
+# $Date: 2000/09/24 02:29:16 $
# terminfo syntax
#
# Eric S. Raymond (current maintainer)
@@ -1185,6 +1185,30 @@ qnx|qnx4|qnx console,
rmso=\E), rmul=\E], rs1=\ER, setb=\E@%p1%Pb%gb%gf%d%d,
setf=\E@%p1%Pf%gb%gf%d%d, sgr0=\E}\E]\E>\E), smcup=\Ei,
smso=\E(, smul=\E[,
+#
+#
+qnxt|qnxt4|QNX4 terminal,
+ crxm, use=qnx4,
+#
+qnxm|QNX4 with mouse events,
+ maddr#1,
+ chr=\E/, cvr=\E", is1=\E/0t, mcub=\E/>1h, mcub1=\E/>7h,
+ mcud=\E/>1h, mcud1=\E/>1l\E/>9h, mcuf=\E/>1h\E/>9l,
+ mcuf1=\E/>7l, mcuu=\E/>6h, mcuu1=\E/>6l, rmicm=\E/>2l,
+ smicm=\E/>2h, use=qnx4,
+#
+qnxw|QNX4 windows,
+ xvpa, use=qnxm,
+#
+# Monochrome QNX4 terminal or console. Setting this terminal type will
+# allow an application running on a color console to behave as if it
+# were a monochrome terminal. Output will be through stdout instead of
+# console writes because the term routines will recognize that the
+# terminal name starts with 'qnxt'.
+#
+qnxtmono|Monochrome QNX4 terminal or console,
+ colors@, pairs@,
+ scp@, use=qnx4,
# From: Federico Bianchi <bianchi@pc-arte2.arte.unipi.it>, 1 Jul 1998
# (esr: commented out <scp> and <rmcup> to avoid warnings.)
@@ -1194,6 +1218,72 @@ qnxt2|qnx 2.15 serial terminal,
civis@, cnorm@, cvvis@, dch1@, ich1@, kRES@, kRPL@, kUND@, kspd@,
rep@, rmcup@, rmso=\E>, setb@, setf@, smcup@, smso=\E<, use=qnx4,
+# QNX ANSI terminal definition
+qansi-g|QNX ANSI,
+ am, eslok, hs, xon,
+ colors#8, cols#80, it#8, lines#25, ncv#19, pairs#64, wsl#80,
+ acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~Oa,
+ bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
+ clear=\E[2J\E[H, cnorm=\E[?25h\E[?12l, cr=^M,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
+ cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH$<5>, cuu=\E[%p1%dA, cuu1=\E[A,
+ cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
+ dl=\E[%p1%dM, dl1=\E[1M, dsl=\E[r, ech=\E[%p1%dX, ed=\E[J,
+ el=\E[K, el1=\E[1K\E[X, flash=\E[?5h$<200>\E[?5l,
+ fsl=\E[?6h\E8, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH,
+ ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L,
+ ind=\E[S, indn=\E[%p1%dS, invis=\E[9m,
+ is2=\E>\E[?1l\E[?7h\E[0;10;39;49m, is3=\E(B\E)0,
+ kBEG=\ENn, kCAN=\E[s, kCMD=\E[t, kCPY=\ENs, kCRT=\ENt,
+ kDL=\ENv, kEXT=\ENw, kFND=\ENx, kHLP=\ENy, kHOM=\E[h,
+ kLFT=\E[d, kNXT=\E[u, kOPT=\ENz, kPRV=\E[v, kRIT=\E[c,
+ kbs=^H, kcan=\E[S, kcbt=\E[Z, kclo=\ENc, kclr=\ENa,
+ kcmd=\E[G, kcpy=\E[g, kctab=\E[z, kcub1=\E[D, kcud1=\E[B,
+ kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[p, kend=\E[Y,
+ kext=\E[y, kf1=\EOP, kf10=\EOY, kf11=\EOZ, kf12=\EOA,
+ kf13=\EOp, kf14=\EOq, kf15=\EOr, kf16=\EOs, kf17=\EOt,
+ kf18=\EOu, kf19=\EOv, kf2=\EOQ, kf20=\EOw, kf21=\EOx,
+ kf22=\EOy, kf23=\EOz, kf24=\EOa, kf25=\E[1~, kf26=\E[2~,
+ kf27=\E[3~, kf28=\E[4~, kf29=\E[5~, kf3=\EOR, kf30=\E[6~,
+ kf31=\E[7~, kf32=\E[8~, kf33=\E[9~, kf34=\E[10~,
+ kf35=\E[11~, kf36=\E[12~, kf37=\E[17~, kf38=\E[18~,
+ kf39=\E[19~, kf4=\EOS, kf40=\E[20~, kf41=\E[21~,
+ kf42=\E[22~, kf43=\E[23~, kf44=\E[24~, kf45=\E[25~,
+ kf46=\E[26~, kf47=\E[27~, kf48=\E[28~, kf5=\EOT, kf6=\EOU,
+ kf7=\EOV, kf8=\EOW, kf9=\EOX, kfnd=\ENf, khlp=\ENh,
+ khome=\E[H, khts=\ENb, kich1=\E[@, kil1=\E[`, kind=\E[a,
+ kmov=\ENi, kmrk=\ENm, kmsg=\ENe, knp=\E[U, kopn=\ENo,
+ kopt=\ENk, kpp=\E[V, kref=\ENl, kres=\ENp, krfr=\ENg,
+ kri=\E[b, krpl=\ENr, krst=\ENj, ksav=\ENq, kslt=\E[T,
+ ktbc=\ENd, kund=\ENu, ll=\E[99H, nel=\EE, op=\E[39;49m,
+ rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, ri=\E[T,
+ rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l, rmso=\E[27m,
+ rmul=\E[24m, rs1=\017\E[?7h\E[0;39;49m$<2>\E>\E[?1l,
+ rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
+ setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m,
+ smul=\E[4m, tbc=\E[2g,
+ tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH,
+#
+qansi|QNX ansi with console writes,
+ daisy, xhpa, use=qansi-g,
+#
+qansi-t|QNX ansi without console writes,
+ crxm, use=qansi,
+#
+qansi-m|QNX ansi with mouse,
+ maddr#1,
+ chr=\E[, cvr=\E], is1=\E[0t, mcub=\E[>1h, mcub1=\E[>7h,
+ mcud=\E[>1h, mcud1=\E[>1l\E[>9h, mcuf=\E[>1h\E[>9l,
+ mcuf1=\E[>7l, mcuu=\E[>6h, mcuu1=\E[>6l, rmicm=\E[>2l,
+ smicm=\E[>2h, use=qansi,
+#
+qansi-w|QNX ansi for windows,
+ xvpa, use=qansi-m,
+
#### NetBSD consoles
#
# pcvt termcap database entries (corresponding to release 3.31)
@@ -1352,7 +1442,7 @@ rcons|BSD rasterconsole,
rcons-color|BSD rasterconsole with ANSI color,
bce,
colors#8, pairs#64,
- op=\E[m, setab=\E[4%dm, setaf=\E[3%dm, use=rcons,
+ op=\E[m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=rcons,
# mgterm -- MGL/MGL2, MobileGear Graphic Library
# for PocketBSD,PocketLinux,NetBSD/{hpcmips,mac68k}
@@ -2171,7 +2261,7 @@ vt420pc|DEC VT420 w/PC keyboard,
vt420pcdos|DEC VT420 w/PC for DOS Merge,
lines#25,
- dispc=%?%p2%{19}%=%t\E\023\021%e%p2%{32}%<%t\E%p2%c%e%p2%{127}%=%t\E\177%e%p2%c%;,
+ dispc=%?%p1%{19}%=%t\E\023\021%e%p1%{32}%<%t\E%p1%c%e%p1%{127}%=%t\E\177%e%p1%c%;,
pctrm@,
rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sgr@,
sgr0=\E[m, smsc=\E[?1;2r\E[34h, use=vt420pc,
@@ -2450,7 +2540,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
kslt=\E[4~, meml=\El, memu=\Em, rc=\E8, rev=\E[7m, ri=\EM,
rmacs=^O, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
- rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, sc=\E7,
+ rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
@@ -2483,7 +2573,7 @@ xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
memu=\Em, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O, rmam=\E[?7l,
rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
rmso=\E[27m, rmul=\E[24m, rs1=^O,
- rs2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>, sc=\E7,
+ rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>, sc=\E7,
setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
@@ -2510,7 +2600,7 @@ xterm-xf86-v333|xterm terminal emulator (XFree86 3.3.3 Window System),
sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
smcup=\E[?1048h\E[?1047h, use=xterm-xf86-v33,
-# This beta version will probably be released in XFree86 4.0.
+# This version was released in XFree86 4.0.
xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System),
npc,
kDC=\E[3;5~, kEND=\EO5F, kHOM=\EO5H, kIC=\E[2;5~,
@@ -2531,7 +2621,54 @@ xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System),
smcup=\E[?1049h, use=xterm-xf86-v333,
xterm-xfree86|xterm-new|xterm terminal emulator (XFree86 4.0 Window System),
- use=xterm-xf86-v40,
+ npc,
+ kDC=\E[3;5~, kEND=\EO5F, kHOM=\EO5H, kIC=\E[2;5~,
+ kLFT=\EO5D, kNXT=\E[6;5~, kPRV=\E[5;5~, kRIT=\EO5C,
+ kb2=\EOE, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+ kcuu1=\EOA, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
+ kf11=\E[23~, kf12=\E[24~, kf13=\EO2P, kf14=\EO2Q,
+ kf15=\EO2R, kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~,
+ kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
+ kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, kf25=\EO5P,
+ kf26=\EO5Q, kf27=\EO5R, kf28=\EO5S, kf29=\E[15;5~,
+ kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~,
+ kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~,
+ kf36=\E[24;5~, kf37=\EO6P, kf38=\EO6Q, kf39=\EO6R,
+ kf4=\EOS, kf40=\EO6S, kf41=\E[15;6~, kf42=\E[17;6~,
+ kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~,
+ kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, kf5=\E[15~,
+ kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH,
+ kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
+ use=xterm-basic,
+#
+# This chunk is used for building the VT220/Sun/PC keyboard variants.
+xterm-basic|xterm terminal emulator - common (XFree86),
+ am, bce, km, mc5i, mir, msgr, xenl,
+ colors#8, cols#80, it#8, lines#24, pairs#64,
+ acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+ bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
+ clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+ cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+ dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
+ ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
+ flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
+ ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
+ ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^H,
+ kdch1=\E[3~, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
+ memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
+ rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>,
+ rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+ rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm,
+ setaf=\E[3%p1%dm,
+ setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+ sgr=\E[0%?%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?1049h,
+ smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
+ tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
+ vpa=\E[%i%p1%dd,
# From: David J. MacKenzie <djm@va.pubnix.com>, 14 Nov 1997
xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
@@ -2539,17 +2676,17 @@ xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
# This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
xterm-16color|xterm with 16 colors like aixterm,
- colors#16, pairs#256,
+ colors#16, ncv#32, pairs#256,
setab=\E[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm,
setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm,
setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m,
- use=xterm-xf86-v40,
+ use=xterm-xfree86,
# These variants of XFree86 3.9.16 xterm are built as a configure option.
xterm-256color|xterm with 256 colors,
ccc,
- colors#256, pairs#256,
+ colors#256, ncv#32, pairs#256,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
setab=\E[48;5;%p1%dm, setaf=\E[38;5;%p1%dm,
setb=\E[48;5;%p1%dm, setf=\E[38;5;%p1%dm,
@@ -2583,7 +2720,7 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
invis=\2338m,
is2=\E7\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>,
ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kbs=^H,
- kc1=\217q, kc3=\217s, kcub1=\217D, kcud1=\217B,
+ kc1=\217q, kc3=\217s, kcbt=\233Z, kcub1=\217D, kcud1=\217B,
kcuf1=\217C, kcuu1=\217A, kdch1=\2333~, kend=\2334~,
kent=\217M, kf1=\23311~, kf10=\23321~, kf11=\23323~,
kf12=\23324~, kf13=\23325~, kf14=\23326~, kf15=\23328~,
@@ -2596,11 +2733,11 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
ri=\215, rmacs=^O, rmam=\233?7l, rmcup=\233?1049l,
rmir=\2334l, rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m,
rs1=\Ec,
- rs2=\E7\E[62"p\E G\233r\233m\233?7h\233?1;3;4;6l\2334l\E8\E>,
+ rs2=\E[62"p\E G\E7\233r\E8\233m\233?7h\233?1;3;4;6l\2334l\E>,
sc=\E7, setab=\2334%p1%dm, setaf=\2333%p1%dm,
setb=\2334%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
setf=\2333%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
- sgr=\2330%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+ sgr=\2330%?%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
sgr0=\233m^O, smacs=^N, smam=\233?7h, smcup=\233?1049h,
smir=\2334h, smkx=\233?1h\E=, smso=\2337m, smul=\2334m,
tbc=\2333g, u6=\233[%i%d;%dR, u7=\E[6n, u8=\233[?1;2c,
@@ -2610,18 +2747,38 @@ xterm-hp|XFree86 xterm with hpterm function keys,
kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
kdch1=\EP, kend=\EF, kf1=\Ep, kf2=\Eq, kf3=\Er, kf4=\Es,
kf5=\Et, kf6=\Eu, kf7=\Ev, kf8=\Ew, khome=\Eh, kich1=\EQ,
- knp=\ES, kpp=\ET, use=xterm-xfree86,
-
+ knp=\ES, kpp=\ET, use=xterm-basic,
+
+xterm-sco|XFree86 xterm with SCO function keys,
+ kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[F,
+ kf1=\E[M, kf10=\E[V, kf11=\E[W, kf12=\E[X, kf13=\E[Y,
+ kf15=\E[a, kf16=\E[b, kf17=\E[c, kf18=\E[d, kf19=\E[e,
+ kf2=\E[N, kf20=\E[f, kf21=\E[g, kf22=\E[h, kf23=\E[i,
+ kf24=\E[j, kf25=\E[k, kf26=\E[l, kf27=\E[m, kf28=\E[n,
+ kf29=\E[o, kf3=\E[O, kf30=\E[p, kf31=\E[q, kf32=\E[r,
+ kf33=\E[s, kf34=\E[t, kf35=\E[u, kf4=\E[P, kf5=\E[Q,
+ kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H,
+ kich1=\E[L, knp=\E[G, kpp=\E[I, use=xterm-basic,
+
+# The xterm-xfree86 description has all of the features, but is not completely
+# compatible with vt220. If you are using a Sun or PC keyboard, set the
+# sunKeyboard resource to true:
+# + maps the editing keypad
+# + interprets control-function-key as a second array of keys, so a
+# 12-fkey keyboard can support vt220's 20-fkeys.
+# + maps numeric keypad "+" to ",".
+# + uses DEC-style control sequences for the application keypad.
+#
xterm-vt220|XFree86 xterm emulating vt220,
- ka1=\EOw, ka3=\EOy, kbeg=\EOu, kbs=^H, kc1=\EOq, kc3=\EOs,
- kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
- kdch1=\E[3~, kend=\E[4~, kent=\EOM, kf1=\EOP, kf10=\E[21~,
- kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
- kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
- kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS,
- kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
- khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
- use=xterm-xfree86,
+ ka1=\EOw, ka3=\EOy, kbeg=\EOu, kc1=\EOq, kc3=\EOs, kcbt=\E[Z,
+ kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[4~,
+ kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
+ kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~,
+ kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ,
+ kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf5=\E[15~, kf6=\E[17~,
+ kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[1~,
+ kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
+ use=xterm-basic,
xterm-vt52|XFree86 xterm emulating dec vt52,
cols#80, it#8, lines#24,
@@ -2670,6 +2827,8 @@ kterm|kterm kanji terminal emulator (X window system),
acsc@, csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs@, fsl=\E[?F,
kmous=\E[M, rc=\E8, rmacs@, sc=\E7, smacs@,
tsl=\E[?E\E[?%i%dT, use=xterm-r6, use=ecma+color,
+kterm-color|kterm-co|kterm with ANSI colors,
+ ncv@, use=kterm, use=ecma+color,
# See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
xterm-nic|xterm with ich/ich1 suppressed for non-curses programs,
ich@, ich1@, use=xterm,
@@ -3028,6 +3187,8 @@ eterm|gnu emacs term.el terminal emulation,
# G0 (bool) Terminal can deal with ISO 2022 font selection sequences.
# AX (bool) Does understand ANSI set default fg/bg color
# (\E[39m / \E[49m).
+# S0 (str) Switch charset 'G0' to the specified charset.
+# E0 (str) Switch charset 'G0' back to standard charset.
screen|VT 100/ANSI X3.64 virtual terminal,
OTbs, OTpt, am, km, mir, msgr, xenl, G0,
colors#8, cols#80, it#8, lines#24, pairs#64,
@@ -3048,8 +3209,8 @@ screen|VT 100/ANSI X3.64 virtual terminal,
kpp=\E[5~, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[23m, rmul=\E[24m,
rs2=\Ec, sc=\E7, sgr0=\E[m, smacs=^N, smir=\E[4h,
- smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g,
- use=ecma+color,
+ smkx=\E[?1h\E=, smso=\E[3m, smul=\E[4m, tbc=\E[3g, E0=\E(B,
+ S0=\E(%p1%c, use=ecma+color,
screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
cols#132, use=screen,
@@ -3141,7 +3302,7 @@ ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in vt220-8 mode,
rc=\E8, rev=\E[7m, rf=/usr/share/tabset/vt100, ri=\EM,
rmacs=^O, rmam=\E[?7l, rmcup=\E[2J\E8, rmir=\E[4l,
rmso=\E[27m, rmul=\E[24m,
- rs2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>, sc=\E7,
+ rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;4;6l\E[4l\E>, sc=\E7,
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;,
sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E7,
smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E]0;,
@@ -3169,9 +3330,10 @@ ncsa-vt220|NCSA Telnet using vt220-compatible function keys,
#### Pilot Pro Palm-Top
#
-# From: Jason Downs <downsj@downsj.com>, 15 Jun 1997 (Top Gun Telnet's author)
+# Termcap for Top Gun Telnet and SSH on the Palm Pilot.
+# http://www.isaac.cs.berkeley.edu/pilot/tgtelnet.html
pilot|tgtelnet|Top Gun Telnet on the Palm Pilot Professional,
- am, xenl,
+ OTbs, am, xenl,
cols#39, lines#16,
bel=^G, clear=\Ec, cr=^M, cub1=^H, cud1=^J,
cup=\Em%p1%{32}%+%c%p2%{32}%+%c, home=\Em\s\s, ht=^I,
@@ -3702,7 +3864,7 @@ pcmw|PC running Microsoft Works,
altos2|alt2|altos-2|altos II,
cols#80, it#8, lines#24, xmc#0,
clear=\E[H\E[2J, cr=^M, cub1=^H, cud1=\E[1B, cuf1=\E[1C,
- cup=\E[%i%p1%d;%p2%dH, cuu1=\E[1A, dch1=\E[P, dl=\E[M,
+ cup=\E[%i%p1%d;%p2%dH, cuu1=\E[1A, dch1=\E[P, dl1=\E[M,
ed=\E[J, el=\E[K, home=\E[H, ht=^I, ich1=\E[@,
if=/usr/share/tabset/vt100, il1=\E[L, ind=^J,
is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, kDL=^Am\r,
@@ -3743,7 +3905,7 @@ altos7|alt7|altos VII,
acsc=j5k3l2m1n8q\:t4u9v=w0x6, blink=\EG2, bold=\EGt,
clear=\E+^^, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW,
- dim=\EGp, dl=\ER, ed=\EY, el=\ET, home=^^, ht=^I, il1=\EE,
+ dim=\EGp, dl1=\ER, ed=\EY, el=\ET, home=^^, ht=^I, il1=\EE,
ind=^J, invis=\EG1,
is2=\E`\:\Ee(\EO\Ee6\Ec41\E~4\Ec21\Eu\E~2, kDL=^Am\r,
kEOL=^An\r, kbs=^H, kcbt=^AK\r, kclr=^AL\r, kcub1=^H,
@@ -4356,12 +4518,12 @@ bobcat|sbobcat|HP 9000 model 300 console,
am, da, db, mir, xhp,
cols#128, it#8, lines#47, xmc#0,
cbt=\Ei, clear=\EH\EJ, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
- cup=\E&a%dy%dC$<6/>, cuu1=\EA, dch1=\EP, dl1=\EM$<10*/>,
- ed=\EJ, el=\EK, hpa=\E&a%dC$<6/>, ht=^I, il1=\EL$<10*/>,
- ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
- khome=\Eh, nel=^M^J, rmir=\ER, rmkx=\E&s0A, rmso=\E&d@,
- rmul=\E&d@, sgr0=\E&d@, smir=\EQ, smkx=\E&s1A, smso=\E&dB,
- smul=\E&dD, vpa=\E&a%dY$<6/>,
+ cup=\E&a%p1%dy%p2%dC$<6/>, cuu1=\EA, dch1=\EP,
+ dl1=\EM$<10*/>, ed=\EJ, el=\EK, hpa=\E&a%p1%dC$<6/>, ht=^I,
+ il1=\EL$<10*/>, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB,
+ kcuf1=\EC, kcuu1=\EA, khome=\Eh, nel=^M^J, rmir=\ER,
+ rmkx=\E&s0A, rmso=\E&d@, rmul=\E&d@, sgr0=\E&d@, smir=\EQ,
+ smkx=\E&s1A, smso=\E&dB, smul=\E&dD, vpa=\E&a%p1%dY$<6/>,
gator-t|HP 9000 model 237 emulating extra-tall AAA,
lines#94, use=gator,
gator|HP 9000 model 237 emulating AAA,
@@ -4783,7 +4945,7 @@ pt100|pt200|wren|fenix|prime pt100/pt200,
cbt=\E[Z, clear=\E?, cr=^M, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=\ED, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E0%p1%{33}%+%c%p2%{33}%+%c, cuu=\E[%p1%dA,
- cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[M,
+ cuu1=\EM, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl1=\E[M,
ed=\E[J\E[r, el=\E[K\E[t, flash=\E$$<200/>\E$P,
home=\E$B, ht=^I, il1=\E[L\E[t, ind=^J, kbs=^H, kcub1=\E[D,
kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E$A, nel=^M^J,
@@ -5168,7 +5330,7 @@ tvi921|televideo model 921 with sysline same as page & real vi function,
if=/usr/share/tabset/stdcrt, il1=\EE, ind=^J, invis@,
is2=\El\E"\EF1\E.3\017\EA\E<, kbs=^H, kclr=^Z, kcub1=^H,
kcud1=^V, kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER$<1*/>,
- ked=\EY, kel=\ET, kich1=\EQ, kil1=\EE, nel=^M^J, rmacs=\E%,
+ ked=\EY, kel=\ET, kich1=\EQ, kil1=\EE, nel=^M^J, rmacs=\E%%,
rmir=, smacs=\E$, smir=, tsl=\Ef\EG0, use=adm+sgr,
# without the beeper
# (tvi92B: removed :ko=bt: before translation, I see no backtab cap;
@@ -5184,7 +5346,7 @@ tvi92B|televideo model 921 with sysline same as page & real vi function & no bee
invis@, is2=\El\E"\EF1\E.3\017\EA\E<, kbs=^H, kclr=^Z,
kcub1=^H, kcud1=^V, kcuf1=^L, kcuu1=^K, kdch1=\EW,
kdl1=\ER$<1*/>, ked=\EY, kel=\ET, kich1=\EQ, kil1=\EE,
- nel=^M^J, rmacs=\E%, smacs=\E$, tsl=\Ef\EG0, use=adm+sgr,
+ nel=^M^J, rmacs=\E%%, smacs=\E$, tsl=\Ef\EG0, use=adm+sgr,
# (tvi92D: removed :ko=bt: before translation, I see no backtab cap -- esr)
tvi92D|tvi92B with DTR instead of XON/XOFF & better padding,
dl1=\ER$<2*/>, il1=\EE$<2*/>,
@@ -5553,7 +5715,7 @@ tvi955|televideo 955,
civis=\E.0, cnorm=\E.2, cud1=^V, cup=\E[%i%p1%d;%p2%dH,
cvvis=\E.1, dim=\E[=5h, ind@, invis=\EG1,
is2=\E[=3l\EF1\Ed\EG0\E[=5l\E%\El, kctab=\E2, khts=\E1,
- knp=\EK, kpp=\EJ, krmir=\EQ, ktbc=\E3, mc0=\EP, rmacs=\E%,
+ knp=\EK, kpp=\EJ, krmir=\EQ, ktbc=\E3, mc0=\EP, rmacs=\E%%,
rmam=\E[=7l, rmxon=^N,
rs1=\EDF\EC\Eg\Er\EO\E'\E(\Ew\EX\Ee \017\E0P\E6\0\E0p\E4\0\Ef\r,
sgr0=\EG0\E[=5l, smacs=\E$, smam=\E[=7h, smxon=^O,
@@ -5640,7 +5802,7 @@ tvi9065|televideo 9065,
pln=\E_%p1%{63}%+%c%p2%s\r, prot=\E&,
rep=\E[%p2%db%p1%c, rev=\EG4,
rf=/usr/share/tabset/stdcrt, ri=\Ej, rin=\E[%p1%dT,
- rmacs=\E%, rmam=\E[=7l, rmcup=\E.3\Er\E[1;25r\E[25;0H,
+ rmacs=\E%%, rmam=\E[=7l, rmcup=\E.3\Er\E[1;25r\E[25;0H,
rmdc=\0, rmir=\Er, rmln=\E[4;1v, rmso=\EG0, rmul=\EG0,
rmxon=^N, rs1=\EC\EDF\E[0;0v\E[8;1v\E[=65l,
rs2=\E.b\E[10;20v\E[14;1v\E[3;0v\E[7;0v\E[=11.h\E[=12.h\E[=13.h\E[=14.h\E[=15l\E[=20h\E[=60l\E[=61h\E[=9l\E[=10l\E[=21l\E[=23l\E[=3l\E_40\E_50\En\Ew\Ee \Ex0\0\0\Ex1\0\0\Ex2\0\0\Ex3\0\0\Ex4\0\0\E1,
@@ -7158,9 +7320,9 @@ vt320-k3|MS-Kermit 3.00's vt320 emulation,
acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
clear=\E[H\E[J, cmdch=\E, cnorm=\E[?25h, cr=^M,
- csr=\E[%i%p1%d;%p1%dr, cub=\E[%p1%dD, cub1=^H,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
- cup=\E[%i%p1%d;%p1%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
dsl=\E[0$~, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
flash=\E[?5h\E[?5l\E[?5h\E[?5l\E[?5h\E[?5l,
@@ -7313,6 +7475,43 @@ rbcomm-w|IBM PC with RBcomm in 132 column mode,
is2=\017\035\E(B\E)0\E[?7h\E[?3h\E[>8g, kbs=^H,
kcub1=^H, kcud1=^J, nel=^M^J, use=rbcomm,
+######## LCD DISPLAYS
+#
+
+#### Matrix Orbital
+# from: Eric Z. Ayers (eric@ale.org)
+#
+# Matrix Orbital 20x4 LCD display
+# Command Character is 0xFE (decimal 254, octal 376)
+#
+# On this device, cursor addressability isn't possible. The LCD expects:
+# 0xfe G <col> <row>
+# for cup: %p1 == row and %p2 is column
+#
+# This line:
+# cup=\376G%p2%c%p1%c
+# LOOKS like it will work, but sometimes only one of the two numbers is sent.
+# See the terminfo (5) manpage commented regarding 'Terminals which use "%c"'.
+#
+# Alas, there is no cursor upline capability on this display.
+#
+# These entries add some 'sanity stuff' to the clear function. That is, it
+# does a 'clear' and also turns OFF auto scroll, turns ON Auto Line Wrapping,
+# and turns off the cursor blinking and stuff like that.
+#
+# NOTE: calling 'beep' turns on the backlight (bell)
+# NOTE: calling 'flash' turns it on and back off (visual bell)
+#
+MtxOrb| Generic Matrix Orbital LCD display,
+ bel=\376B^A, clear=\376X\376C\376R\376K\376T,
+ cnorm=\376K\376T, cub1=\376L, cuf1=\376M,
+ flash=\376B\001$<200>\376F, home=\376H,
+MtxOrb204| 20x4 Matrix Orbital LCD display,
+ cols#20, lines#4, use=MtxOrb,
+MtxOrb162| 16x2 Matrix Orbital LCD display,
+ cols#16, lines#2, use=MtxOrb,
+# The end
+
######## OLDER TERMINAL TYPES
#
# This section is devoted to older commercial terminal brands that are now
@@ -7568,7 +7767,7 @@ att4418|att5418|AT&T 5418 80 cols,
cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[1P, dim=\E[2m,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K, home=\E[H,
ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L, ind=^J,
- is1=\E[?3l, is2=\E)0\E?6l\E?5l, kclr=\E[%, kcub1=\E@,
+ is1=\E[?3l, is2=\E)0\E?6l\E?5l, kclr=\E[%%, kcub1=\E@,
kcud1=\EU, kcuf1=\EA, kcuu1=\ES, kent=\E[, kf1=\E[h,
kf10=\E[m, kf11=\E[n, kf12=\E[o, kf13=\E[H, kf14=\E[I,
kf15=\E[J, kf18=\E[K, kf19=\E[L, kf2=\E[i, kf20=\E[E,
@@ -7960,7 +8159,7 @@ att605|AT&T 605 80 column 102key keyboard,
att605-pc|ATT 605 in pc term mode,
acsc=j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263,
cbt=\E[Z, cub1=\E[D, cud1=\E[B, cuf1=\E[C, cuu1=\E[A,
- dch1=\E[P, dl1=\E[M, ich1=\E[@, il=\E[L, il1=\E[L, kcbt=\E[Z,
+ dch1=\E[P, dl1=\E[M, ich1=\E[@, il1=\E[L, kcbt=\E[Z,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P,
kdl1=\E[M, kend=\E[F, kf1=\E[M, kf10=\E[V, kf2=\E[N,
kf3=\E[O, kf4=\E[P, kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T,
@@ -9965,7 +10164,7 @@ dgkeys+11|Private entry describing 11 minimal-subset DG mode special keys,
kf20=^^i, kf21=^^j, kf22=^^k, kf23=^^1, kf24=^^2, kf25=^^3,
kf26=^^4, kf27=^^5, kf28=^^6, kf29=^^7, kf3=^^s, kf30=^^8,
kf31=^^9, kf32=^^\:, kf33=^^;, kf34=^^!, kf35=^^", kf36=^^#,
- kf37=^^$, kf38=^^%, kf39=^^&, kf4=^^t, kf40=^^', kf41=^^(,
+ kf37=^^$, kf38=^^%%, kf39=^^&, kf4=^^t, kf40=^^', kf41=^^(,
kf42=^^), kf43=^^*, kf44=^^+, kf5=^^u, kf6=^^v, kf7=^^w,
kf8=^^x, kf9=^^y, khome=^H,
@@ -9978,7 +10177,7 @@ dgkeys+15|Private entry describing 15 DG mode special keys,
kf30=^^`, kf31=^^1, kf32=^^2, kf33=^^3, kf34=^^4, kf35=^^5,
kf36=^^6, kf37=^^7, kf38=^^8, kf39=^^9, kf4=^^t, kf40=^^\:,
kf41=^^;, kf42=^^<, kf43=^^=, kf44=^^>, kf45=^^0, kf46=^^!,
- kf47=^^", kf48=^^#, kf49=^^$, kf5=^^u, kf50=^^%, kf51=^^&,
+ kf47=^^", kf48=^^#, kf49=^^$, kf5=^^u, kf50=^^%%, kf51=^^&,
kf52=^^', kf53=^^(, kf54=^^), kf55=^^*, kf56=^^+, kf57=^^\,,
kf58=^^-, kf59=^^., kf6=^^v, kf60=^^\s, kf7=^^w, kf8=^^x,
kf9=^^y,
@@ -10888,7 +11087,7 @@ f100|freedom|freedom100|freedom model 100,
kcuf1=^L, kcuu1=^K, kf1=^A@\r, kf10=^AI\r, kf2=^AA\r,
kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r,
kf8=^AG\r, kf9=^AH\r, khome=^^, ri=\Ej, rmacs=\E$, rmir=\Er,
- smacs=\E%, smir=\Eq, tbc=\E3, tsl=\Eg\Ef,
+ smacs=\E%%, smir=\Eq, tbc=\E3, tsl=\Eg\Ef,
vpa=\E[%p1%{32}%+%c, use=adm+sgr,
f100-rv|freedom-rv|freedom 100 in reverse video,
flash=\Ed$<200>\Eb, is2=\Eg\Ef\r\Eb, use=f100,
@@ -11915,10 +12114,10 @@ icl6404|kds7372|icl6402|kds6402|ICL 6404 aka Kokusai Display Systems 7372,
cnorm=\E.3, cr=^M,
csr=\E!%+%p1%{32}%+%p2%{32} cud1=\026, cuf1=^L,
cup=\E=%p1%{32}%+%c%p2%{80}%m%{32}%+%c%p2%{80}%>%{32}%+%c,
- cuu1=^K, cvvis=\E.1, dch=\EW, dl1=\ER, home=^^, ht=^I, hts=\E1,
- il1=\EE, invis=\E[1ZZ, is1=\EC\E.3\EDF\EV1\Eg\E[0ZZ,
- nel=^_, rev=\E[4ZZ, rmir=\Er,
- rmso=\E[%gh%{4}%^%Ph%gh%dZZ,
+ cuu1=^K, cvvis=\E.1, dch1=\EW, dl1=\ER, home=^^, ht=^I,
+ hts=\E1, il1=\EE, invis=\E[1ZZ,
+ is1=\EC\E.3\EDF\EV1\Eg\E[0ZZ, nel=^_, rev=\E[4ZZ,
+ rmir=\Er, rmso=\E[%gh%{4}%^%Ph%gh%dZZ,
rmul=\E[%gh%{8}%^%Ph%gh%dZZ, rs2=\Eo1,
sgr=\E[%{0}%?%p1%t%{4}%|%;%?%p2%t%{8}%|%;%?%p3%t%{4}%|%;%?%p4%t%{2}%|%;%?%p7%t%{1}%|%;ZZ,
sgr0=\E[0ZZ, smir=\Eq, smso=\E[8ZZ, smul=\E[8ZZ, tbc=\E3,
@@ -11945,7 +12144,7 @@ intext|Interactive Systems Corporation modified owl 1200,
kcub1=^_, kcud1=^J, kcuf1=^^, kcuu1=^\, kf0=^VJ\r, kf1=^VA\r,
kf2=^VB\r, kf3=^VC\r, kf4=^VD\r, kf5=^VE\r, kf6=^VF\r,
kf7=^VG\r, kf8=^VH\r, kf9=^VI\r, khome=^Z, rmir=^V<,
- rmkx=^V9, rmso=^V#\s, smir=^V;, smkx=\036\:\264\026%,
+ rmkx=^V9, rmso=^V#\s, smir=^V;, smkx=\036\:\264\026%%,
smso=^V$\,,
intext2|intextii|INTERACTIVE modified owl 1251,
am, bw, ul,
@@ -12065,7 +12264,7 @@ kt7ix|kimtron model kt-7 or 70 in IX mode,
ked=\EY, kel=\ET, kend=\EY, kf0=^AI\r, kf1=^A@\r, kf2=^AA\r,
kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r,
kf8=^AG\r, kf9=^AH\r, khome=^^, kich1=\EQ, kil1=\EE, knp=\EJ,
- nel=^M^J, pulse=\EK, rmacs=\E%, rmir=, rmso=\EG0, rmul=\EG0,
+ nel=^M^J, pulse=\EK, rmacs=\E%%, rmir=, rmso=\EG0, rmul=\EG0,
sgr0=\EG0, smacs=\E$, smir=, smso=\EG4, smul=\EG8, tsl=\Ef,
#### Microdata/MDIS
@@ -12511,7 +12710,7 @@ ergo4000|microterm ergo 4000,
bel=^G, clear=\E[H\E[2J$<80>, cr=^M, cub1=^H, cud1=\E[B,
cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
dch1=\E[1P$<80>, dl1=\E[1M$<5*>, ed=\E[0J$<15>,
- el=\E[0K$<13>, ht=^I, il=\E[1L$<5*>, ind=\ED$<20*>,
+ el=\E[0K$<13>, ht=^I, il1=\E[1L$<5*>, ind=\ED$<20*>,
is2=\E<\E=\E[?1l\E[?4l\E[?5l\E[?7h\E[?8h$<300>,
kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP,
kf2=\EOQ, kf3=\EOR, kf4=\EOS, lf1=pf1, lf2=pf2, lf3=pf3,
@@ -14051,7 +14250,7 @@ apple-videx3|vapple|Apple II with 80 col card,
clear=\Ev, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
cuu1=\EA, el=\Ex, home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
kcuu1=\EA, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!,
- kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%, kf9=\E&, khome=\EH,
+ kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH,
#From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL
aepro|Apple II+ running ASCII Express Pro--vt52,
OTbs,
@@ -14277,6 +14476,34 @@ amiga-8bit|Amiga ANSI using 8-bit controls,
acsc=, dl=\233%p1%dM, dl1=\233M, il=\233%p1%dL, il1=\233L,
ind=\204, indn@, ri=\215, rin@, use=amiga-h,
+# From: Ruediger Kuhlmann <terminfo@ruediger-kuhlmann.de>, 18 Jul 2000
+# requires use of appropriate preferences settings.
+amiga-vnc|Amiga using VNC console (black on light gray),
+ am, da, db, msgr, ndscr,
+ btns#1, colors#16, cols#80, lines#24, lm#0, ncv#0, pairs#256,
+ bel=^G, blink=\E[7;2m, bold=\E[1m, civis=\E[0p,
+ clear=\E[H\E[J, cnorm=\E[p\E[>?6l, cr=^M,
+ csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
+ cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
+ cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+ cvvis=\E[>?6h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
+ dl=\E[%p1%dM, dl1=\E[1M, ed=\E[J, el=\E[K, flash=^G,
+ ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[1L, ind=\ED,
+ indn=\E[%p1%dS, invis=\E8m,
+ is2=\E[>?2;18l\E[>?26;?6;20;>?15;?7;>?22;>?8h,
+ kbs=^H, kcbt=\233Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
+ kcuu1=\E[A, kdch1=\177, kf0=\E[9~, kf1=\E[0~, kf2=\E[1~,
+ kf3=\E[2~, kf4=\E[3~, kf5=\E[4~, kf6=\E[5~, kf7=\E[6~,
+ kf8=\E[7~, kf9=\E[8~, khlp=\E[?~, khome=\E[44~, kll=\E[45~,
+ kmous=\E[M, knp=\E[42~, kpp=\E[41~, nel=\EE, oc=\E[0m,
+ rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmcup=\E[?7h\E[r\E[J,
+ rmkx=\E[?1l, rmso=\E[21m, rmul=\E[24m, rs1=\Ec,
+ rs2=\E[>?2;18l\E[>?26;?6;20;>?15;?7;>?22;>?8h,
+ setab=\E[%?%p1%{8}%>%t%'F'%p1%+%d%e4%p1%d%;m,
+ setaf=\E[%?%p1%{8}%>%t%'2'%p1%+%d%e3%p1%d%;m,
+ sgr0=\E[0m\017\E[30;85;>15m, smcup=\E[?7h, smkx=\E[?1h,
+ smso=\E[1m, smul=\E[4m,
+
# Commodore B-128 microcomputer from Doug Tyrol <det@HEL-ACE.ARPA>
# I'm trying to write a termcap for a commodore b-128, and I'm
# having a little trouble. I've had to map most of my control characters
@@ -14515,15 +14742,15 @@ m2-nam|minitel|minitel-2|minitel-2-nam|France Telecom Minitel 2 mode te'le'infor
cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, flash=^G, fsl=^J,
- home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=^J,
- ip=$<7/>, is1=\E\:1}\Ec\E[?4l\E[12h, is2=\Ec\E[12h\E)0,
+ home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=^J, ip=$<7/>,
+ is1=\E\:1}\Ec\E[?4l\E[12h, is2=\Ec\E[12h\E)0,
is3=\E[?3l kbs=\010, kclr=\E[2J, kcub1=\E[D, kcud1=\E[B,
kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M, kf0=\EOp,
kf1=\EOq, kf10=\EOp, kf2=\EOr, kf3=\EOs, kf4=\EOt, kf5=\EOu,
kf6=\EOv, kf7=\EOw, kf8=\EOx, kf9=\EOy, khome=\E[H,
kich1=\E[4h, kil1=\E[4l, knp=\EOn, kpp=\EOR, ll=\E[24;80H,
- mc0=\E[i, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rin=\EM,
- rmacs=^O, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m,
+ mc0=\E[i, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rmacs=^O,
+ rmir=\E[4l, rmso=\E[27m, rmul=\E[24m,
rs1=\Ec\E[?4l\E[12h, rs2=\Ec\E)0, sc=\E7, sgr0=\E[m,
smacs=^N, smir=\E[4h, smso=\E[7m, smul=\E[4m, tsl=^_@A,
u6=\E[%i%d;%dR, u7=\E[6n,
@@ -15892,8 +16119,8 @@ mt70|mt-70|Morrow MD-70; native Morrow mode,
kf17=^Af\r, kf18=^Ag\r, kf19=^Ah\r, kf2=^AA\r, kf20=^Ai\r,
kf3=^AB\r, kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r,
kf8=^AG\r, kf9=^AH\r, khlp=^AO\r, khome=^AN\r, nel=^_,
- rmacs=\E%, rmcup=, smacs=\E$, smcup=\E"2\EG0\E], smul=\EG1,
- tbc=\E0, use=adm+sgr,
+ rmacs=\E%%, rmcup=, smacs=\E$, smcup=\E"2\EG0\E],
+ smul=\EG1, tbc=\E0, use=adm+sgr,
#### Motorola
#
@@ -16891,7 +17118,7 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys,
sgr0=\E(\EH\003\EG0\EcD, smacs=\EH^B, smam=\Ed/,
smcup=\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177,
smir=\Eq, smln=\EA10, smxon=\Ec21, tbc=\E0, tsl=\Ez(,
- uc=\EG8%p1%c\EG0, use=adm+sgr,
+ uc=\EG8\EG0, use=adm+sgr,
teletec|Teletec Datascreen,
OTbs, am,
cols#80, lines#24,
@@ -18346,6 +18573,30 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# 2000/7/1
# * add Eterm (Michael Jennings)
#
+# 2000-07-18
+# * add amiga-vnc entry.
+#
+# 2000-08-12
+# * correct description of Top Gun Telnet.
+# * add kterm-color
+#
+# 2000-08-26
+# * add qansi* entries from QNX ftp site.
+#
+# 2000-09-16
+# * add Matrix Orbital entries by Eric Z. Ayers).
+# * add xterm-basic, xterm-sco entries, update related entries to XFree86
+# 4.0.1c -TD
+#
+# 2000-09-17
+# * add S0, E0 extensions to screen's entry -TD
+#
+# 2000-09-23
+# * several corrections based on tic's new parameter-checking code -TD
+# * modify xterm-r6 and similar rs2 sequences which had \E7...\E8
+# bracketing sequences that reset video attributes (\E8 would restore
+# them) -TD
+#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"
diff --git a/contrib/ncurses/mk-1st.awk b/contrib/ncurses/mk-1st.awk
index 74f95b6eabe8..92c51d7b4f7e 100644
--- a/contrib/ncurses/mk-1st.awk
+++ b/contrib/ncurses/mk-1st.awk
@@ -1,6 +1,6 @@
-# $Id: mk-1st.awk,v 1.40 2000/04/01 20:50:29 tom Exp $
+# $Id: mk-1st.awk,v 1.45 2000/08/19 19:13:19 tom Exp $
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -27,7 +27,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,2000
#
# Generate list of objects for a given model library
# Variables:
@@ -39,6 +39,7 @@
# depend (optional dependencies for all objects, e.g, ncurses_cfg.h)
# subset ("none", "base", "base+ext_funcs" or "termlib")
# target (cross-compile target, if any)
+# ShlibVer ("rel", "abi" or "auto", to augment DoLinks variable)
# DoLinks ("yes", "reverse" or "no", flag to add symbolic links)
# rmSoLocs ("yes" or "no", flag to add extra clean target)
# overwrite ("yes" or "no", flag to add link to libcurses.a
@@ -50,43 +51,50 @@
#
function symlink(src,dst) {
if ( src != dst ) {
- if ( DoLinks == "reverse" ) {
- printf "rm -f %s; ", src
- printf "$(LN_S) %s %s; ", dst, src
- } else {
- printf "rm -f %s; ", dst
- printf "$(LN_S) %s %s; ", src, dst
- }
+ printf "rm -f %s; ", dst
+ printf "$(LN_S) %s %s; ", src, dst
}
}
-function sharedlinks(directory, add) {
- if ( end_name != lib_name ) {
- if ( DoLinks == "yes" ) {
- abi_name = sprintf("%s.$(ABI_VERSION)", lib_name);
- } else {
- abi_name = end_name;
- }
- if (add) {
- printf "\tcd %s && (", directory
- if ( abi_name != end_name ) {
- symlink(end_name, abi_name);
+function rmlink(directory, dst) {
+ printf "\t-rm -f %s/%s\n", directory, dst
+}
+function removelinks(directory) {
+ rmlink(directory, end_name);
+ if ( DoLinks == "reverse" ) {
+ if ( ShlibVer == "rel" ) {
+ rmlink(directory, abi_name);
+ rmlink(directory, rel_name);
+ } else if ( ShlibVer == "abi" ) {
+ rmlink(directory, abi_name);
}
- symlink(abi_name, lib_name);
- printf ")\n"
- } else {
- if ( abi_name != end_name ) {
- printf "\t-@rm -f %s/%s\n", directory, abi_name
+ } else {
+ if ( ShlibVer == "rel" ) {
+ rmlink(directory, abi_name);
+ rmlink(directory, lib_name);
+ } else if ( ShlibVer == "abi" ) {
+ rmlink(directory, lib_name);
}
- printf "\t-@rm -f %s/%s\n", directory, lib_name
- }
}
}
-function removelinks() {
- if ( end_name != lib_name ) {
- if ( abi_name != end_name ) {
- printf "\t-rm -f ../lib/%s\n", abi_name
+function sharedlinks(directory) {
+ if ( ShlibVer != "auto" ) {
+ printf "\tcd %s && (", directory
+ if ( DoLinks == "reverse" ) {
+ if ( ShlibVer == "rel" ) {
+ symlink(lib_name, abi_name);
+ symlink(abi_name, rel_name);
+ } else if ( ShlibVer == "abi" ) {
+ symlink(lib_name, abi_name);
+ }
+ } else {
+ if ( ShlibVer == "rel" ) {
+ symlink(rel_name, abi_name);
+ symlink(abi_name, lib_name);
+ } else if ( ShlibVer == "abi" ) {
+ symlink(abi_name, lib_name);
+ }
}
- printf "\t-rm -f ../lib/%s\n", end_name
+ printf ")\n"
}
}
BEGIN {
@@ -151,60 +159,54 @@ END {
lib_name = sprintf("%s%s%s", prefix, name, suffix)
if ( MODEL == "SHARED" )
{
- if ( DoLinks == "yes" ) {
- end_name = sprintf("%s.$(REL_VERSION)", lib_name);
- } else if ( DoLinks == "reverse") {
- tmp_name = sprintf("%s.$(ABI_VERSION)", lib_name);
+ abi_name = sprintf("%s.$(ABI_VERSION)", lib_name);
+ rel_name = sprintf("%s.$(REL_VERSION)", lib_name);
+ if ( DoLinks == "reverse") {
end_name = lib_name;
- lib_name = tmp_name;
} else {
- end_name = lib_name;
+ if ( ShlibVer == "rel" ) {
+ end_name = rel_name;
+ } else if ( ShlibVer == "abi" ) {
+ end_name = abi_name;
+ } else {
+ end_name = lib_name;
+ }
}
- printf "../lib/%s : $(%s_OBJS)\n", lib_name, OBJS
+ printf "../lib/%s : $(%s_OBJS)\n", end_name, OBJS
print "\t-@rm -f $@"
if ( subset == "termlib") {
printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(TINFO_LIST)\n", OBJS
} else {
printf "\t$(MK_SHARED_LIB) $(%s_OBJS) $(SHLIB_LIST)\n", OBJS
}
- sharedlinks("../lib", 1)
- print ""
- if ( end_name != lib_name ) {
- printf "../lib/%s : ../lib/%s\n", end_name, lib_name
- }
+ sharedlinks("../lib")
print ""
print "install \\"
print "install.libs \\"
- printf "install.%s :: $(INSTALL_PREFIX)$(libdir) ../lib/%s\n", name, end_name
- printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, end_name
- if ( DoLinks == "reverse") {
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name
- printf "\t$(INSTALL_LIB) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name
- } else {
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", end_name
- printf "\t$(INSTALL_LIB) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, end_name
- }
- sharedlinks("$(INSTALL_PREFIX)$(libdir)", 1)
+ printf "install.%s :: $(DESTDIR)$(libdir) ../lib/%s\n", name, end_name
+ printf "\t@echo installing ../lib/%s as $(DESTDIR)$(libdir)/%s\n", end_name, end_name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", end_name
+ printf "\t$(INSTALL_LIB) ../lib/%s $(DESTDIR)$(libdir)/%s\n", end_name, end_name
+ sharedlinks("$(DESTDIR)$(libdir)")
if ( overwrite == "yes" && name == "ncurses" )
{
ovr_name = sprintf("libcurses%s", suffix)
- printf "\t@echo linking %s to %s\n", lib_name, ovr_name
- printf "\tcd $(INSTALL_PREFIX)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, lib_name, ovr_name
+ printf "\t@echo linking %s to %s\n", end_name, ovr_name
+ printf "\tcd $(DESTDIR)$(libdir) && (rm -f %s; $(LN_S) %s %s; )\n", ovr_name, end_name, ovr_name
}
if ( ldconfig != "" ) {
- printf "\t- test -z \"$(INSTALL_PREFIX)\" && %s\n", ldconfig
+ printf "\t- test -z \"$(DESTDIR)\" && %s\n", ldconfig
}
print ""
print "uninstall \\"
print "uninstall.libs \\"
printf "uninstall.%s ::\n", name
- printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s \n", end_name
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", end_name
- sharedlinks("$(INSTALL_PREFIX)$(libdir)", 0)
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", end_name
+ removelinks("$(DESTDIR)$(libdir)")
if ( overwrite == "yes" && name == "ncurses" )
{
ovr_name = sprintf("libcurses%s", suffix)
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s \n", ovr_name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", ovr_name
}
if ( rmSoLocs == "yes" ) {
print ""
@@ -226,47 +228,44 @@ END {
print ""
print "install \\"
print "install.libs \\"
- printf "install.%s :: $(INSTALL_PREFIX)$(libdir) ../lib/%s\n", name, lib_name
- printf "\t@echo installing ../lib/%s as $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name
- printf "\t$(INSTALL_DATA) ../lib/%s $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name, lib_name
+ printf "install.%s :: $(DESTDIR)$(libdir) ../lib/%s\n", name, lib_name
+ printf "\t@echo installing ../lib/%s as $(DESTDIR)$(libdir)/%s\n", lib_name, lib_name
+ printf "\t$(INSTALL_DATA) ../lib/%s $(DESTDIR)$(libdir)/%s\n", lib_name, lib_name
if ( overwrite == "yes" && lib_name == "libncurses.a" )
{
- printf "\t@echo linking libcurses.a to libncurses.a \n"
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a \n"
- printf "\t(cd $(INSTALL_PREFIX)$(libdir) && $(LN_S) libncurses.a libcurses.a)\n"
+ printf "\t@echo linking libcurses.a to libncurses.a\n"
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/libcurses.a\n"
+ printf "\t(cd $(DESTDIR)$(libdir) && $(LN_S) libncurses.a libcurses.a)\n"
}
- printf "\t$(RANLIB) $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name
+ printf "\t$(RANLIB) $(DESTDIR)$(libdir)/%s\n", lib_name
if ( target == "vxworks" )
{
- printf "\t@echo installing ../lib/lib%s.o as $(INSTALL_PREFIX)$(libdir)/lib%s.o\n", name, name
- printf "\t$(INSTALL_DATA) ../lib/lib%s.o $(INSTALL_PREFIX)$(libdir)/lib%s.o\n", name, name
+ printf "\t@echo installing ../lib/lib%s.o as $(DESTDIR)$(libdir)/lib%s.o\n", name, name
+ printf "\t$(INSTALL_DATA) ../lib/lib%s.o $(DESTDIR)$(libdir)/lib%s.o\n", name, name
}
print ""
print "uninstall \\"
print "uninstall.libs \\"
printf "uninstall.%s ::\n", name
- printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/%s \n", lib_name
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/%s\n", lib_name
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/%s\n", lib_name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/%s\n", lib_name
if ( overwrite == "yes" && lib_name == "libncurses.a" )
{
- printf "\t@echo linking libcurses.a to libncurses.a \n"
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/libcurses.a \n"
+ printf "\t@echo linking libcurses.a to libncurses.a\n"
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/libcurses.a\n"
}
if ( target == "vxworks" )
{
- printf "\t@echo uninstalling $(INSTALL_PREFIX)$(libdir)/lib%s.o\n", name
- printf "\t-@rm -f $(INSTALL_PREFIX)$(libdir)/lib%s.o\n", name
+ printf "\t@echo uninstalling $(DESTDIR)$(libdir)/lib%s.o\n", name
+ printf "\t-@rm -f $(DESTDIR)$(libdir)/lib%s.o\n", name
}
}
print ""
print "clean ::"
- printf "\t-rm -f ../lib/%s\n", lib_name
+ removelinks("../lib");
print ""
print "mostlyclean::"
printf "\t-rm -f $(%s_OBJS)\n", OBJS
- print ""
- print "clean ::"
- removelinks();
}
else if ( found == 2 )
{
diff --git a/contrib/ncurses/ncurses/Makefile.in b/contrib/ncurses/ncurses/Makefile.in
index 41b66f69732b..10b3ca5d87d6 100644
--- a/contrib/ncurses/ncurses/Makefile.in
+++ b/contrib/ncurses/ncurses/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.66 2000/05/28 01:39:56 tom Exp $
+# $Id: Makefile.in,v 1.69 2000/08/26 21:51:30 tom Exp $
##############################################################################
# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. #
# #
@@ -54,7 +54,7 @@ CF_MFLAGS = @cf_cv_makeflags@
@SET_MAKE@
MODEL = @DFT_LWR_MODEL@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -62,8 +62,6 @@ libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
-ticdir = $(datadir)/terminfo
-
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
INSTALL_DATA = @INSTALL_DATA@
@@ -80,7 +78,7 @@ CFLAGS = @CFLAGS@
INCDIR = $(srcdir)/../include
CPPFLAGS = -I../ncurses -I$(srcdir) @CPPFLAGS@ \
- -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
+ -DHAVE_CONFIG_H
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
@@ -150,7 +148,7 @@ libs :: $(AUTO_SRC) ../lib $(LIBRARIES)
sources: $(AUTO_SRC)
-$(INSTALL_PREFIX)$(libdir) :
+$(DESTDIR)$(libdir) :
$(srcdir)/../mkinstalldirs $@
../lib : ; mkdir $@
@@ -202,8 +200,8 @@ make_hash$x : \
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/ncurses/base/MKlib_gen.sh b/contrib/ncurses/ncurses/base/MKlib_gen.sh
index 0a29c6085f62..337794007035 100755
--- a/contrib/ncurses/ncurses/base/MKlib_gen.sh
+++ b/contrib/ncurses/ncurses/base/MKlib_gen.sh
@@ -2,7 +2,7 @@
#
# MKlib_gen.sh -- generate sources from curses.h macro definitions
#
-# ($Id: MKlib_gen.sh,v 1.11 1998/01/17 14:16:52 Juan.Jose.Garcia.Ripoll Exp $)
+# ($Id: MKlib_gen.sh,v 1.12 2000/07/29 16:30:11 tom Exp $)
#
# The XSI Curses standard requires all curses entry points to exist as
# functions, even though many definitions would normally be shadowed
@@ -113,6 +113,11 @@ BEGIN {
print "\n"
skip=1;
+ if ( $1 == "chtype" ) {
+ returnType = "Char";
+ } else {
+ returnType = "Code";
+ }
print "M_" $2
print $0;
print "{";
@@ -200,7 +205,7 @@ BEGIN {
if (match($0, "^void"))
call = ""
else if (dotrace)
- call = "returnCode( ";
+ call = sprintf("return%s( ", returnType);
else
call = "%%return ";
diff --git a/contrib/ncurses/ncurses/base/lib_addstr.c b/contrib/ncurses/ncurses/base/lib_addstr.c
index 0a72165910f3..59a3bae81c8c 100644
--- a/contrib/ncurses/ncurses/base/lib_addstr.c
+++ b/contrib/ncurses/ncurses/base/lib_addstr.c
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_addstr.c,v 1.17 2000/04/29 21:15:55 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.18 2000/07/29 16:42:41 tom Exp $")
int
waddnstr(WINDOW *win, const char *const astr, int n)
@@ -51,7 +51,7 @@ waddnstr(WINDOW *win, const char *const astr, int n)
T((T_CALLED("waddnstr(%p,%s,%d)"), win, _nc_visbuf(astr), n));
if (win && (str != 0)) {
- T(("... current %s", _traceattr(win->_attrs)));
+ TR(TRACE_VIRTPUT | TRACE_ATTRS, ("... current %s", _traceattr(win->_attrs)));
TR(TRACE_VIRTPUT, ("str is not null"));
code = OK;
if (n < 0)
diff --git a/contrib/ncurses/ncurses/base/lib_color.c b/contrib/ncurses/ncurses/base/lib_color.c
index 71bee42487cd..492194babbfb 100644
--- a/contrib/ncurses/ncurses/base/lib_color.c
+++ b/contrib/ncurses/ncurses/base/lib_color.c
@@ -41,7 +41,7 @@
#include <term.h>
#include <tic.h>
-MODULE_ID("$Id: lib_color.c,v 1.51 2000/05/20 20:09:22 tom Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.53 2000/09/02 18:02:15 tom Exp $")
/*
* These should be screen structure members. They need to be globals for
@@ -85,7 +85,7 @@ static const color_t hls_palette[] =
};
/* *INDENT-ON* */
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
/*
* These are called from _nc_do_color(), which in turn is called from
* vidattr - so we have to assume that SP may be null.
@@ -265,7 +265,7 @@ init_pair(short pair, short f, short b)
if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (SP->_default_color) {
if (f < 0)
f = C_MASK;
@@ -438,7 +438,7 @@ _nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int))
pair_content(old_pair, &old_fg, &old_bg);
if ((fg == C_MASK && old_fg != C_MASK)
|| (bg == C_MASK && old_bg != C_MASK)) {
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
/*
* A minor optimization - but extension. If "AX" is specified in
* the terminal description, treat it as screen's indicator of ECMA
@@ -458,7 +458,7 @@ _nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int))
return;
}
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (fg == C_MASK)
fg = default_fg();
if (bg == C_MASK)
@@ -471,7 +471,7 @@ _nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int))
bg = xx;
}
- T(("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg));
+ TR(TRACE_ATTRS, ("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg));
if (fg != C_MASK) {
set_foreground_color(fg, outc);
diff --git a/contrib/ncurses/ncurses/base/lib_colorset.c b/contrib/ncurses/ncurses/base/lib_colorset.c
index d9fc5c28dc01..3870e875f322 100644
--- a/contrib/ncurses/ncurses/base/lib_colorset.c
+++ b/contrib/ncurses/ncurses/base/lib_colorset.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,17 +40,19 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_colorset.c,v 1.5 1999/05/16 17:13:43 juergen Exp $")
+MODULE_ID("$Id: lib_colorset.c,v 1.6 2000/07/29 16:37:19 tom Exp $")
-int wcolor_set(WINDOW *win, short color_pair_number, void *opts)
+int
+wcolor_set(WINDOW *win, short color_pair_number, void *opts)
{
- T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
- if (win && !opts && (color_pair_number >= 0) && (color_pair_number < COLOR_PAIRS)) {
- T(("... current %ld", (long) PAIR_NUMBER(win->_attrs)));
- toggle_attr_on(win->_attrs,COLOR_PAIR(color_pair_number));
- returnCode(OK);
- } else
- returnCode(ERR);
+ T((T_CALLED("wcolor_set(%p,%d)"), win, color_pair_number));
+ if (win
+ && !opts
+ && (color_pair_number >= 0)
+ && (color_pair_number < COLOR_PAIRS)) {
+ TR(TRACE_ATTRS, ("... current %ld", (long) PAIR_NUMBER(win->_attrs)));
+ toggle_attr_on(win->_attrs, COLOR_PAIR(color_pair_number));
+ returnCode(OK);
+ } else
+ returnCode(ERR);
}
-
-
diff --git a/contrib/ncurses/ncurses/base/lib_dft_fgbg.c b/contrib/ncurses/ncurses/base/lib_dft_fgbg.c
index 19d75477b140..7c090244f291 100644
--- a/contrib/ncurses/ncurses/base/lib_dft_fgbg.c
+++ b/contrib/ncurses/ncurses/base/lib_dft_fgbg.c
@@ -33,7 +33,7 @@
#include <curses.priv.h>
#include <term.h>
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.11 2000/05/07 01:26:06 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.13 2000/07/07 16:50:27 tom Exp $")
/*
* Modify the behavior of color-pair 0 so that the library doesn't assume that
@@ -61,7 +61,7 @@ assume_default_colors(int fg, int bg)
if (initialize_pair) /* don't know how to handle this */
returnCode(ERR);
- SP->_default_color = (fg != COLOR_WHITE) || (bg != COLOR_BLACK);
+ SP->_default_color = (fg < 0 || fg == C_MASK) || (bg < 0 || bg == C_MASK);
SP->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
SP->_default_fg = (fg >= 0) ? (fg & C_MASK) : C_MASK;
SP->_default_bg = (bg >= 0) ? (bg & C_MASK) : C_MASK;
diff --git a/contrib/ncurses/ncurses/base/lib_getch.c b/contrib/ncurses/ncurses/base/lib_getch.c
index 7ab4b5085c75..f67bf9a35f77 100644
--- a/contrib/ncurses/ncurses/base/lib_getch.c
+++ b/contrib/ncurses/ncurses/base/lib_getch.c
@@ -40,56 +40,17 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_getch.c,v 1.47 2000/05/28 01:12:51 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.50 2000/10/09 23:53:57 Ilya.Zakharevich Exp $")
#include <fifo_defs.h>
int ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
-#ifdef USE_EMX_MOUSE
-# include <sys/select.h>
-static int
-kbd_mouse_read(unsigned char *p)
-{
- fd_set fdset;
- int nums = SP->_ifd + 1;
-
- for (;;) {
- FD_ZERO(&fdset);
- FD_SET(SP->_ifd, &fdset);
- if (SP->_checkfd >= 0) {
- FD_SET(SP->_checkfd, &fdset);
- if (SP->_checkfd >= nums)
- nums = SP->_checkfd + 1;
- }
- if (SP->_mouse_fd >= 0) {
- FD_SET(SP->_mouse_fd, &fdset);
- if (SP->_mouse_fd >= nums)
- nums = SP->_mouse_fd + 1;
- }
- if (select(nums, &fdset, NULL, NULL, NULL) >= 0) {
- int n;
-
- if (SP->_mouse_fd >= 0
- && FD_ISSET(SP->_mouse_fd, &fdset)) { /* Prefer mouse */
- n = read(SP->_mouse_fd, p, 1);
- } else {
- n = read(SP->_ifd, p, 1);
- }
- return n;
- }
- if (errno != EINTR) {
- return -1;
- }
- }
-}
-#endif /* USE_EMX_MOUSE */
-
static inline int
fifo_peek(void)
{
int ch = SP->_fifo[peek];
- T(("peeking at %d", peek));
+ TR(TRACE_IEVENT, ("peeking at %d", peek));
p_inc();
return ch;
@@ -100,7 +61,7 @@ fifo_pull(void)
{
int ch;
ch = SP->_fifo[head];
- T(("pulling %d from %d", ch, head));
+ TR(TRACE_IEVENT, ("pulling %d from %d", ch, head));
if (peek == head) {
h_inc();
@@ -129,7 +90,7 @@ fifo_push(void)
errno = 0;
#endif
-#if USE_GPM_SUPPORT
+#if USE_GPM_SUPPORT || defined(USE_EMX_MOUSE)
if ((SP->_mouse_fd >= 0)
&& (_nc_timed_wait(3, -1, (int *) 0) & 2)) {
SP->_mouse_event(SP);
@@ -139,11 +100,7 @@ fifo_push(void)
#endif
{
unsigned char c2 = 0;
-#ifdef USE_EMX_MOUSE
- n = kbd_mouse_read(&c2);
-#else
n = read(SP->_ifd, &c2, 1);
-#endif
ch = c2 & 0xff;
}
@@ -162,17 +119,17 @@ fifo_push(void)
#endif
if ((n == -1) || (n == 0)) {
- T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno));
- return ERR;
+ TR(TRACE_IEVENT, ("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno));
+ ch = ERR;
}
- T(("read %d characters", n));
+ TR(TRACE_IEVENT, ("read %d characters", n));
SP->_fifo[tail] = ch;
SP->_fifohold = 0;
if (head == -1)
head = peek = tail;
t_inc();
- T(("pushed %#x at %d", ch, tail));
+ TR(TRACE_IEVENT, ("pushed %#x at %d", ch, tail));
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT)
_nc_fifo_dump();
@@ -223,7 +180,7 @@ wgetch(WINDOW *win)
if (head == -1 && !SP->_raw && !SP->_cbreak) {
char buf[MAXCOLUMNS], *sp;
- T(("filling queue in cooked mode"));
+ TR(TRACE_IEVENT, ("filling queue in cooked mode"));
wgetnstr(win, buf, MAXCOLUMNS);
@@ -241,13 +198,13 @@ wgetch(WINDOW *win)
if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1)) {
int delay;
- T(("timed delay in wgetch()"));
+ TR(TRACE_IEVENT, ("timed delay in wgetch()"));
if (SP->_cbreak > 1)
delay = (SP->_cbreak - 1) * 100;
else
delay = win->_delay;
- T(("delay is %d milliseconds", delay));
+ TR(TRACE_IEVENT, ("delay is %d milliseconds", delay));
if (head == -1) /* fifo is empty */
if (!_nc_timed_wait(3, delay, (int *) 0))
diff --git a/contrib/ncurses/ncurses/base/lib_hline.c b/contrib/ncurses/ncurses/base/lib_hline.c
index 71d6b140424c..fd32d35a38e7 100644
--- a/contrib/ncurses/ncurses/base/lib_hline.c
+++ b/contrib/ncurses/ncurses/base/lib_hline.c
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_hline.c,v 1.5 2000/04/29 21:14:30 tom Exp $")
+MODULE_ID("$Id: lib_hline.c,v 1.6 2000/07/04 14:08:09 Philippe.Blain Exp $")
int
whline(WINDOW *win, chtype ch, int n)
@@ -69,6 +69,8 @@ whline(WINDOW *win, chtype ch, int n)
line->text[end] = ch;
end--;
}
+
+ _nc_synchook(win);
code = OK;
}
returnCode(code);
diff --git a/contrib/ncurses/ncurses/base/lib_mouse.c b/contrib/ncurses/ncurses/base/lib_mouse.c
index 59db16d1aea6..3b8563503979 100644
--- a/contrib/ncurses/ncurses/base/lib_mouse.c
+++ b/contrib/ncurses/ncurses/base/lib_mouse.c
@@ -84,7 +84,7 @@
#endif
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.52 2000/06/29 23:02:26 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.55 2000/10/10 00:07:28 Ilya.Zakharevich Exp $")
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
@@ -130,8 +130,8 @@ _trace_slot(const char *tag)
for (ep = events; ep < events + EV_MAX; ep++)
_tracef("mouse event queue slot %ld = %s",
- (long) (ep - events),
- _tracemouse(ep));
+ (long) (ep - events),
+ _tracemouse(ep));
}
#endif
@@ -154,7 +154,7 @@ write_event(int down, int button, int x, int y)
char buf[6];
unsigned long ignore;
- strcpy(buf, key_mouse);
+ strncpy(buf, key_mouse, 3); /* should be "\033[M" */
buf[3] = ' ' + (button - 1) + (down ? 0 : 0x40);
buf[4] = ' ' + x - LEFT_COL + 1;
buf[5] = ' ' + y - TOP_ROW + 1;
@@ -169,20 +169,27 @@ mouse_server(unsigned long ignored GCC_UNUSED)
MOUEVENTINFO mouev;
HMOU hmou;
unsigned short mask = MOUSE_BN1_DOWN | MOUSE_BN2_DOWN | MOUSE_BN3_DOWN;
+ int nbuttons = 3;
int oldstate = 0;
- char errmess[] = "Unexpected termination of mouse thread\r\n";
- unsigned long ignore;
+ char err[80];
+ unsigned long rc;
/* open the handle for the mouse */
if (MouOpen(NULL, &hmou) == 0) {
-
- if (MouSetEventMask(&mask, hmou) == 0
- && MouDrawPtr(hmou) == 0) {
-
+ rc = MouSetEventMask(&mask, hmou);
+ if (rc) { /* retry with 2 buttons */
+ mask = MOUSE_BN1_DOWN | MOUSE_BN2_DOWN;
+ rc = MouSetEventMask(&mask, hmou);
+ nbuttons = 2;
+ }
+ if (rc == 0 && MouDrawPtr(hmou) == 0) {
for (;;) {
/* sit and wait on the event queue */
- if (MouReadEventQue(&mouev, &fWait, hmou))
+ rc = MouReadEventQue(&mouev, &fWait, hmou);
+ if (rc) {
+ sprintf(err, "Error reading mouse queue, rc=%lu.\r\n", rc);
break;
+ }
if (!mouse_activated)
goto finish;
@@ -195,24 +202,27 @@ mouse_server(unsigned long ignored GCC_UNUSED)
*/
if ((mouev.fs ^ oldstate) & MOUSE_BN1_DOWN)
write_event(mouev.fs & MOUSE_BN1_DOWN,
- mouse_buttons[1], mouev.col, mouev.row);
+ mouse_buttons[1], mouev.col, mouev.row);
if ((mouev.fs ^ oldstate) & MOUSE_BN2_DOWN)
write_event(mouev.fs & MOUSE_BN2_DOWN,
- mouse_buttons[3], mouev.col, mouev.row);
+ mouse_buttons[3], mouev.col, mouev.row);
if ((mouev.fs ^ oldstate) & MOUSE_BN3_DOWN)
write_event(mouev.fs & MOUSE_BN3_DOWN,
- mouse_buttons[2], mouev.col, mouev.row);
+ mouse_buttons[2], mouev.col, mouev.row);
finish:
oldstate = mouev.fs;
}
- }
+ } else
+ sprintf(err, "Error setting event mask, buttons=%d, rc=%lu.\r\n",
+ nbuttons, rc);
- DosWrite(2, errmess, strlen(errmess), &ignore);
+ DosWrite(2, err, strlen(err), &rc);
MouClose(hmou);
}
DosExit(EXIT_THREAD, 0L);
}
+
static void
server_state(const int state)
{ /* It would be nice to implement pointer-off and stop looping... */
@@ -248,8 +258,10 @@ initialize_mousetype(void)
&& strstr(cur_term->type.term_names, "xterm") == 0
&& key_mouse) {
int handles[2];
+
if (pipe(handles) < 0) {
perror("mouse pipe error");
+ return;
} else {
int rc;
@@ -270,9 +282,10 @@ initialize_mousetype(void)
setmode(handles[1], O_BINARY);
/* Do not use CRT functions, we may single-threaded. */
rc = DosCreateThread((unsigned long *) &mouse_thread,
- mouse_server, 0, 0, 8192);
+ mouse_server, 0, 0, 8192);
if (rc) {
printf("mouse thread error %d=%#x", rc, rc);
+ return;
} else {
mousetype = M_XTERM;
return;
@@ -359,6 +372,23 @@ _nc_mouse_event(SCREEN * sp GCC_UNUSED)
}
#endif
+#ifdef USE_EMX_MOUSE
+ if (SP->_mouse_fd >= 0
+ && (_nc_timed_wait(3, 0, (int *) 0) & 2) != 0) {
+ char kbuf[3];
+
+ int i, res = read(M_FD(sp), &kbuf, 3); /* Eat the prefix */
+ if (res != 3)
+ printf("Got %d chars instead of 3 for prefix.\n", res);
+ for (i = 0; i < res; i++) {
+ if (kbuf[i] != key_mouse[i])
+ printf("Got char %d instead of %d for prefix.\n",
+ (int) kbuf[i], (int) key_mouse[i]);
+ }
+ return TRUE;
+ }
+#endif /* USE_EMX_MOUSE */
+
/* xterm: never have to query, mouse events are in the keyboard stream */
return (FALSE); /* no event waiting */
}
@@ -419,7 +449,7 @@ _nc_mouse_inline(SCREEN * sp)
kbuf[3] = '\0';
TR(TRACE_IEVENT,
- ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf));
+ ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf));
eventp->id = 0; /* there's only one mouse... */
@@ -457,8 +487,8 @@ _nc_mouse_inline(SCREEN * sp)
*/
eventp->bstate =
(BUTTON1_RELEASED |
- BUTTON2_RELEASED |
- BUTTON3_RELEASED);
+ BUTTON2_RELEASED |
+ BUTTON3_RELEASED);
/*
* ...however, because there are no kinds of mouse events under
* xterm that can intervene between press and release, we can
@@ -488,9 +518,9 @@ _nc_mouse_inline(SCREEN * sp)
eventp->x = (kbuf[1] - ' ') - 1;
eventp->y = (kbuf[2] - ' ') - 1;
TR(MY_TRACE,
- ("_nc_mouse_inline: primitive mouse-event %s has slot %ld",
- _tracemouse(eventp),
- (long) (eventp - events)));
+ ("_nc_mouse_inline: primitive mouse-event %s has slot %ld",
+ _tracemouse(eventp),
+ (long) (eventp - events)));
/* bump the next-free pointer into the circular list */
eventp = NEXT(eventp);
@@ -514,7 +544,7 @@ mouse_activate(bool on)
switch (mousetype) {
case M_XTERM:
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
keyok(KEY_MOUSE, on);
#endif
TPUTS_TRACE("xterm mouse initialization");
@@ -598,9 +628,9 @@ _nc_mouse_parse(int runcount)
*/
if (runcount == 1) {
TR(MY_TRACE,
- ("_nc_mouse_parse: returning simple mouse event %s at slot %ld",
- _tracemouse(prev),
- (long) (prev - events)));
+ ("_nc_mouse_parse: returning simple mouse event %s at slot %ld",
+ _tracemouse(prev),
+ (long) (prev - events)));
return (prev->id >= 0)
? ((prev->bstate & eventmask) ? TRUE : FALSE)
: FALSE;
@@ -616,9 +646,9 @@ _nc_mouse_parse(int runcount)
if (_nc_tracing & TRACE_IEVENT) {
_trace_slot("before mouse press/release merge:");
_tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- (long) (runp - events),
- (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
- runcount);
+ (long) (runp - events),
+ (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
+ runcount);
}
#endif /* TRACE */
@@ -664,9 +694,9 @@ _nc_mouse_parse(int runcount)
if (_nc_tracing & TRACE_IEVENT) {
_trace_slot("before mouse click merge:");
_tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- (long) (runp - events),
- (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
- runcount);
+ (long) (runp - events),
+ (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
+ runcount);
}
#endif /* TRACE */
@@ -700,7 +730,7 @@ _nc_mouse_parse(int runcount)
/* merge click events forward */
if ((ep->bstate &
- (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))
+ (BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))
&& (follower->bstate &
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) {
if ((eventmask & BUTTON1_DOUBLE_CLICKED)
@@ -727,9 +757,9 @@ _nc_mouse_parse(int runcount)
/* merge double-click events forward */
if ((ep->bstate &
- (BUTTON1_DOUBLE_CLICKED
- | BUTTON2_DOUBLE_CLICKED
- | BUTTON3_DOUBLE_CLICKED))
+ (BUTTON1_DOUBLE_CLICKED
+ | BUTTON2_DOUBLE_CLICKED
+ | BUTTON3_DOUBLE_CLICKED))
&& (follower->bstate &
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) {
if ((eventmask & BUTTON1_TRIPLE_CLICKED)
@@ -761,9 +791,9 @@ _nc_mouse_parse(int runcount)
if (_nc_tracing & TRACE_IEVENT) {
_trace_slot("before mouse event queue compaction:");
_tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- (long) (runp - events),
- (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
- runcount);
+ (long) (runp - events),
+ (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
+ runcount);
}
#endif /* TRACE */
@@ -779,16 +809,16 @@ _nc_mouse_parse(int runcount)
if (_nc_tracing & TRACE_IEVENT) {
_trace_slot("after mouse event queue compaction:");
_tracef("_nc_mouse_parse: run starts at %ld, ends at %ld, count %d",
- (long) (runp - events),
- (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
- runcount);
+ (long) (runp - events),
+ (long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
+ runcount);
}
for (ep = runp; ep != eventp; ep = NEXT(ep))
if (ep->id != INVALID_EVENT)
TR(MY_TRACE,
- ("_nc_mouse_parse: returning composite mouse event %s at slot %ld",
- _tracemouse(ep),
- (long) (ep - events)));
+ ("_nc_mouse_parse: returning composite mouse event %s at slot %ld",
+ _tracemouse(ep),
+ (long) (ep - events)));
#endif /* TRACE */
/* after all this, do we have a valid event? */
@@ -847,8 +877,8 @@ getmouse(MEVENT * aevent)
*aevent = *prev;
TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld",
- _tracemouse(prev),
- (long) (prev - events)));
+ _tracemouse(prev),
+ (long) (prev - events)));
prev->id = INVALID_EVENT; /* so the queue slot becomes free */
returnCode(OK);
@@ -888,12 +918,12 @@ mousemask(mmask_t newmask, mmask_t * oldmask)
if (mousetype != M_NONE) {
eventmask = newmask &
(BUTTON_ALT | BUTTON_CTRL | BUTTON_SHIFT
- | BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON1_CLICKED
- | BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED
- | BUTTON2_PRESSED | BUTTON2_RELEASED | BUTTON2_CLICKED
- | BUTTON2_DOUBLE_CLICKED | BUTTON2_TRIPLE_CLICKED
- | BUTTON3_PRESSED | BUTTON3_RELEASED | BUTTON3_CLICKED
- | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED);
+ | BUTTON1_PRESSED | BUTTON1_RELEASED | BUTTON1_CLICKED
+ | BUTTON1_DOUBLE_CLICKED | BUTTON1_TRIPLE_CLICKED
+ | BUTTON2_PRESSED | BUTTON2_RELEASED | BUTTON2_CLICKED
+ | BUTTON2_DOUBLE_CLICKED | BUTTON2_TRIPLE_CLICKED
+ | BUTTON3_PRESSED | BUTTON3_RELEASED | BUTTON3_CLICKED
+ | BUTTON3_DOUBLE_CLICKED | BUTTON3_TRIPLE_CLICKED);
mouse_activate(eventmask != 0);
@@ -910,9 +940,9 @@ wenclose(const WINDOW *win, int y, int x)
if (win) {
y -= win->_yoffset;
return ((win->_begy <= y &&
- win->_begx <= x &&
- (win->_begx + win->_maxx) >= x &&
- (win->_begy + win->_maxy) >= y) ? TRUE : FALSE);
+ win->_begx <= x &&
+ (win->_begx + win->_maxx) >= x &&
+ (win->_begy + win->_maxy) >= y) ? TRUE : FALSE);
}
return FALSE;
}
diff --git a/contrib/ncurses/ncurses/base/lib_newterm.c b/contrib/ncurses/ncurses/base/lib_newterm.c
index 08e35cf50182..7da4069b5b85 100644
--- a/contrib/ncurses/ncurses/base/lib_newterm.c
+++ b/contrib/ncurses/ncurses/base/lib_newterm.c
@@ -40,14 +40,14 @@
#include <curses.priv.h>
-#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
#include <term.h> /* clear_screen, cup & friends, cur_term */
#include <tic.h>
-MODULE_ID("$Id: lib_newterm.c,v 1.46 2000/07/01 22:26:22 tom Exp $")
+MODULE_ID("$Id: lib_newterm.c,v 1.48 2000/09/02 18:11:42 tom Exp $")
#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
#define ONLCR 0
@@ -191,17 +191,21 @@ newterm(NCURSES_CONST char *name, FILE * ofp, FILE * ifp)
SP->_use_rmso = SGR0_TEST(exit_standout_mode);
SP->_use_rmul = SGR0_TEST(exit_underline_mode);
-#ifdef USE_WIDEC_SUPPORT
+#if USE_WIDEC_SUPPORT
/*
* XFree86 xterm can be configured to support UTF-8 based on environment
* variable settings.
*/
{
char *s;
- if (((s = getenv("LC_ALL")) != 0
- || (s = getenv("LC_CTYPE")) != 0
- || (s = getenv("LANG")) != 0)
- && strstr(s, "UTF-8") != 0) {
+ s = getenv("LC_ALL");
+ if (s == NULL || *s == '\0') {
+ s = getenv("LC_CTYPE");
+ if (s == NULL || *s == '\0') {
+ s = getenv("LANG");
+ }
+ }
+ if (s != NULL && *s != '\0' && strstr(s, "UTF-8") != NULL) {
SP->_outch = _nc_utf8_outch;
}
}
diff --git a/contrib/ncurses/ncurses/base/lib_restart.c b/contrib/ncurses/ncurses/base/lib_restart.c
index de0182f42691..831e3255d842 100644
--- a/contrib/ncurses/ncurses/base/lib_restart.c
+++ b/contrib/ncurses/ncurses/base/lib_restart.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,50 +41,51 @@
#include <curses.priv.h>
-#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
-#include <term.h> /* lines, columns, cur_term */
+#include <term.h> /* lines, columns, cur_term */
-MODULE_ID("$Id: lib_restart.c,v 1.2 1999/07/24 20:10:04 tom Exp $")
+MODULE_ID("$Id: lib_restart.c,v 1.3 2000/09/02 18:09:44 tom Exp $")
-int restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
+int
+restartterm(NCURSES_CONST char *termp, int filenum, int *errret)
{
-int saveecho = SP->_echo;
-int savecbreak = SP->_cbreak;
-int saveraw = SP->_raw;
-int savenl = SP->_nl;
+ int saveecho = SP->_echo;
+ int savecbreak = SP->_cbreak;
+ int saveraw = SP->_raw;
+ int savenl = SP->_nl;
- T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
+ T((T_CALLED("restartterm(%s,%d,%p)"), termp, filenum, errret));
- setupterm(termp, filenum, errret);
+ setupterm(termp, filenum, errret);
- if (saveecho)
- echo();
- else
- noecho();
+ if (saveecho)
+ echo();
+ else
+ noecho();
- if (savecbreak) {
- cbreak();
- noraw();
- } else if (saveraw) {
- nocbreak();
- raw();
- } else {
- nocbreak();
- noraw();
- }
- if (savenl)
- nl();
- else
- nonl();
+ if (savecbreak) {
+ cbreak();
+ noraw();
+ } else if (saveraw) {
+ nocbreak();
+ raw();
+ } else {
+ nocbreak();
+ noraw();
+ }
+ if (savenl)
+ nl();
+ else
+ nonl();
- reset_prog_mode();
+ reset_prog_mode();
#if USE_SIZECHANGE
- _nc_update_screensize();
+ _nc_update_screensize();
#endif
- returnCode(OK);
+ returnCode(OK);
}
diff --git a/contrib/ncurses/ncurses/base/lib_set_term.c b/contrib/ncurses/ncurses/base/lib_set_term.c
index b4d547fcf514..15dd6d3f505d 100644
--- a/contrib/ncurses/ncurses/base/lib_set_term.c
+++ b/contrib/ncurses/ncurses/base/lib_set_term.c
@@ -43,7 +43,7 @@
#include <term.h> /* cur_term */
#include <tic.h>
-MODULE_ID("$Id: lib_set_term.c,v 1.55 2000/07/02 00:22:18 tom Exp $")
+MODULE_ID("$Id: lib_set_term.c,v 1.58 2000/10/04 22:05:48 tom Exp $")
SCREEN *
set_term(SCREEN * screenp)
@@ -171,7 +171,7 @@ no_mouse_wrap(SCREEN * sp GCC_UNUSED)
{
}
-#if defined(NCURSES_EXT_FUNCS) && defined(USE_COLORFGBG)
+#if NCURSES_EXT_FUNCS && USE_COLORFGBG
static char *
extract_fgbg(char *src, int *result)
{
@@ -220,17 +220,45 @@ _nc_setupscreen(short slines, short const scolumns, FILE * output)
SP->_endwin = TRUE;
SP->_ofp = output;
SP->_cursor = -1; /* cannot know real cursor shape */
-#ifdef NCURSES_NO_PADDING
+
+#if NCURSES_NO_PADDING
SP->_no_padding = getenv("NCURSES_NO_PADDING") != 0;
TR(TRACE_CHARPUT | TRACE_MOVE, ("padding will%s be used",
SP->_no_padding ? " not" : ""));
#endif
-#ifdef NCURSES_EXT_FUNCS
+
+#if NCURSES_EXT_FUNCS
SP->_default_color = FALSE;
SP->_has_sgr_39_49 = FALSE;
+
+ /*
+ * Set our assumption of the terminal's default foreground and background
+ * colors. The curs_color man-page states that we can assume that the
+ * background is black. The origin of this assumption appears to be
+ * terminals that displayed colored text, but no colored backgrounds, e.g.,
+ * the first colored terminals around 1980. More recent ones with better
+ * technology can display not only colored backgrounds, but all
+ * combinations. So a terminal might be something other than "white" on
+ * black (green/black looks monochrome too), but black on white or even
+ * on ivory.
+ *
+ * White-on-black is the simplest thing to use for monochrome. Almost
+ * all applications that use color paint both text and background, so
+ * the distinction is moot. But a few do not - which is why we leave this
+ * configurable (a better solution is to use assume_default_colors() for
+ * the rare applications that do require that sort of appearance, since
+ * is appears that more users expect to be able to make a white-on-black
+ * or black-on-white display under control of the application than not).
+ */
+#ifdef USE_ASSUMED_COLOR
SP->_default_fg = COLOR_WHITE;
SP->_default_bg = COLOR_BLACK;
-#ifdef USE_COLORFGBG
+#else
+ SP->_default_fg = C_MASK;
+ SP->_default_bg = C_MASK;
+#endif
+
+#if USE_COLORFGBG
/*
* If rxvt's $COLORFGBG variable is set, use it to specify the assumed
* default colors. Note that rxvt (mis)uses bold colors, equating a bold
diff --git a/contrib/ncurses/ncurses/base/lib_winch.c b/contrib/ncurses/ncurses/base/lib_winch.c
index 119c731ebe3b..765220799a50 100644
--- a/contrib/ncurses/ncurses/base/lib_winch.c
+++ b/contrib/ncurses/ncurses/base/lib_winch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,14 +39,15 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_winch.c,v 1.1 1998/11/14 22:06:09 tom Exp $")
+MODULE_ID("$Id: lib_winch.c,v 1.2 2000/07/29 16:41:44 tom Exp $")
-chtype winch(WINDOW *win)
+chtype
+winch(WINDOW *win)
{
- T((T_CALLED("winch(%p)"), win));
- if (win != 0) {
- returnCode(win->_line[win->_cury].text[win->_curx]);
- } else {
- returnCode(0);
- }
+ T((T_CALLED("winch(%p)"), win));
+ if (win != 0) {
+ returnChar(win->_line[win->_cury].text[win->_curx]);
+ } else {
+ returnChar(0);
+ }
}
diff --git a/contrib/ncurses/ncurses/curses.priv.h b/contrib/ncurses/ncurses/curses.priv.h
index d3d5f296ef8b..d82e3aad752a 100644
--- a/contrib/ncurses/ncurses/curses.priv.h
+++ b/contrib/ncurses/ncurses/curses.priv.h
@@ -33,7 +33,7 @@
/*
- * $Id: curses.priv.h,v 1.162 2000/06/24 21:06:10 tom Exp $
+ * $Id: curses.priv.h,v 1.168 2000/10/08 01:24:59 tom Exp $
*
* curses.priv.h
*
@@ -99,7 +99,7 @@ extern int errno;
/* Some systems have a broken 'select()', but workable 'poll()'. Use that */
#if HAVE_WORKING_POLL
#define USE_FUNC_POLL 1
-#ifdef HAVE_POLL_H
+#if HAVE_POLL_H
#include <poll.h>
#else
#include <sys/poll.h>
@@ -134,7 +134,7 @@ extern int errno;
* If we don't have signals to support it, don't add a sigwinch handler.
* In any case, resizing is an extended feature. Use it if we've got it.
*/
-#ifndef NCURSES_EXT_FUNCS
+#if !NCURSES_EXT_FUNCS
#undef HAVE_SIZECHANGE
#endif
@@ -145,6 +145,17 @@ extern int errno;
#endif
/*
+ * If desired, one can configure this, disabling environment variables that
+ * point to custom terminfo/termcap locations.
+ */
+#ifdef USE_ROOT_ENVIRON
+#define use_terminfo_vars() 1
+#else
+#define use_terminfo_vars() _nc_env_access()
+extern int _nc_env_access(void);
+#endif
+
+/*
* Not all platforms have memmove; some have an equivalent bcopy. (Some may
* have neither).
*/
@@ -288,7 +299,7 @@ struct screen {
SLK *_slk; /* ptr to soft key struct / NULL */
int slk_format; /* selected format for this screen */
/* cursor movement costs; units are 10ths of milliseconds */
-#ifdef NCURSES_NO_PADDING
+#if NCURSES_NO_PADDING
int _no_padding; /* flag to set if padding disabled */
#endif
int _char_padding; /* cost of character put */
@@ -329,9 +340,7 @@ struct screen {
int _ip_cost; /* cost of (insert_padding) */
/* used in lib_mvcur.c */
char * _address_cursor;
- int _carriage_return_length;
- int _cursor_home_length;
- int _cursor_to_ll_length;
+ /* used in tty_update.c */
int _scrolling; /* 1 if terminal's smart enough to */
/* used in lib_color.c */
@@ -339,7 +348,7 @@ struct screen {
int _color_count; /* count of colors in palette */
unsigned short *_color_pairs; /* screen's color pair list */
int _pair_count; /* count of color pairs */
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
bool _default_color; /* use default colors */
bool _has_sgr_39_49; /* has ECMA default color support */
int _default_fg; /* assumed default foreground */
@@ -407,7 +416,7 @@ struct screen {
extern SCREEN *_nc_screen_chain;
-#ifdef NCURSES_NOMACROS
+#if NCURSES_NOMACROS
#include <nomacros.h>
#endif
@@ -530,12 +539,14 @@ typedef struct {
#define TPUTS_TRACE(s) _nc_tputs_trace = s;
#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
#define returnAttr(code) TRACE_RETURN(code,attr_t)
+#define returnChar(code) TRACE_RETURN(code,chtype)
#define returnCode(code) TRACE_RETURN(code,int)
#define returnPtr(code) TRACE_RETURN(code,ptr)
#define returnVoid T((T_RETURN(""))); return
#define returnWin(code) TRACE_RETURN(code,win)
extern WINDOW * _nc_retrace_win(WINDOW *);
extern attr_t _nc_retrace_attr_t(attr_t);
+extern attr_t _nc_retrace_chtype(chtype);
extern char *_nc_retrace_ptr(char *);
extern const char *_nc_tputs_trace;
extern int _nc_retrace_int(int);
@@ -546,6 +557,7 @@ extern void _nc_fifo_dump(void);
#define TR(n, a)
#define TPUTS_TRACE(s)
#define returnAttr(code) return code
+#define returnChar(code) return code
#define returnCode(code) return code
#define returnPtr(code) return code
#define returnVoid return
@@ -568,7 +580,7 @@ extern const char *_nc_visbuf2(int, const char *);
(S) = ((S) & ALL_BUT_COLOR) | (at);\
else\
(S) |= (at);\
- T(("new attribute is %s", _traceattr((S))));}
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
#define toggle_attr_off(S,at) {\
@@ -583,7 +595,7 @@ extern const char *_nc_visbuf2(int, const char *);
else /* leave color alone */\
(S) &= ~(at);\
}\
- T(("new attribute is %s", _traceattr((S))));}
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
#define DelCharCost(count) \
((parm_dch != 0) \
@@ -607,7 +619,8 @@ extern const char *_nc_visbuf2(int, const char *);
vidattr(AttrOf(c)); \
if (magic_cookie_glitch > 0 \
&& XMC_CHANGES((chg ^ SP->_current_attr))) { \
- T(("%s @%d before glitch %d,%d", \
+ TR(TRACE_ATTRS, \
+ ("%s @%d before glitch %d,%d", \
__FILE__, __LINE__, \
SP->_cursrow, \
SP->_curscol)); \
@@ -619,7 +632,7 @@ extern const char *_nc_visbuf2(int, const char *);
vidattr(AttrOf(c))
#endif
-#if defined(NCURSES_EXPANDED) && defined(NCURSES_EXT_FUNCS)
+#if NCURSES_EXPANDED && NCURSES_EXT_FUNCS
#undef toggle_attr_on
#define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at)
@@ -678,14 +691,40 @@ extern void _nc_screen_init(void);
extern void _nc_screen_resume(void);
extern void _nc_screen_wrap(void);
+/* lib_mouse.c */
+extern int _nc_has_mouse(void);
+
+/* lib_mvcur.c */
+#define INFINITY 1000000 /* cost: too high to use */
+
+typedef struct {
+ char *s_head;
+ char *s_tail;
+ size_t s_size;
+} string_desc;
+
+/* strings.c */
+extern string_desc *_nc_str_init(string_desc * dst, char *src, size_t len);
+extern string_desc *_nc_str_null(string_desc * dst, size_t len);
+extern string_desc *_nc_str_copy(string_desc * dst, string_desc * src);
+extern bool _nc_safe_strcat(string_desc * dst, const char *src);
+extern bool _nc_safe_strcpy(string_desc * dst, const char *src);
+
+extern void _nc_mvcur_init(void);
+extern void _nc_mvcur_resume(void);
+extern void _nc_mvcur_wrap(void);
+
+extern int _nc_scrolln(int, int, int, int);
+
+extern void _nc_screen_init(void);
+extern void _nc_screen_resume(void);
+extern void _nc_screen_wrap(void);
+
#if !HAVE_STRSTR
#define strstr _nc_strstr
extern char *_nc_strstr(const char *, const char *);
#endif
-/* lib_mouse.c */
-extern int _nc_has_mouse(void);
-
/* safe_sprintf.c */
extern char * _nc_printf_string(const char *fmt, va_list ap);
@@ -731,7 +770,7 @@ extern void _nc_trace_tries(struct tries *tree);
extern void _nc_update_screensize(void);
#endif
-#ifdef USE_WIDEC_SUPPORT
+#if USE_WIDEC_SUPPORT
extern int _nc_utf8_outch(int);
#endif
@@ -750,10 +789,6 @@ extern int *_nc_oldnums;
* On systems with a broken linker, define 'SP' as a function to force the
* linker to pull in the data-only module with 'SP'.
*/
-#ifndef BROKEN_LINKER
-#define BROKEN_LINKER 0
-#endif
-
#if BROKEN_LINKER
#define SP _nc_screen()
extern SCREEN *_nc_screen(void);
diff --git a/contrib/ncurses/ncurses/llib-lncurses b/contrib/ncurses/ncurses/llib-lncurses
index 4ea7899429f0..280325ace2c5 100644
--- a/contrib/ncurses/ncurses/llib-lncurses
+++ b/contrib/ncurses/ncurses/llib-lncurses
@@ -42,6 +42,10 @@ int *_nc_oldnums;
void _nc_scroll_optimize(void)
{ /* void */ }
+#undef _nc_linedump
+void _nc_linedump(void)
+ { /* void */ }
+
/* ./tty/hashmap.c */
#include <term.h>
@@ -247,6 +251,7 @@ int pair_content(
#undef _nc_do_color
void _nc_do_color(
+ int old_pair,
int pair,
bool reverse,
int (*outc)(
@@ -894,6 +899,18 @@ void timeout(
int z)
{ /* void */ }
+#undef touchline
+int touchline(
+ WINDOW *a1,
+ int a2,
+ int z)
+ { return(*(int *)0); }
+
+#undef touchwin
+int touchwin(
+ WINDOW *z)
+ { return(*(int *)0); }
+
#undef untouchwin
int untouchwin(
WINDOW *z)
@@ -1196,6 +1213,9 @@ int mvcur(
int xnew)
{ return(*(int *)0); }
+#undef _nc_optimize_enable
+int _nc_optimize_enable;
+
/* ./base/lib_mvwin.c */
#undef mvwin
@@ -1681,21 +1701,52 @@ int wtouchln(
/* ./trace/lib_traceatr.c */
-#undef _nc_lib_traceatr
-void _nc_lib_traceatr(void)
- { /* void */ }
+#undef _traceattr2
+char *_traceattr2(
+ int bufnum,
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _traceattr
+char *_traceattr(
+ attr_t newmode)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_attr_t
+attr_t _nc_retrace_attr_t(
+ attr_t code)
+ { return(*(attr_t *)0); }
+
+#undef _tracechtype2
+char *_tracechtype2(
+ int bufnum,
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _tracechtype
+char *_tracechtype(
+ chtype ch)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_chtype
+attr_t _nc_retrace_chtype(
+ attr_t code)
+ { return(*(attr_t *)0); }
/* ./trace/lib_tracedmp.c */
-#undef _nc_lib_tracedmp
-void _nc_lib_tracedmp(void)
+#undef _tracedump
+void _tracedump(
+ const char *name,
+ WINDOW *win)
{ /* void */ }
/* ./trace/lib_tracemse.c */
-#undef _nc_lib_tracemouse
-void _nc_lib_tracemouse(void)
- { /* void */ }
+#undef _tracemouse
+char *_tracemouse(
+ MEVENT const *ep)
+ { return(*(char **)0); }
/* ./tty/lib_tstp.c */
@@ -1709,6 +1760,10 @@ void _nc_signal_handler(
/* ./base/lib_ungetch.c */
+#undef _nc_fifo_dump
+void _nc_fifo_dump(void)
+ { /* void */ }
+
#undef ungetch
int ungetch(
int ch)
@@ -1823,6 +1878,7 @@ char *_nc_printf_string(
/* ./tty/tty_update.c */
#include <sys/time.h>
+#include <sys/times.h>
#undef doupdate
int doupdate(void)
@@ -1898,11 +1954,6 @@ void _nc_toggle_attr_off(
attr_t at)
{ /* void */ }
-#undef _nc_can_clear_with
-int _nc_can_clear_with(
- chtype ch)
- { return(*(int *)0); }
-
#undef _nc_DelCharCost
int _nc_DelCharCost(
int count)
@@ -2016,18 +2067,27 @@ int wresize(
/* ./tinfo/access.c */
+#undef _nc_basename
+char *_nc_basename(
+ char *path)
+ { return(*(char **)0); }
+
#undef _nc_access
int _nc_access(
const char *path,
int mode)
{ return(*(int *)0); }
+#undef _nc_env_access
+int _nc_env_access(void)
+ { return(*(int *)0); }
+
/* ./tinfo/add_tries.c */
#undef _nc_add_to_try
void _nc_add_to_try(
struct tries **tree,
- char *str,
+ const char *str,
unsigned short code)
{ /* void */ }
@@ -2221,7 +2281,8 @@ void _nc_read_entry_source(
{ /* void */ }
#undef _nc_resolve_uses
-int _nc_resolve_uses(void)
+int _nc_resolve_uses(
+ bool fullresolve)
{ return(*(int *)0); }
/* ./tinfo/comp_scan.c */
@@ -2236,6 +2297,10 @@ long _nc_comment_start;
long _nc_comment_end;
#undef _nc_start_line
long _nc_start_line;
+#undef _nc_curr_token
+struct token _nc_curr_token;
+#undef _nc_disable_period
+bool _nc_disable_period;
#undef _nc_get_token
int _nc_get_token(void)
@@ -2243,7 +2308,8 @@ int _nc_get_token(void)
#undef _nc_trans_string
char _nc_trans_string(
- char *ptr)
+ char *ptr,
+ char *last)
{ return(*(char *)0); }
#undef _nc_push_token
@@ -2311,11 +2377,10 @@ char *_nc_home_terminfo(void)
#include <init_keytry.h>
-#endif
+#undef _nc_tinfo_fkeys
+struct tinfo_fkeys _nc_tinfo_fkeys[];
-#undef _nc_tinfo_fkeysf
-struct tinfo_fkeys *_nc_tinfo_fkeysf(void)
- { return(*(struct tinfo_fkeys **)0); }
+#endif
#undef _nc_init_keytry
void _nc_init_keytry(void)
@@ -2335,8 +2400,8 @@ void _nc_init_acs(void)
#include <termcap.h>
struct speed {
- speed_t s;
- int sp;
+ int s;
+ int sp;
};
#undef _nc_baudrate
@@ -2598,6 +2663,14 @@ char *tgetstr(
char **area)
{ return(*(char **)0); }
+/* ./tinfo/lib_termname.c */
+
+#undef termname
+char *termname(void)
+ { return(*(char **)0); }
+
+/* ./tinfo/lib_tgoto.c */
+
#undef tgoto
char *tgoto(
const char *string,
@@ -2605,12 +2678,6 @@ char *tgoto(
int y)
{ return(*(char **)0); }
-/* ./tinfo/lib_termname.c */
-
-#undef termname
-char *termname(void)
- { return(*(char **)0); }
-
/* ./tinfo/lib_ti.c */
#undef tigetflag
@@ -2630,9 +2697,12 @@ char *tigetstr(
/* ./tinfo/lib_tparm.c */
-typedef union {
- unsigned int num;
- char *str;
+typedef struct {
+ union {
+ unsigned int num;
+ char *str;
+ } data;
+ bool num_type;
} stack_frame;
#undef tparm
@@ -2646,7 +2716,7 @@ char *tparm(
#undef PC
char PC;
#undef ospeed
-speed_t ospeed;
+short ospeed;
#undef _nc_nulls_sent
int _nc_nulls_sent;
@@ -2655,6 +2725,10 @@ int delay_output(
int ms)
{ return(*(int *)0); }
+#undef _nc_flush
+void _nc_flush(void)
+ { /* void */ }
+
#undef _nc_outch
int _nc_outch(
int ch)
@@ -2677,6 +2751,10 @@ int tputs(
#undef _nc_tracing
unsigned _nc_tracing;
+#undef _nc_tputs_trace
+const char *_nc_tputs_trace = {0};
+#undef _nc_outchars
+long _nc_outchars;
#undef trace
void trace(
@@ -2694,8 +2772,34 @@ const char *_nc_visbuf(
const char *buf)
{ return(*(const char **)0); }
+#undef _tracef
+void _tracef(
+ const char *fmt,
+ ...)
+ { /* void */ }
+
+#undef _nc_retrace_int
+int _nc_retrace_int(
+ int code)
+ { return(*(int *)0); }
+
+#undef _nc_retrace_ptr
+char *_nc_retrace_ptr(
+ char *code)
+ { return(*(char **)0); }
+
+#undef _nc_retrace_win
+WINDOW *_nc_retrace_win(
+ WINDOW *code)
+ { return(*(WINDOW **)0); }
+
/* ./trace/lib_tracebits.c */
+typedef struct {
+ unsigned int val;
+ const char *name;
+} BITNAMES;
+
#undef _nc_tracebits
char *_nc_tracebits(void)
{ return(*(char **)0); }
@@ -2782,8 +2886,6 @@ char *const strnames[] = {0};
char *const strfnames[] = {0};
/* ./tinfo/parse_entry.c */
-#undef _nc_curr_token
-struct token _nc_curr_token;
#undef _nc_parse_entry
int _nc_parse_entry(
@@ -2842,6 +2944,39 @@ void _nc_set_buffer(
bool buffered)
{ /* void */ }
+/* ./tinfo/strings.c */
+
+#undef _nc_str_init
+string_desc *_nc_str_init(
+ string_desc *dst,
+ char *src,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_null
+string_desc *_nc_str_null(
+ string_desc *dst,
+ size_t len)
+ { return(*(string_desc **)0); }
+
+#undef _nc_str_copy
+string_desc *_nc_str_copy(
+ string_desc *dst,
+ string_desc *src)
+ { return(*(string_desc **)0); }
+
+#undef _nc_safe_strcat
+bool _nc_safe_strcat(
+ string_desc *dst,
+ const char *src)
+ { return(*(bool *)0); }
+
+#undef _nc_safe_strcpy
+bool _nc_safe_strcpy(
+ string_desc *dst,
+ const char *src)
+ { return(*(bool *)0); }
+
/* ./trace/trace_buf.c */
typedef struct {
diff --git a/contrib/ncurses/ncurses/modules b/contrib/ncurses/ncurses/modules
index 12ed6a5f6aba..eb84a07e51f0 100644
--- a/contrib/ncurses/ncurses/modules
+++ b/contrib/ncurses/ncurses/modules
@@ -1,4 +1,4 @@
-# $Id: modules,v 1.72 2000/02/13 01:03:28 tom Exp $
+# $Id: modules,v 1.74 2000/10/03 08:51:18 tom Exp $
##############################################################################
# Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. #
# #
@@ -167,6 +167,7 @@ lib_raw lib $(tinfo) ../include/term.h
lib_setup lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h
lib_termcap lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h $(INCDIR)/capdefaults.c
lib_termname lib $(tinfo) $(INCDIR)/tic.h
+lib_tgoto lib $(tinfo) ../include/term.h $(INCDIR)/tic.h
lib_ti lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
lib_tparm lib $(tinfo) ../include/term.h $(INCDIR)/tic.h
lib_tputs lib $(tinfo) ../include/term.h $(INCDIR)/tic.h
@@ -181,6 +182,7 @@ parse_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic
read_entry lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
read_termcap lib $(tinfo) ../include/term.h $(INCDIR)/term_entry.h $(INCDIR)/tic.h
setbuf lib $(tinfo)
+strings lib $(tinfo)
trace_buf lib $(trace)
trace_tries lib $(trace)
unctrl lib .
diff --git a/contrib/ncurses/ncurses/tinfo/access.c b/contrib/ncurses/ncurses/tinfo/access.c
index 54e549497c94..6fbe92176045 100644
--- a/contrib/ncurses/ncurses/tinfo/access.c
+++ b/contrib/ncurses/ncurses/tinfo/access.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,29 +27,68 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998,2000 *
****************************************************************************/
-
#include <curses.priv.h>
+#include <tic.h>
-MODULE_ID("$Id: access.c,v 1.1 1998/07/25 20:17:09 tom Exp $")
+MODULE_ID("$Id: access.c,v 1.4 2000/10/08 01:25:06 tom Exp $")
-int _nc_access(const char *path, int mode)
+char *
+_nc_basename(char *path)
{
- if (access(path, mode) < 0) {
- if ((mode & W_OK) != 0
- && errno == ENOENT) {
- char head[PATH_MAX];
- char *leaf = strrchr(strcpy(head, path), '/');
- if (leaf == 0)
- leaf = head;
- *leaf = '\0';
- if (head == leaf)
- (void)strcpy(head, ".");
- return access(head, R_OK|W_OK|X_OK);
- }
- return -1;
+ char *result = strrchr(path, '/');
+#ifdef __EMX__
+ if (result == 0)
+ result = strrchr(path, '\\');
+#endif
+ if (result == 0)
+ result = path;
+ else
+ result++;
+ return result;
+}
+
+int
+_nc_access(const char *path, int mode)
+{
+ if (access(path, mode) < 0) {
+ if ((mode & W_OK) != 0
+ && errno == ENOENT
+ && strlen(path) < PATH_MAX) {
+ char head[PATH_MAX];
+ char *leaf = _nc_basename(strcpy(head, path));
+
+ if (leaf == 0)
+ leaf = head;
+ *leaf = '\0';
+ if (head == leaf)
+ (void) strcpy(head, ".");
+
+ return access(head, R_OK | W_OK | X_OK);
}
- return 0;
+ return -1;
+ }
+ return 0;
+}
+
+#ifndef USE_ROOT_ENVIRON
+/*
+ * Returns true if we allow application to use environment variables that are
+ * used for searching lists of directories, etc.
+ */
+int
+_nc_env_access(void)
+{
+#if HAVE_ISSETUGID
+ if (issetugid())
+ return FALSE;
+#elif HAVE_GETEUID && HAVE_GETEGID
+ if (getuid() != geteuid()
+ || getgid() != getegid())
+ return FALSE;
+#endif
+ return getuid() != 0; /* ...finally, disallow root */
}
+#endif
diff --git a/contrib/ncurses/ncurses/tinfo/alloc_ttype.c b/contrib/ncurses/ncurses/tinfo/alloc_ttype.c
index 660381a32b5f..eac7c80f0328 100644
--- a/contrib/ncurses/ncurses/tinfo/alloc_ttype.c
+++ b/contrib/ncurses/ncurses/tinfo/alloc_ttype.c
@@ -43,7 +43,7 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: alloc_ttype.c,v 1.8 2000/03/25 17:03:11 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.10 2000/08/12 21:56:24 tom Exp $")
#if NCURSES_XNAMES
/*
@@ -54,7 +54,7 @@ static int
merge_names(char **dst, char **a, int na, char **b, int nb)
{
int n = 0;
- while (na && nb) {
+ while (na > 0 && nb > 0) {
int cmp = strcmp(*a, *b);
if (cmp < 0) {
dst[n++] = *a++;
@@ -93,7 +93,7 @@ find_name(char **table, int length, char *name)
static void
realign_data(TERMTYPE * to, char **ext_Names, int ext_Booleans, int
- ext_Numbers, int ext_Strings)
+ ext_Numbers, int ext_Strings)
{
int n, m, base;
int limit = (to->ext_Booleans + to->ext_Numbers + to->ext_Strings);
@@ -102,8 +102,8 @@ realign_data(TERMTYPE * to, char **ext_Names, int ext_Booleans, int
to->num_Booleans += (ext_Booleans - to->ext_Booleans);
to->Booleans = typeRealloc(char, to->num_Booleans, to->Booleans);
for (n = to->ext_Booleans - 1,
- m = ext_Booleans - 1,
- base = to->num_Booleans - (m + 1); m >= 0; m--) {
+ m = ext_Booleans - 1,
+ base = to->num_Booleans - (m + 1); m >= 0; m--) {
if (find_name(to->ext_Names, limit, ext_Names[m])) {
to->Booleans[base + m] = to->Booleans[base + n--];
} else {
@@ -116,8 +116,8 @@ realign_data(TERMTYPE * to, char **ext_Names, int ext_Booleans, int
to->num_Numbers += (ext_Numbers - to->ext_Numbers);
to->Numbers = typeRealloc(short, to->num_Numbers, to->Numbers);
for (n = to->ext_Numbers - 1,
- m = ext_Numbers - 1,
- base = to->num_Numbers - (m + 1); m >= 0; m--) {
+ m = ext_Numbers - 1,
+ base = to->num_Numbers - (m + 1); m >= 0; m--) {
if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans])) {
to->Numbers[base + m] = to->Numbers[base + n--];
} else {
@@ -130,8 +130,8 @@ realign_data(TERMTYPE * to, char **ext_Names, int ext_Booleans, int
to->num_Strings += (ext_Strings - to->ext_Strings);
to->Strings = typeRealloc(char *, to->num_Strings, to->Strings);
for (n = to->ext_Strings - 1,
- m = ext_Strings - 1,
- base = to->num_Strings - (m + 1); m >= 0; m--) {
+ m = ext_Strings - 1,
+ base = to->num_Strings - (m + 1); m >= 0; m--) {
if (find_name(to->ext_Names, limit, ext_Names[m + ext_Booleans + ext_Numbers])) {
to->Strings[base + m] = to->Strings[base + n--];
} else {
@@ -235,7 +235,7 @@ _nc_ext_data_index(TERMTYPE * tp, int n, int token_type)
* Adjust tables to remove (not free) an extended name and its corresponding
* data.
*/
-static void
+static bool
_nc_del_ext_name(TERMTYPE * tp, char *name, int token_type)
{
int j;
@@ -270,7 +270,9 @@ _nc_del_ext_name(TERMTYPE * tp, char *name, int token_type)
tp->num_Strings -= 1;
break;
}
+ return TRUE;
}
+ return FALSE;
}
/*
@@ -345,14 +347,22 @@ adjust_cancels(TERMTYPE * to, TERMTYPE * from)
if (to->Strings[j + j_str] == CANCELLED_STRING) {
if ((k = _nc_find_ext_name(from, to->ext_Names[j], BOOLEAN)) >= 0) {
- _nc_del_ext_name(to, name, STRING);
- k = _nc_ins_ext_name(to, name, BOOLEAN);
- to->Booleans[k] = FALSE;
+ if (_nc_del_ext_name(to, name, STRING)
+ || _nc_del_ext_name(to, name, NUMBER)) {
+ k = _nc_ins_ext_name(to, name, BOOLEAN);
+ to->Booleans[k] = FALSE;
+ } else {
+ j++;
+ }
} else if ((k = _nc_find_ext_name(from, to->ext_Names[j],
- NUMBER)) >= 0) {
- _nc_del_ext_name(to, name, STRING);
- k = _nc_ins_ext_name(to, name, NUMBER);
- to->Numbers[k] = CANCELLED_NUMERIC;
+ NUMBER)) >= 0) {
+ if (_nc_del_ext_name(to, name, STRING)
+ || _nc_del_ext_name(to, name, BOOLEAN)) {
+ k = _nc_ins_ext_name(to, name, NUMBER);
+ to->Numbers[k] = CANCELLED_NUMERIC;
+ } else {
+ j++;
+ }
}
} else {
j++;
@@ -371,7 +381,7 @@ _nc_align_termtype(TERMTYPE * to, TERMTYPE * from)
int ext_Booleans, ext_Numbers, ext_Strings;
DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", na, to->term_names,
- nb, from->term_names));
+ nb, from->term_names));
if (na != 0 || nb != 0) {
if ((na == nb) /* check if the arrays are equivalent */
@@ -402,26 +412,26 @@ _nc_align_termtype(TERMTYPE * to, TERMTYPE * from)
adjust_cancels(from, to);
ext_Booleans = merge_names(ext_Names,
- to->ext_Names,
- to->ext_Booleans,
- from->ext_Names,
- from->ext_Booleans);
+ to->ext_Names,
+ to->ext_Booleans,
+ from->ext_Names,
+ from->ext_Booleans);
ext_Numbers = merge_names(ext_Names + ext_Booleans,
- to->ext_Names
- + to->ext_Booleans,
- to->ext_Numbers,
- from->ext_Names
- + from->ext_Booleans,
- from->ext_Numbers);
+ to->ext_Names
+ + to->ext_Booleans,
+ to->ext_Numbers,
+ from->ext_Names
+ + from->ext_Booleans,
+ from->ext_Numbers);
ext_Strings = merge_names(ext_Names + ext_Numbers + ext_Booleans,
- to->ext_Names
- + to->ext_Booleans
- + to->ext_Numbers,
- to->ext_Strings,
- from->ext_Names
- + from->ext_Booleans
- + from->ext_Numbers,
- from->ext_Strings);
+ to->ext_Names
+ + to->ext_Booleans
+ + to->ext_Numbers,
+ to->ext_Strings,
+ from->ext_Names
+ + from->ext_Booleans
+ + from->ext_Numbers,
+ from->ext_Strings);
/*
* Now we must reallocate the Booleans, etc., to allow the data to be
* overlaid.
@@ -431,7 +441,7 @@ _nc_align_termtype(TERMTYPE * to, TERMTYPE * from)
FreeIfNeeded(to->ext_Names);
to->ext_Names = ext_Names;
DEBUG(2, ("realigned %d extended names for '%s' (to)",
- NUM_EXT_NAMES(to), to->term_names));
+ NUM_EXT_NAMES(to), to->term_names));
}
if (nb != (ext_Booleans + ext_Numbers + ext_Strings)) {
nb = (ext_Booleans + ext_Numbers + ext_Strings);
@@ -439,7 +449,7 @@ _nc_align_termtype(TERMTYPE * to, TERMTYPE * from)
from->ext_Names = typeRealloc(char *, nb, from->ext_Names);
memcpy(from->ext_Names, ext_Names, sizeof(char *) * nb);
DEBUG(2, ("realigned %d extended names for '%s' (from)",
- NUM_EXT_NAMES(from), from->term_names));
+ NUM_EXT_NAMES(from), from->term_names));
}
}
}
diff --git a/contrib/ncurses/ncurses/tinfo/comp_parse.c b/contrib/ncurses/ncurses/tinfo/comp_parse.c
index ca58bb5746e7..c4083877ebca 100644
--- a/contrib/ncurses/ncurses/tinfo/comp_parse.c
+++ b/contrib/ncurses/ncurses/tinfo/comp_parse.c
@@ -52,7 +52,7 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: comp_parse.c,v 1.40 2000/04/15 16:57:08 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.41 2000/10/03 09:53:49 tom Exp $")
static void sanity_check(TERMTYPE *);
void (*_nc_check_termtype) (TERMTYPE *) = sanity_check;
@@ -122,26 +122,29 @@ _nc_free_entries(ENTRY * headp)
}
}
+static char *
+force_bar(char *dst, char *src)
+{
+ if (strchr(src, '|') == 0) {
+ size_t len = strlen(src);
+ if (len >= MAX_NAME_SIZE)
+ len = MAX_NAME_SIZE;
+ (void) strncpy(dst, src, len);
+ (void) strcpy(dst + len, "|");
+ src = dst;
+ }
+ return src;
+}
+
bool
_nc_entry_match(char *n1, char *n2)
/* do any of the aliases in a pair of terminal names match? */
{
char *pstart, *qstart, *pend, *qend;
- char nc1[MAX_NAME_SIZE + 1], nc2[MAX_NAME_SIZE + 1];
+ char nc1[MAX_NAME_SIZE + 2], nc2[MAX_NAME_SIZE + 2];
- if (strchr(n1, '|') == 0) {
- (void) strncpy(nc1, n1, sizeof(nc1) - 2);
- nc1[sizeof(nc1) - 2] = '\0';
- (void) strcat(nc1, "|");
- n1 = nc1;
- }
-
- if (strchr(n2, '|') == 0) {
- (void) strncpy(nc2, n2, sizeof(nc2) - 2);
- nc2[sizeof(nc2) - 2] = '\0';
- (void) strcat(nc2, "|");
- n2 = nc2;
- }
+ n1 = force_bar(nc1, n1);
+ n2 = force_bar(nc2, n2);
for (pstart = n1; (pend = strchr(pstart, '|')); pstart = pend + 1)
for (qstart = n2; (qend = strchr(qstart, '|')); qstart = qend + 1)
diff --git a/contrib/ncurses/ncurses/tinfo/comp_scan.c b/contrib/ncurses/ncurses/tinfo/comp_scan.c
index 8997e417ae57..e1118f6f9ea9 100644
--- a/contrib/ncurses/ncurses/tinfo/comp_scan.c
+++ b/contrib/ncurses/ncurses/tinfo/comp_scan.c
@@ -50,7 +50,7 @@
#include <term_entry.h>
#include <tic.h>
-MODULE_ID("$Id: comp_scan.c,v 1.44 2000/06/10 21:59:21 tom Exp $")
+MODULE_ID("$Id: comp_scan.c,v 1.47 2000/09/24 01:15:17 tom Exp $")
/*
* Maximum length of string capability we'll accept before raising an error.
@@ -80,6 +80,10 @@ static char separator; /* capability separator */
static int pushtype; /* type of pushback token */
static char pushname[MAX_NAME_SIZE + 1];
+#if NCURSES_EXT_FUNCS
+bool _nc_disable_period = FALSE; /* used by tic -a option */
+#endif
+
static int last_char(void);
static int next_char(void);
static long stream_pos(void);
@@ -149,7 +153,7 @@ _nc_get_token(void)
_nc_set_type(pushname);
DEBUG(3, ("pushed-back token: `%s', class %d",
- _nc_curr_token.tk_name, pushtype));
+ _nc_curr_token.tk_name, pushtype));
pushtype = NO_PUSHBACK;
pushname[0] = '\0';
@@ -176,10 +180,10 @@ _nc_get_token(void)
ch = next_char();
if (ch == '.'
-#ifdef NCURSES_EXT_FUNCS
- && !_nc_disable_period
+#if NCURSES_EXT_FUNCS
+ && !_nc_disable_period
#endif
- ) {
+ ) {
dot_flag = TRUE;
DEBUG(8, ("dot-flag set"));
@@ -194,12 +198,12 @@ _nc_get_token(void)
/* have to make some punctuation chars legal for terminfo */
if (!isalnum(ch)
-#ifdef NCURSES_EXT_FUNCS
- && !(ch == '.' && _nc_disable_period)
+#if NCURSES_EXT_FUNCS
+ && !(ch == '.' && _nc_disable_period)
#endif
- && !strchr(terminfo_punct, (char) ch)) {
+ && !strchr(terminfo_punct, (char) ch)) {
_nc_warning("Illegal character (expected alphanumeric or %s) - %s",
- terminfo_punct, unctrl(ch));
+ terminfo_punct, unctrl(ch));
_nc_panic_mode(separator);
goto start_token;
}
@@ -334,7 +338,7 @@ _nc_get_token(void)
case '@':
if ((ch = next_char()) != separator)
_nc_warning("Missing separator after `%s', have %s",
- buffer, unctrl(ch));
+ buffer, unctrl(ch));
_nc_curr_token.tk_name = buffer;
type = CANCEL;
break;
@@ -387,30 +391,30 @@ _nc_get_token(void)
switch (type) {
case BOOLEAN:
_tracef("Token: Boolean; name='%s'",
- _nc_curr_token.tk_name);
+ _nc_curr_token.tk_name);
break;
case NUMBER:
_tracef("Token: Number; name='%s', value=%d",
- _nc_curr_token.tk_name,
- _nc_curr_token.tk_valnumber);
+ _nc_curr_token.tk_name,
+ _nc_curr_token.tk_valnumber);
break;
case STRING:
_tracef("Token: String; name='%s', value=%s",
- _nc_curr_token.tk_name,
- _nc_visbuf(_nc_curr_token.tk_valstring));
+ _nc_curr_token.tk_name,
+ _nc_visbuf(_nc_curr_token.tk_valstring));
break;
case CANCEL:
_tracef("Token: Cancel; name='%s'",
- _nc_curr_token.tk_name);
+ _nc_curr_token.tk_name);
break;
case NAMES:
_tracef("Token: Names; value='%s'",
- _nc_curr_token.tk_name);
+ _nc_curr_token.tk_name);
break;
case EOF:
@@ -567,7 +571,7 @@ _nc_trans_string(char *ptr, char *last)
default:
_nc_warning("Illegal character %s in \\ sequence",
- unctrl(ch));
+ unctrl(ch));
*(ptr++) = (char) ch;
} /* endswitch (ch) */
} /* endelse (ch < '0' || ch > '7') */
@@ -617,7 +621,7 @@ _nc_push_token(int tokclass)
_nc_get_type(pushname);
DEBUG(3, ("pushing token: `%s', class %d",
- _nc_curr_token.tk_name, pushtype));
+ _nc_curr_token.tk_name, pushtype));
}
/*
@@ -732,7 +736,7 @@ next_char(void)
} while
(bufstart != NULL && line[0] == '#');
- if (bufstart == NULL)
+ if (bufstart == NULL || *bufstart == 0)
return (EOF);
while (iswhite(*bufptr))
@@ -745,10 +749,19 @@ next_char(void)
if ((len = strlen(bufptr)) > 1) {
if (bufptr[len - 1] == '\n'
&& bufptr[len - 2] == '\r') {
- bufptr[len - 2] = '\n';
- bufptr[len - 1] = '\0';
+ len--;
+ bufptr[len - 1] = '\n';
+ bufptr[len] = '\0';
}
}
+
+ /*
+ * If we don't have a trailing newline, it's because the line is simply
+ * too long. Give up. (FIXME: We could instead reallocate the line
+ * buffer and allow arbitrary-length lines).
+ */
+ if (len == 0 || (bufptr[len - 1] != '\n'))
+ return (EOF);
}
first_column = (bufptr == bufstart);
@@ -778,7 +791,7 @@ end_of_stream(void)
/* are we at end of input? */
{
return ((yyin ? feof(yyin) : (bufptr && *bufptr == '\0'))
- ? TRUE : FALSE);
+ ? TRUE : FALSE);
}
/* comp_scan.c ends here */
diff --git a/contrib/ncurses/ncurses/tinfo/free_ttype.c b/contrib/ncurses/ncurses/tinfo/free_ttype.c
index d9d9c0aa52e8..aba1aeb9d82f 100644
--- a/contrib/ncurses/ncurses/tinfo/free_ttype.c
+++ b/contrib/ncurses/ncurses/tinfo/free_ttype.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -44,30 +44,29 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: free_ttype.c,v 1.3 2000/03/19 02:03:07 tom Exp $")
+MODULE_ID("$Id: free_ttype.c,v 1.5 2000/07/08 00:43:58 tom Exp $")
void _nc_free_termtype(TERMTYPE *ptr)
{
- FreeIfNeeded(ptr->str_table);
- FreeIfNeeded(ptr->term_names);
+ FreeIfNeeded(ptr->str_table);
+ FreeIfNeeded(ptr->term_names);
+ FreeIfNeeded(ptr->Booleans);
+ FreeIfNeeded(ptr->Numbers);
+ FreeIfNeeded(ptr->Strings);
#if NCURSES_XNAMES
- FreeIfNeeded(ptr->ext_str_table);
- FreeIfNeeded(ptr->Booleans);
- FreeIfNeeded(ptr->Numbers);
- FreeIfNeeded(ptr->Strings);
- FreeIfNeeded(ptr->ext_Names);
+ FreeIfNeeded(ptr->ext_str_table);
+ FreeIfNeeded(ptr->ext_Names);
#endif
- memset(ptr, 0, sizeof(TERMTYPE));
+ memset(ptr, 0, sizeof(TERMTYPE));
}
#if NCURSES_XNAMES
bool _nc_user_definable = TRUE;
-bool _nc_disable_period = FALSE; /* used by tic -a option */
int use_extended_names(bool flag)
{
- int oldflag = _nc_user_definable;
- _nc_user_definable = flag;
- return oldflag;
+ int oldflag = _nc_user_definable;
+ _nc_user_definable = flag;
+ return oldflag;
}
#endif
diff --git a/contrib/ncurses/ncurses/tinfo/home_terminfo.c b/contrib/ncurses/ncurses/tinfo/home_terminfo.c
index 7aa4ca112e5a..69b8a96ffcff 100644
--- a/contrib/ncurses/ncurses/tinfo/home_terminfo.c
+++ b/contrib/ncurses/ncurses/tinfo/home_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1998 *
+ * Author: Thomas E. Dickey <dickey@clark.net> 1998,2000 *
****************************************************************************/
/*
@@ -37,7 +37,7 @@
#include <curses.priv.h>
#include <tic.h>
-MODULE_ID("$Id: home_terminfo.c,v 1.2 1999/02/27 19:58:46 tom Exp $")
+MODULE_ID("$Id: home_terminfo.c,v 1.3 2000/10/04 02:31:53 tom Exp $");
#define my_length (strlen(home) + sizeof(PRIVATE_INFO))
@@ -46,17 +46,20 @@ MODULE_ID("$Id: home_terminfo.c,v 1.2 1999/02/27 19:58:46 tom Exp $")
char *
_nc_home_terminfo(void)
{
- char *home;
- static char *temp = 0;
+ char *home;
+ static char *temp = 0;
+ if (use_terminfo_vars()) {
if (temp == 0) {
- if ((home = getenv("HOME")) != 0
- && my_length <= PATH_MAX) {
- temp = typeMalloc(char, my_length);
- if (temp == 0)
- _nc_err_abort("Out of memory");
- (void) sprintf(temp, PRIVATE_INFO, home);
- }
+ if ((home = getenv("HOME")) != 0
+ && my_length <= PATH_MAX) {
+ temp = typeMalloc(char, my_length);
+ if (temp == 0)
+ _nc_err_abort("Out of memory");
+ (void) sprintf(temp, PRIVATE_INFO, home);
+ }
}
return temp;
+ }
+ return 0;
}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_baudrate.c b/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
index 4077ba384076..0d7fa27bcc3d 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_baudrate.c
@@ -31,17 +31,16 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
/*
* lib_baudrate.c
*
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term, pad_char */
-#include <termcap.h> /* ospeed */
+#include <term.h> /* cur_term, pad_char */
+#include <termcap.h> /* ospeed */
-MODULE_ID("$Id: lib_baudrate.c,v 1.15 1999/01/31 03:05:25 tom Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.17 2000/10/08 00:59:08 tom Exp $")
/*
* int
@@ -52,117 +51,118 @@ MODULE_ID("$Id: lib_baudrate.c,v 1.15 1999/01/31 03:05:25 tom Exp $")
*/
struct speed {
- speed_t s;
- int sp;
+ int s; /* value for 'ospeed' is an index */
+ int sp; /* the actual speed */
};
-static struct speed const speeds[] = {
- {B0, 0},
- {B50, 50},
- {B75, 75},
- {B110, 110},
- {B134, 134},
- {B150, 150},
- {B200, 200},
- {B300, 300},
- {B600, 600},
- {B1200, 1200},
- {B1800, 1800},
- {B2400, 2400},
- {B4800, 4800},
- {B9600, 9600},
+static struct speed const speeds[] =
+{
+ {B0, 0},
+ {B50, 50},
+ {B75, 75},
+ {B110, 110},
+ {B134, 134},
+ {B150, 150},
+ {B200, 200},
+ {B300, 300},
+ {B600, 600},
+ {B1200, 1200},
+ {B1800, 1800},
+ {B2400, 2400},
+ {B4800, 4800},
+ {B9600, 9600},
#ifdef B19200
- {B19200, 19200},
+ {B19200, 19200},
#else
#ifdef EXTA
- {EXTA, 19200},
+ {EXTA, 19200},
#endif
#endif
#ifdef B38400
- {B38400, 38400},
+ {B38400, 38400},
#else
#ifdef EXTB
- {EXTB, 38400},
+ {EXTB, 38400},
#endif
#endif
#ifdef B57600
- {B57600, 57600},
+ {B57600, 57600},
#endif
#ifdef B115200
- {B115200, 115200},
+ {B115200, 115200},
#endif
#ifdef B230400
- {B230400, 230400},
+ {B230400, 230400},
#endif
#ifdef B460800
- {B460800, 460800},
+ {B460800, 460800},
#endif
};
-int _nc_baudrate(int OSpeed)
+int
+_nc_baudrate(int OSpeed)
{
- static int last_OSpeed;
- static int last_baudrate;
-
- int result;
- unsigned i;
-
- if (OSpeed == last_OSpeed) {
- result = last_baudrate;
- } else {
- result = ERR;
- if (OSpeed >= 0) {
- for (i = 0; i < SIZEOF(speeds); i++) {
- if (speeds[i].s == (speed_t)OSpeed) {
- result = speeds[i].sp;
- break;
- }
- }
+ static int last_OSpeed;
+ static int last_baudrate;
+
+ int result;
+ unsigned i;
+
+ if (OSpeed == last_OSpeed) {
+ result = last_baudrate;
+ } else {
+ result = ERR;
+ if (OSpeed >= 0) {
+ for (i = 0; i < SIZEOF(speeds); i++) {
+ if (speeds[i].s == OSpeed) {
+ result = speeds[i].sp;
+ break;
}
- last_baudrate = result;
+ }
}
- return (result);
+ last_baudrate = result;
+ }
+ return (result);
}
-
-int _nc_ospeed(int BaudRate)
+int
+_nc_ospeed(int BaudRate)
{
- speed_t result = 1;
- unsigned i;
-
- if (BaudRate >= 0) {
- for (i = 0; i < SIZEOF(speeds); i++) {
- if (speeds[i].sp == BaudRate) {
- result = speeds[i].s;
- break;
- }
- }
+ int result = 1;
+ unsigned i;
+
+ if (BaudRate >= 0) {
+ for (i = 0; i < SIZEOF(speeds); i++) {
+ if (speeds[i].sp == BaudRate) {
+ result = speeds[i].s;
+ break;
+ }
}
- return (result);
+ }
+ return (result);
}
int
baudrate(void)
{
-int result;
+ int result;
- T((T_CALLED("baudrate()")));
+ T((T_CALLED("baudrate()")));
- /*
- * In debugging, allow the environment symbol to override when we're
- * redirecting to a file, so we can construct repeatable test-cases
- * that take into account costs that depend on baudrate.
- */
+ /*
+ * In debugging, allow the environment symbol to override when we're
+ * redirecting to a file, so we can construct repeatable test-cases
+ * that take into account costs that depend on baudrate.
+ */
#ifdef TRACE
- if (SP && !isatty(fileno(SP->_ofp))
- && getenv("BAUDRATE") != 0) {
- int ret;
- if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
- ret = 9600;
- ospeed = _nc_ospeed(ret);
- returnCode(ret);
- }
- else
+ if (SP && !isatty(fileno(SP->_ofp))
+ && getenv("BAUDRATE") != 0) {
+ int ret;
+ if ((ret = _nc_getenv_num("BAUDRATE")) <= 0)
+ ret = 9600;
+ ospeed = _nc_ospeed(ret);
+ returnCode(ret);
+ } else
#endif
#ifdef TERMIOS
@@ -170,9 +170,9 @@ int result;
#else
ospeed = cur_term->Nttyb.sg_ospeed;
#endif
- result = _nc_baudrate(ospeed);
- if (cur_term != 0)
- cur_term->_baudrate = result;
+ result = _nc_baudrate(ospeed);
+ if (cur_term != 0)
+ cur_term->_baudrate = result;
- returnCode(result);
+ returnCode(result);
}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_options.c b/contrib/ncurses/ncurses/tinfo/lib_options.c
index b58602af72bb..fc3dc42bca41 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_options.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_options.c
@@ -42,7 +42,7 @@
#include <term.h>
-MODULE_ID("$Id: lib_options.c,v 1.39 2000/03/12 00:19:11 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.40 2000/09/02 18:02:05 tom Exp $")
int
idlok(WINDOW *win, bool flag)
@@ -206,7 +206,7 @@ typeahead(int fd)
**
*/
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
static int
has_key_internal(int keycode, struct tries *tp)
{
diff --git a/contrib/ncurses/ncurses/tinfo/lib_raw.c b/contrib/ncurses/ncurses/tinfo/lib_raw.c
index 6033ed9c10c3..6df95714a9b1 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_raw.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_raw.c
@@ -48,9 +48,9 @@
#include <curses.priv.h>
#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_raw.c,v 1.7 2000/02/13 01:01:26 tom Exp $")
+MODULE_ID("$Id: lib_raw.c,v 1.8 2000/09/02 18:08:48 tom Exp $")
-#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
diff --git a/contrib/ncurses/ncurses/tinfo/lib_setup.c b/contrib/ncurses/ncurses/tinfo/lib_setup.c
index 50c330eb5739..1fd0d48f3cc8 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_setup.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_setup.c
@@ -42,13 +42,13 @@
#include <tic.h> /* for MAX_NAME_SIZE */
#include <term_entry.h>
-#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
#include <term.h> /* lines, columns, cur_term */
-MODULE_ID("$Id: lib_setup.c,v 1.59 2000/02/13 01:01:26 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.60 2000/09/02 18:13:12 tom Exp $")
/****************************************************************************
*
@@ -245,7 +245,7 @@ grab_entry(const char *const tn, TERMTYPE * const tp)
if ((status = _nc_read_entry(tn, filename, tp)) != 1) {
-#ifndef PURE_TERMINFO
+#if !PURE_TERMINFO
/*
* Try falling back on the termcap file.
* Note: allowing this call links the entire terminfo/termcap
diff --git a/contrib/ncurses/ncurses/tinfo/lib_termcap.c b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
index c47400132fa8..ecec2865fbae 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_termcap.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
@@ -39,7 +39,7 @@
#define __INTERNAL_CAPS_VISIBLE
#include <term_entry.h>
-MODULE_ID("$Id: lib_termcap.c,v 1.36 2000/02/13 01:01:26 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.37 2000/09/16 20:30:16 tom Exp $")
/*
some of the code in here was contributed by:
@@ -190,19 +190,3 @@ tgetstr(NCURSES_CONST char *id, char **area)
}
returnPtr(NULL);
}
-
-/*
- * char *
- * tgoto(string, x, y)
- *
- * Retained solely for upward compatibility. Note the intentional
- * reversing of the last two arguments.
- *
- */
-
-char *
-tgoto(const char *string, int x, int y)
-{
- T((T_CALLED("tgoto(%s,%d,%d)"), string, x, y));
- returnPtr(tparm((NCURSES_CONST char *) string, y, x));
-}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_tgoto.c b/contrib/ncurses/ncurses/tinfo/lib_tgoto.c
new file mode 100644
index 000000000000..73557eb7cc25
--- /dev/null
+++ b/contrib/ncurses/ncurses/tinfo/lib_tgoto.c
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+#include <ctype.h>
+#include <termcap.h>
+
+MODULE_ID("$Id: lib_tgoto.c,v 1.2 2000/09/24 00:19:14 tom Exp $")
+
+#if !PURE_TERMINFO
+static bool
+is_termcap(const char *string)
+{
+ bool result = TRUE;
+
+ while ((*string != '\0') && result) {
+ if (*string == '%') {
+ switch (*++string) {
+ case 'p':
+ result = FALSE;
+ break;
+ case '\0':
+ string--;
+ break;
+ }
+ } else if (string[0] == '$' && string[1] == '<') {
+ result = FALSE;
+ }
+ string++;
+ }
+ return result;
+}
+
+static char *
+tgoto_internal(const char *string, int x, int y)
+{
+ static char *result;
+ static size_t length;
+
+ int swap_arg;
+ int param[3];
+ size_t used = 0;
+ size_t need = 10;
+ int *value = param;
+ bool need_BC = FALSE;
+
+ if (BC)
+ need += strlen(BC);
+
+ param[0] = y;
+ param[1] = x;
+ param[2] = 0;
+
+ while (*string != 0) {
+ if ((used + need) > length) {
+ length += (used + need);
+ if ((result = _nc_doalloc(result, length)) == 0) {
+ length = 0;
+ break;
+ }
+ }
+ if (*string == '%') {
+ char *fmt = 0;
+
+ switch (*++string) {
+ case '\0':
+ string--;
+ break;
+ case 'd':
+ fmt = "%d";
+ break;
+ case '2':
+ fmt = "%02d";
+ *value %= 100;
+ break;
+ case '3':
+ fmt = "%03d";
+ *value %= 1000;
+ break;
+ case '+':
+ *value += (*++string & 0xff);
+ /* FALLTHRU */
+ case '.':
+ /*
+ * Guard against tputs() seeing a truncated string. The
+ * termcap documentation refers to a similar fixup for \n
+ * and \r, but I don't see that it could work -TD
+ */
+ if (*value == 0) {
+ if (BC != 0) {
+ *value += 1;
+ need_BC = TRUE;
+ } else {
+ *value = 0200; /* tputs will treat this as \0 */
+ }
+ }
+ result[used++] = *value++;
+ break;
+ case '%':
+ result[used++] = *string;
+ break;
+ case 'r':
+ swap_arg = param[0];
+ param[0] = param[1];
+ param[1] = swap_arg;
+ break;
+ case 'i':
+ param[0] += 1;
+ param[1] += 1;
+ break;
+ case '>':
+ if (*value > string[1])
+ *value += string[2];
+ string += 2;
+ break;
+ case 'n': /* Datamedia 2500 */
+ param[0] ^= 0140;
+ param[1] ^= 0140;
+ break;
+ case 'B': /* BCD */
+ *value = 16 * (*value / 10) + (*value % 10);
+ break;
+ case 'D': /* Reverse coding (Delta Data) */
+ *value -= 2 * (*value / 16);
+ break;
+ }
+ if (fmt != 0) {
+ sprintf(result + used, fmt, *value++);
+ used += strlen(result + used);
+ fmt = 0;
+ }
+ if (value - param > 2) {
+ value = param + 2;
+ *value = 0;
+ }
+ } else {
+ result[used++] = *string;
+ }
+ string++;
+ }
+ if (need_BC) {
+ strcpy(result + used, BC);
+ used += strlen(BC);
+ }
+ result[used] = '\0';
+ return result;
+}
+#endif
+
+/*
+ * Retained solely for upward compatibility. Note the intentional reversing of
+ * the last two arguments when invoking tparm().
+ */
+char *
+tgoto(const char *string, int x, int y)
+{
+ char *result;
+
+ T((T_CALLED("tgoto(%s, %d, %d)"), _nc_visbuf(string), x, y));
+#if !PURE_TERMINFO
+ if (is_termcap(string))
+ result = tgoto_internal(string, x, y);
+ else
+#endif
+ result = tparm((NCURSES_CONST char *) string, y, x);
+ returnPtr(result);
+}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_tparm.c b/contrib/ncurses/ncurses/tinfo/lib_tparm.c
index 71b82916a356..6a8ca1f0419a 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_tparm.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_tparm.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
/*
* tparm.c
*
@@ -43,7 +42,7 @@
#include <term.h>
#include <tic.h>
-MODULE_ID("$Id: lib_tparm.c,v 1.39 1999/06/06 00:04:55 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.47 2000/10/04 00:57:13 tom Exp $")
/*
* char *
@@ -74,6 +73,8 @@ MODULE_ID("$Id: lib_tparm.c,v 1.39 1999/06/06 00:04:55 tom Exp $")
* %s print pop() like %s in printf()
* %[[:]flags][width[.precision]][doxXs]
* as in printf, flags are [-+#] and space
+ * The ':' is used to avoid making %+ or %-
+ * patterns (see below).
*
* %p[1-9] push ith parm
* %P[a-z] set dynamic variable [a-z] to pop()
@@ -105,481 +106,636 @@ MODULE_ID("$Id: lib_tparm.c,v 1.39 1999/06/06 00:04:55 tom Exp $")
#define STACKSIZE 20
-typedef union {
- unsigned int num;
- char *str;
+typedef struct {
+ union {
+ unsigned int num;
+ char *str;
+ } data;
+ bool num_type;
} stack_frame;
-static stack_frame stack[STACKSIZE];
-static int stack_ptr;
+static stack_frame stack[STACKSIZE];
+static int stack_ptr;
+
#ifdef TRACE
static const char *tname;
#endif /* TRACE */
-static char *out_buff;
+static char *out_buff;
static size_t out_size;
static size_t out_used;
#if NO_LEAKS
-void _nc_free_tparm(void)
+void
+_nc_free_tparm(void)
{
- if (out_buff != 0) {
- FreeAndNull(out_buff);
- out_size = 0;
- out_used = 0;
- }
+ if (out_buff != 0) {
+ FreeAndNull(out_buff);
+ out_size = 0;
+ out_used = 0;
+ }
}
#endif
-static void really_get_space(size_t need)
+static void
+really_get_space(size_t need)
{
- out_size = need * 2;
- out_buff = typeRealloc(char, out_size, out_buff);
- if (out_buff == 0)
- _nc_err_abort("Out of memory");
+ out_size = need * 2;
+ out_buff = typeRealloc(char, out_size, out_buff);
+ if (out_buff == 0)
+ _nc_err_abort("Out of memory");
}
-static inline void get_space(size_t need)
+static inline void
+get_space(size_t need)
{
- need += out_used;
- if (need > out_size)
- really_get_space(need);
+ need += out_used;
+ if (need > out_size)
+ really_get_space(need);
}
-static inline void save_text(const char *fmt, char *s, int len)
+static inline void
+save_text(const char *fmt, const char *s, int len)
{
- size_t s_len = strlen(s);
- if (len > (int)s_len)
- s_len = len;
+ size_t s_len = strlen(s);
+ if (len > (int) s_len)
+ s_len = len;
- get_space(s_len + 1);
+ get_space(s_len + 1);
- (void)sprintf(out_buff+out_used, fmt, s);
- out_used += strlen(out_buff+out_used);
+ (void) sprintf(out_buff + out_used, fmt, s);
+ out_used += strlen(out_buff + out_used);
}
-static inline void save_number(const char *fmt, int number, int len)
+static inline void
+save_number(const char *fmt, int number, int len)
{
- if (len < 30)
- len = 30; /* actually log10(MAX_INT)+1 */
+ if (len < 30)
+ len = 30; /* actually log10(MAX_INT)+1 */
- get_space(len + 1);
+ get_space(len + 1);
- (void)sprintf(out_buff+out_used, fmt, number);
- out_used += strlen(out_buff+out_used);
+ (void) sprintf(out_buff + out_used, fmt, number);
+ out_used += strlen(out_buff + out_used);
}
-static inline void save_char(int c)
+static inline void
+save_char(int c)
{
- if (c == 0)
- c = 0200;
- get_space(1);
- out_buff[out_used++] = c;
+ if (c == 0)
+ c = 0200;
+ get_space(1);
+ out_buff[out_used++] = c;
}
-static inline void npush(int x)
+static inline void
+npush(int x)
{
- if (stack_ptr < STACKSIZE) {
- stack[stack_ptr].num = x;
- stack_ptr++;
- }
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = TRUE;
+ stack[stack_ptr].data.num = x;
+ stack_ptr++;
+ }
}
-static inline int npop(void)
+static inline int
+npop(void)
{
- return (stack_ptr > 0 ? stack[--stack_ptr].num : 0);
+ int result = 0;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (stack[stack_ptr].num_type)
+ result = stack[stack_ptr].data.num;
+ }
+ return result;
}
-static inline char *spop(void)
+static inline void
+spush(char *x)
{
- static char dummy[] = ""; /* avoid const-cast */
- return (stack_ptr > 0 ? stack[--stack_ptr].str : dummy);
+ if (stack_ptr < STACKSIZE) {
+ stack[stack_ptr].num_type = FALSE;
+ stack[stack_ptr].data.str = x;
+ stack_ptr++;
+ }
}
-static inline const char *parse_format(const char *s, char *format, int *len)
+static inline char *
+spop(void)
{
- bool done = FALSE;
- bool allowminus = FALSE;
- bool dot = FALSE;
- int prec = 0;
- int width = 0;
+ static char dummy[] = ""; /* avoid const-cast */
+ char *result = dummy;
+ if (stack_ptr > 0) {
+ stack_ptr--;
+ if (!stack[stack_ptr].num_type && stack[stack_ptr].data.str != 0)
+ result = stack[stack_ptr].data.str;
+ }
+ return result;
+}
- *len = 0;
- *format++ = '%';
- while (*s != '\0' && !done) {
- switch (*s) {
- case 'c': /* FALLTHRU */
- case 'd': /* FALLTHRU */
- case 'o': /* FALLTHRU */
- case 'x': /* FALLTHRU */
- case 'X': /* FALLTHRU */
- case 's':
- *format++ = *s;
- done = TRUE;
- break;
- case '.':
- *format++ = *s++;
- dot = TRUE;
- break;
- case '#':
- *format++ = *s++;
- break;
- case ' ':
- *format++ = *s++;
- break;
- case ':':
- s++;
- allowminus = TRUE;
- break;
- case '-':
- if (allowminus) {
- *format++ = *s++;
- } else {
- done = TRUE;
- }
- break;
- default:
- if (isdigit(*s)) {
- if (dot)
- prec = (prec * 10) + (*s - '0');
- else
- width = (width * 10) + (*s - '0');
- *format++ = *s++;
- } else {
- done = TRUE;
- }
- }
+static inline const char *
+parse_format(const char *s, char *format, int *len)
+{
+ bool done = FALSE;
+ bool allowminus = FALSE;
+ bool dot = FALSE;
+ bool err = FALSE;
+ char *fmt = format;
+ int prec = 0;
+ int width = 0;
+ int value = 0;
+
+ *len = 0;
+ *format++ = '%';
+ while (*s != '\0' && !done) {
+ switch (*s) {
+ case 'c': /* FALLTHRU */
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 's':
+ *format++ = *s;
+ done = TRUE;
+ break;
+ case '.':
+ *format++ = *s++;
+ if (dot) {
+ err = TRUE;
+ } else {
+ dot = TRUE;
+ prec = value;
+ }
+ value = 0;
+ break;
+ case '#':
+ *format++ = *s++;
+ break;
+ case ' ':
+ *format++ = *s++;
+ break;
+ case ':':
+ s++;
+ allowminus = TRUE;
+ break;
+ case '-':
+ if (allowminus) {
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
+ break;
+ default:
+ if (isdigit(*s)) {
+ value = (value * 10) + (*s - '0');
+ if (value > 10000)
+ err = TRUE;
+ *format++ = *s++;
+ } else {
+ done = TRUE;
+ }
}
- *format = '\0';
- /* return maximum string length in print */
- *len = (prec > width) ? prec : width;
- return s;
+ }
+
+ /*
+ * If we found an error, ignore (and remove) the flags.
+ */
+ if (err) {
+ prec = width = value = 0;
+ format = fmt;
+ *format++ = '%';
+ *format++ = *s;
+ }
+
+ if (dot)
+ width = value;
+ else
+ prec = value;
+
+ *format = '\0';
+ /* return maximum string length in print */
+ *len = (prec > width) ? prec : width;
+ return s;
}
#define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
#define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
-static inline char *tparam_internal(const char *string, va_list ap)
+static inline char *
+tparam_internal(const char *string, va_list ap)
{
#define NUM_VARS 26
-int param[9];
-int popcount;
-int number;
-int len;
-int level;
-int x, y;
-int i;
-register const char *cp;
-static size_t len_fmt;
-static char *format;
-static int dynamic_var[NUM_VARS];
-static int static_vars[NUM_VARS];
-
- out_used = 0;
- if (string == NULL)
- return NULL;
-
- /*
- * Find the highest parameter-number referred to in the format string.
- * Use this value to limit the number of arguments copied from the
- * variable-length argument list.
- */
- for (cp = string, popcount = number = 0; *cp != '\0'; cp++) {
- if (cp[0] == '%' && cp[1] != '\0') {
- switch (cp[1]) {
- case '%':
- cp++;
- break;
- case 'i':
- if (popcount < 2)
- popcount = 2;
- break;
- case 'p':
- cp++;
- if (cp[1] >= '1' && cp[1] <= '9') {
- int c = cp[1] - '0';
- if (c > popcount)
- popcount = c;
- }
- break;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- case 'd': case 'c': case 's':
- ++number;
- break;
- }
+ char *p_is_s[9];
+ int param[9];
+ int lastpop;
+ int popcount;
+ int number;
+ int len;
+ int level;
+ int x, y;
+ int i;
+ size_t len2;
+ register const char *cp;
+ static size_t len_fmt;
+ static char dummy[] = "";
+ static char *format;
+ static int dynamic_var[NUM_VARS];
+ static int static_vars[NUM_VARS];
+
+ out_used = 0;
+ if (string == NULL)
+ return NULL;
+
+ if ((len2 = strlen(string)) > len_fmt) {
+ len_fmt = len2 + len_fmt + 2;
+ if ((format = typeRealloc(char, len_fmt, format)) == 0)
+ return 0;
+ }
+
+ /*
+ * Find the highest parameter-number referred to in the format string.
+ * Use this value to limit the number of arguments copied from the
+ * variable-length argument list.
+ */
+
+ number = 0;
+ lastpop = -1;
+ popcount = 0;
+ memset(p_is_s, 0, sizeof(p_is_s));
+
+ /*
+ * Analyze the string to see how many parameters we need from the varargs
+ * list, and what their types are. We will only accept string parameters
+ * if they appear as a %l or %s format following an explicit parameter
+ * reference (e.g., %p2%s). All other parameters are numbers.
+ *
+ * 'number' counts coarsely the number of pop's we see in the string, and
+ * 'popcount' shows the highest parameter number in the string. We would
+ * like to simply use the latter count, but if we are reading termcap
+ * strings, there may be cases that we cannot see the explicit parameter
+ * numbers.
+ */
+ for (cp = string; (cp - string) < (int) len2;) {
+ if (*cp == '%') {
+ cp++;
+ cp = parse_format(cp, format, &len);
+ switch (*cp) {
+ default:
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 'c': /* FALLTHRU */
+ number++;
+ lastpop = -1;
+ break;
+
+ case 'l':
+ case 's':
+ if (lastpop > 0)
+ p_is_s[lastpop - 1] = dummy;
+ ++number;
+ break;
+
+ case 'p':
+ cp++;
+ i = (*cp - '0');
+ if (i >= 0 && i <= 9) {
+ lastpop = i;
+ if (lastpop > popcount)
+ popcount = lastpop;
}
+ break;
+
+ case 'P':
+ case 'g':
+ cp++;
+ break;
+
+ case S_QUOTE:
+ cp += 2;
+ lastpop = -1;
+ break;
+
+ case L_BRACE:
+ cp++;
+ while (*cp >= '0' && *cp <= '9') {
+ cp++;
+ }
+ break;
+
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case 'm':
+ case 'A':
+ case 'O':
+ case '&':
+ case '|':
+ case '^':
+ case '=':
+ case '<':
+ case '>':
+ case '!':
+ case '~':
+ lastpop = -1;
+ number += 2;
+ break;
+
+ case 'i':
+ lastpop = -1;
+ if (popcount < 2)
+ popcount = 2;
+ break;
+ }
}
- if ((size_t)(cp - string) > len_fmt) {
- len_fmt = (cp - string) + len_fmt + 2;
- if ((format = typeRealloc(char, len_fmt, format)) == 0)
- return 0;
- }
-
- if (number > 9) number = 9;
- for (i = 0; i < max(popcount, number); i++) {
- /*
- * FIXME: potential loss here if sizeof(int) != sizeof(char *).
- * A few caps (such as plab_norm) have string-valued parms.
- */
- param[i] = va_arg(ap, int);
- }
+ if (*cp != '\0')
+ cp++;
+ }
+ if (number > 9)
+ number = 9;
+ for (i = 0; i < max(popcount, number); i++) {
/*
- * This is a termcap compatibility hack. If there are no explicit pop
- * operations in the string, load the stack in such a way that
- * successive pops will grab successive parameters. That will make
- * the expansion of (for example) \E[%d;%dH work correctly in termcap
- * style, which means tparam() will expand termcap strings OK.
+ * A few caps (such as plab_norm) have string-valued parms.
+ * We'll have to assume that the caller knows the difference, since
+ * a char* and an int may not be the same size on the stack.
*/
- stack_ptr = 0;
- if (popcount == 0) {
- popcount = number;
- for (i = number - 1; i >= 0; i--)
- npush(param[i]);
+ if (p_is_s[i] != 0) {
+ p_is_s[i] = va_arg(ap, char *);
+ } else {
+ param[i] = va_arg(ap, int);
}
-
+ }
+
+ /*
+ * This is a termcap compatibility hack. If there are no explicit pop
+ * operations in the string, load the stack in such a way that
+ * successive pops will grab successive parameters. That will make
+ * the expansion of (for example) \E[%d;%dH work correctly in termcap
+ * style, which means tparam() will expand termcap strings OK.
+ */
+ stack_ptr = 0;
+ if (popcount == 0) {
+ popcount = number;
+ for (i = number - 1; i >= 0; i--)
+ npush(param[i]);
+ }
#ifdef TRACE
- if (_nc_tracing & TRACE_CALLS) {
- for (i = 0; i < popcount; i++)
- save_number(", %d", param[i], 0);
- _tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(string), out_buff);
- out_used = 0;
+ if (_nc_tracing & TRACE_CALLS) {
+ for (i = 0; i < popcount; i++) {
+ if (p_is_s[i] != 0)
+ save_text(", %s", _nc_visbuf(p_is_s[i]), 0);
+ else
+ save_number(", %d", param[i], 0);
}
+ _tracef(T_CALLED("%s(%s%s)"), tname, _nc_visbuf(string), out_buff);
+ out_used = 0;
+ }
#endif /* TRACE */
- while (*string) {
- if (*string != '%') {
- save_char(*string);
- } else {
- string++;
- string = parse_format(string, format, &len);
- switch (*string) {
- default:
- break;
- case '%':
- save_char('%');
- break;
-
- case 'd': /* FALLTHRU */
- case 'o': /* FALLTHRU */
- case 'x': /* FALLTHRU */
- case 'X': /* FALLTHRU */
- case 'c':
- save_number(format, npop(), len);
- break;
-
- case 'l':
- save_number("%d", strlen(spop()), 0);
- break;
-
- case 's':
- save_text(format, spop(), len);
- break;
-
- case 'p':
- string++;
- if (*string >= '1' && *string <= '9')
- npush(param[*string - '1']);
- break;
-
- case 'P':
- string++;
- if (isUPPER(*string)) {
- i = (*string - 'A');
- static_vars[i] = npop();
- } else if (isLOWER(*string)) {
- i = (*string - 'a');
- dynamic_var[i] = npop();
- }
- break;
-
- case 'g':
- string++;
- if (isUPPER(*string)) {
- i = (*string - 'A');
- npush(static_vars[i]);
- } else if (isLOWER(*string)) {
- i = (*string - 'a');
- npush(dynamic_var[i]);
- }
- break;
-
- case S_QUOTE:
- string++;
- npush(*string);
- string++;
- break;
-
- case L_BRACE:
- number = 0;
- string++;
- while (*string >= '0' && *string <= '9') {
- number = number * 10 + *string - '0';
- string++;
- }
- npush(number);
- break;
-
- case '+':
- npush(npop() + npop());
- break;
-
- case '-':
- y = npop();
- x = npop();
- npush(x - y);
- break;
-
- case '*':
- npush(npop() * npop());
- break;
-
- case '/':
- y = npop();
- x = npop();
- npush(y ? (x / y) : 0);
- break;
-
- case 'm':
- y = npop();
- x = npop();
- npush(y ? (x % y) : 0);
- break;
-
- case 'A':
- npush(npop() && npop());
- break;
-
- case 'O':
- npush(npop() || npop());
- break;
-
- case '&':
- npush(npop() & npop());
- break;
-
- case '|':
- npush(npop() | npop());
- break;
-
- case '^':
- npush(npop() ^ npop());
- break;
-
- case '=':
- y = npop();
- x = npop();
- npush(x == y);
- break;
-
- case '<':
- y = npop();
- x = npop();
- npush(x < y);
- break;
+ while (*string) {
+ if (*string != '%') {
+ save_char(*string);
+ } else {
+ string++;
+ string = parse_format(string, format, &len);
+ switch (*string) {
+ default:
+ break;
+ case '%':
+ save_char('%');
+ break;
+
+ case 'd': /* FALLTHRU */
+ case 'o': /* FALLTHRU */
+ case 'x': /* FALLTHRU */
+ case 'X': /* FALLTHRU */
+ case 'c': /* FALLTHRU */
+ save_number(format, npop(), len);
+ break;
+
+ case 'l':
+ save_number("%d", strlen(spop()), 0);
+ break;
+
+ case 's':
+ save_text(format, spop(), len);
+ break;
+
+ case 'p':
+ string++;
+ i = (*string - '1');
+ if (i >= 0 && i < 9) {
+ if (p_is_s[i])
+ spush(p_is_s[i]);
+ else
+ npush(param[i]);
+ }
+ break;
- case '>':
- y = npop();
- x = npop();
- npush(x > y);
- break;
+ case 'P':
+ string++;
+ if (isUPPER(*string)) {
+ i = (*string - 'A');
+ static_vars[i] = npop();
+ } else if (isLOWER(*string)) {
+ i = (*string - 'a');
+ dynamic_var[i] = npop();
+ }
+ break;
- case '!':
- npush(! npop());
- break;
+ case 'g':
+ string++;
+ if (isUPPER(*string)) {
+ i = (*string - 'A');
+ npush(static_vars[i]);
+ } else if (isLOWER(*string)) {
+ i = (*string - 'a');
+ npush(dynamic_var[i]);
+ }
+ break;
- case '~':
- npush(~ npop());
- break;
+ case S_QUOTE:
+ string++;
+ npush(*string);
+ string++;
+ break;
- case 'i':
- param[0]++;
- param[1]++;
+ case L_BRACE:
+ number = 0;
+ string++;
+ while (*string >= '0' && *string <= '9') {
+ number = number * 10 + *string - '0';
+ string++;
+ }
+ npush(number);
+ break;
+
+ case '+':
+ npush(npop() + npop());
+ break;
+
+ case '-':
+ y = npop();
+ x = npop();
+ npush(x - y);
+ break;
+
+ case '*':
+ npush(npop() * npop());
+ break;
+
+ case '/':
+ y = npop();
+ x = npop();
+ npush(y ? (x / y) : 0);
+ break;
+
+ case 'm':
+ y = npop();
+ x = npop();
+ npush(y ? (x % y) : 0);
+ break;
+
+ case 'A':
+ npush(npop() && npop());
+ break;
+
+ case 'O':
+ npush(npop() || npop());
+ break;
+
+ case '&':
+ npush(npop() & npop());
+ break;
+
+ case '|':
+ npush(npop() | npop());
+ break;
+
+ case '^':
+ npush(npop() ^ npop());
+ break;
+
+ case '=':
+ y = npop();
+ x = npop();
+ npush(x == y);
+ break;
+
+ case '<':
+ y = npop();
+ x = npop();
+ npush(x < y);
+ break;
+
+ case '>':
+ y = npop();
+ x = npop();
+ npush(x > y);
+ break;
+
+ case '!':
+ npush(!npop());
+ break;
+
+ case '~':
+ npush(~npop());
+ break;
+
+ case 'i':
+ if (p_is_s[0] == 0)
+ param[0]++;
+ if (p_is_s[1] == 0)
+ param[1]++;
+ break;
+
+ case '?':
+ break;
+
+ case 't':
+ x = npop();
+ if (!x) {
+ /* scan forward for %e or %; at level zero */
+ string++;
+ level = 0;
+ while (*string) {
+ if (*string == '%') {
+ string++;
+ if (*string == '?')
+ level++;
+ else if (*string == ';') {
+ if (level > 0)
+ level--;
+ else
+ break;
+ } else if (*string == 'e' && level == 0)
break;
+ }
- case '?':
- break;
+ if (*string)
+ string++;
+ }
+ }
+ break;
- case 't':
- x = npop();
- if (!x) {
- /* scan forward for %e or %; at level zero */
- string++;
- level = 0;
- while (*string) {
- if (*string == '%') {
- string++;
- if (*string == '?')
- level++;
- else if (*string == ';') {
- if (level > 0)
- level--;
- else
- break;
- }
- else if (*string == 'e' && level == 0)
- break;
- }
-
- if (*string)
- string++;
- }
- }
+ case 'e':
+ /* scan forward for a %; at level zero */
+ string++;
+ level = 0;
+ while (*string) {
+ if (*string == '%') {
+ string++;
+ if (*string == '?')
+ level++;
+ else if (*string == ';') {
+ if (level > 0)
+ level--;
+ else
break;
+ }
+ }
- case 'e':
- /* scan forward for a %; at level zero */
- string++;
- level = 0;
- while (*string) {
- if (*string == '%') {
- string++;
- if (*string == '?')
- level++;
- else if (*string == ';') {
- if (level > 0)
- level--;
- else
- break;
- }
- }
-
- if (*string)
- string++;
- }
- break;
+ if (*string)
+ string++;
+ }
+ break;
- case ';':
- break;
+ case ';':
+ break;
- } /* endswitch (*string) */
- } /* endelse (*string == '%') */
+ } /* endswitch (*string) */
+ } /* endelse (*string == '%') */
- if (*string == '\0')
- break;
+ if (*string == '\0')
+ break;
- string++;
- } /* endwhile (*string) */
+ string++;
+ } /* endwhile (*string) */
- if (out_buff == 0 && (out_buff = typeCalloc(char,1)) == NULL)
- return(NULL);
- out_buff[out_used] = '\0';
+ if (out_buff == 0 && (out_buff = typeCalloc(char, 1)) == NULL)
+ return (NULL);
+ out_buff[out_used] = '\0';
- T((T_RETURN("%s"), _nc_visbuf(out_buff)));
- return(out_buff);
+ T((T_RETURN("%s"), _nc_visbuf(out_buff)));
+ return (out_buff);
}
-char *tparm(NCURSES_CONST char *string, ...)
+char *
+tparm(NCURSES_CONST char *string,...)
{
-va_list ap;
-char *result;
+ va_list ap;
+ char *result;
- va_start(ap, string);
+ va_start(ap, string);
#ifdef TRACE
- tname = "tparm";
+ tname = "tparm";
#endif /* TRACE */
- result = tparam_internal(string, ap);
- va_end(ap);
- return result;
+ result = tparam_internal(string, ap);
+ va_end(ap);
+ return result;
}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_tputs.c b/contrib/ncurses/ncurses/tinfo/lib_tputs.c
index f17d8382e921..93eebf88691f 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_tputs.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_tputs.c
@@ -45,10 +45,10 @@
#include <termcap.h> /* ospeed */
#include <tic.h>
-MODULE_ID("$Id: lib_tputs.c,v 1.47 2000/05/27 23:08:41 tom Exp $")
+MODULE_ID("$Id: lib_tputs.c,v 1.51 2000/10/08 00:22:24 tom Exp $")
char PC = 0; /* used by termcap library */
-speed_t ospeed = 0; /* used by termcap library */
+short ospeed = 0; /* used by termcap library */
int _nc_nulls_sent = 0; /* used by 'tack' program */
@@ -78,7 +78,7 @@ delay_output(int ms)
void
_nc_flush(void)
{
- (void)fflush(NC_OUTPUT);
+ (void) fflush(NC_OUTPUT);
}
int
@@ -102,7 +102,7 @@ _nc_outch(int ch)
return OK;
}
-#ifdef USE_WIDEC_SUPPORT
+#if USE_WIDEC_SUPPORT
/*
* Reference: The Unicode Standard 2.0
*
@@ -120,20 +120,20 @@ _nc_utf8_outch(int ch)
int result[7], *ptr;
int count = 0;
- if (ch < 0x80)
+ if ((unsigned int) ch < 0x80)
count = 1;
- else if (ch < 0x800)
+ else if ((unsigned int) ch < 0x800)
count = 2;
- else if (ch < 0x10000)
+ else if ((unsigned int) ch < 0x10000)
count = 3;
- else if (ch < 0x200000)
+ else if ((unsigned int) ch < 0x200000)
count = 4;
- else if (ch < 0x4000000)
+ else if ((unsigned int) ch < 0x4000000)
count = 5;
- else if (ch <= 0x7FFFFFFF)
+ else if ((unsigned int) ch <= 0x7FFFFFFF)
count = 6;
else {
- count = 2;
+ count = 3;
ch = 0xFFFD;
}
ptr = result + count;
@@ -141,20 +141,26 @@ _nc_utf8_outch(int ch)
case 6:
*--ptr = (ch | otherMark) & byteMask;
ch >>= 6;
+ /* FALLTHRU */
case 5:
*--ptr = (ch | otherMark) & byteMask;
ch >>= 6;
+ /* FALLTHRU */
case 4:
*--ptr = (ch | otherMark) & byteMask;
ch >>= 6;
+ /* FALLTHRU */
case 3:
*--ptr = (ch | otherMark) & byteMask;
ch >>= 6;
+ /* FALLTHRU */
case 2:
*--ptr = (ch | otherMark) & byteMask;
ch >>= 6;
+ /* FALLTHRU */
case 1:
*--ptr = (ch | firstMark[count]);
+ break;
}
while (count--)
_nc_outch(*ptr++);
@@ -174,7 +180,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
bool always_delay;
bool normal_delay;
int number;
-#ifdef BSD_TPUTS
+#if BSD_TPUTS
int trailpad;
#endif /* BSD_TPUTS */
@@ -188,7 +194,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
(void) sprintf(addrbuf, "%p", outc);
if (_nc_tputs_trace) {
_tracef("tputs(%s = %s, %d, %s) called", _nc_tputs_trace,
- _nc_visbuf(string), affcnt, addrbuf);
+ _nc_visbuf(string), affcnt, addrbuf);
} else {
_tracef("tputs(%s, %d, %s) called", _nc_visbuf(string), affcnt, addrbuf);
}
@@ -207,13 +213,13 @@ tputs(const char *string, int affcnt, int (*outc) (int))
normal_delay =
!xon_xoff
&& padding_baud_rate
-#ifdef NCURSES_NO_PADDING
+#if NCURSES_NO_PADDING
&& (SP == 0 || !(SP->_no_padding))
#endif
&& (_nc_baudrate(ospeed) >= padding_baud_rate);
}
-#ifdef BSD_TPUTS
+#if BSD_TPUTS
/*
* This ugly kluge deals with the fact that some ancient BSD programs
* (like nethack) actually do the likes of tputs("50") to get delays.
@@ -304,7 +310,7 @@ tputs(const char *string, int affcnt, int (*outc) (int))
string++;
}
-#ifdef BSD_TPUTS
+#if BSD_TPUTS
/*
* Emit any BSD-style prefix padding that we've accumulated now.
*/
diff --git a/contrib/ncurses/ncurses/tinfo/parse_entry.c b/contrib/ncurses/ncurses/tinfo/parse_entry.c
index 1aff562d0dd6..24bf3c37f584 100644
--- a/contrib/ncurses/ncurses/tinfo/parse_entry.c
+++ b/contrib/ncurses/ncurses/tinfo/parse_entry.c
@@ -47,7 +47,7 @@
#define __INTERNAL_CAPS_VISIBLE
#include <term_entry.h>
-MODULE_ID("$Id: parse_entry.c,v 1.44 2000/04/30 00:17:42 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.48 2000/10/03 09:38:48 tom Exp $")
#ifdef LINT
static short const parametrized[] =
@@ -200,7 +200,7 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
{
int token_type;
struct name_table_entry const *entry_ptr;
- char *ptr, namecpy[MAX_NAME_SIZE + 1];
+ char *ptr, *base;
token_type = _nc_get_token();
@@ -235,22 +235,22 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
_nc_set_type(_nc_first_name(entryp->tterm.term_names));
/* check for overly-long names and aliases */
- (void) strncpy(namecpy, entryp->tterm.term_names, MAX_NAME_SIZE);
- namecpy[MAX_NAME_SIZE] = '\0';
- if ((ptr = strrchr(namecpy, '|')) != (char *) 0)
- *ptr = '\0';
- ptr = strtok(namecpy, "|");
- if (strlen(ptr) > MAX_ALIAS)
- _nc_warning("primary name may be too long");
- while ((ptr = strtok((char *) 0, "|")) != (char *) 0)
- if (strlen(ptr) > MAX_ALIAS)
- _nc_warning("alias `%s' may be too long", ptr);
+ for (base = entryp->tterm.term_names; (ptr = strchr(base, '|')) != 0;
+ base = ptr + 1) {
+ if (ptr - base > MAX_ALIAS) {
+ _nc_warning("%s `%.*s' may be too long",
+ (base == entryp->tterm.term_names)
+ ? "primary name"
+ : "alias",
+ ptr - base, base);
+ }
+ }
entryp->nuses = 0;
for (token_type = _nc_get_token();
- token_type != EOF && token_type != NAMES;
- token_type = _nc_get_token()) {
+ token_type != EOF && token_type != NAMES;
+ token_type = _nc_get_token()) {
if (strcmp(_nc_curr_token.tk_name, "use") == 0
|| strcmp(_nc_curr_token.tk_name, "tc") == 0) {
entryp->uses[entryp->nuses].name = _nc_save_str(_nc_curr_token.tk_valstring);
@@ -259,7 +259,7 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
} else {
/* normal token lookup */
entry_ptr = _nc_find_entry(_nc_curr_token.tk_name,
- _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table);
+ _nc_syntax ? _nc_cap_hash_table : _nc_info_hash_table);
/*
* Our kluge to handle aliasing. The reason it's done
@@ -277,14 +277,14 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
if (ap->to == (char *) 0) {
_nc_warning("%s (%s termcap extension) ignored",
- ap->from, ap->source);
+ ap->from, ap->source);
goto nexttok;
}
entry_ptr = _nc_find_entry(ap->to, _nc_cap_hash_table);
if (entry_ptr && !silent)
_nc_warning("%s (%s termcap extension) aliased to %s",
- ap->from, ap->source, ap->to);
+ ap->from, ap->source, ap->to);
break;
}
} else { /* if (_nc_syntax == SYN_TERMINFO) */
@@ -292,14 +292,14 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
if (strcmp(ap->from, _nc_curr_token.tk_name) == 0) {
if (ap->to == (char *) 0) {
_nc_warning("%s (%s terminfo extension) ignored",
- ap->from, ap->source);
+ ap->from, ap->source);
goto nexttok;
}
entry_ptr = _nc_find_entry(ap->to, _nc_info_hash_table);
if (entry_ptr && !silent)
_nc_warning("%s (%s terminfo extension) aliased to %s",
- ap->from, ap->source, ap->to);
+ ap->from, ap->source, ap->to);
break;
}
@@ -316,7 +316,8 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
if (entry_ptr == NOTFOUND
&& _nc_user_definable
&& (entry_ptr = _nc_extend_names(entryp,
- _nc_curr_token.tk_name, token_type)) != 0) {
+ _nc_curr_token.tk_name,
+ token_type)) != 0) {
if (_nc_tracing >= DEBUG_LEVEL(1))
_nc_warning("extended capability '%s'", _nc_curr_token.tk_name);
}
@@ -326,7 +327,7 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
if (entry_ptr == NOTFOUND) {
if (!silent)
_nc_warning("unknown capability '%s'",
- _nc_curr_token.tk_name);
+ _nc_curr_token.tk_name);
continue;
}
@@ -345,12 +346,14 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
/* tell max_attributes from arrow_key_map */
if (token_type == NUMBER && !strcmp("ma", _nc_curr_token.tk_name))
entry_ptr = _nc_find_type_entry("ma", NUMBER,
- _nc_get_table(_nc_syntax != 0));
+ _nc_get_table(_nc_syntax
+ != 0));
/* map terminfo's string MT to MT */
else if (token_type == STRING && !strcmp("MT", _nc_curr_token.tk_name))
entry_ptr = _nc_find_type_entry("MT", STRING,
- _nc_get_table(_nc_syntax != 0));
+ _nc_get_table(_nc_syntax
+ != 0));
/* treat strings without following "=" as empty strings */
else if (token_type == BOOLEAN && entry_ptr->nte_type == STRING)
@@ -374,7 +377,7 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
break;
}
_nc_warning("wrong type used for %s capability '%s'",
- type_name, _nc_curr_token.tk_name);
+ type_name, _nc_curr_token.tk_name);
}
continue;
}
@@ -411,8 +414,8 @@ _nc_parse_entry(struct entry *entryp, int literal, bool silent)
ptr = _nc_curr_token.tk_valstring;
if (_nc_syntax == SYN_TERMCAP)
ptr = _nc_captoinfo(_nc_curr_token.tk_name,
- ptr,
- parametrized[entry_ptr->nte_index]);
+ ptr,
+ parametrized[entry_ptr->nte_index]);
entryp->tterm.Strings[entry_ptr->nte_index] = _nc_save_str(ptr);
break;
@@ -479,14 +482,14 @@ _nc_capcmp(const char *s, const char *t)
if (s[0] == '$' && s[1] == '<') {
for (s += 2;; s++)
if (!(isdigit(*s) || *s == '.' || *s == '*' || *s == '/' ||
- *s == '>'))
+ *s == '>'))
break;
}
if (t[0] == '$' && t[1] == '<') {
for (t += 2;; t++)
if (!(isdigit(*t) || *t == '.' || *t == '*' || *t == '/' ||
- *t == '>'))
+ *t == '>'))
break;
}
@@ -503,6 +506,26 @@ _nc_capcmp(const char *s, const char *t)
}
}
+static void
+append_acs0(string_desc *dst, int code, int src)
+{
+ if (src != 0) {
+ char temp[3];
+ temp[0] = code;
+ temp[1] = src;
+ temp[2] = 0;
+ _nc_safe_strcat(dst, temp);
+ }
+}
+
+static void
+append_acs(string_desc *dst, int code, char *src)
+{
+ if (src != 0 && strlen(src) == 1) {
+ append_acs0(dst, code, *src);
+ }
+}
+
/*
* The ko capability, if present, consists of a comma-separated capability
* list. For each capability, we may assume there is a keycap that sends the
@@ -563,11 +586,11 @@ static const char C_HT[] = "\t";
#undef CUR
#define CUR tp->
-static
-void
+static void
postprocess_termcap(TERMTYPE * tp, bool has_base)
{
char buf[MAX_LINE * 2 + 2];
+ string_desc result;
/*
* TERMCAP DEFAULTS AND OBSOLETE-CAPABILITY TRANSLATIONS
@@ -632,17 +655,15 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
} else
newline = _nc_save_str(C_LF);
} else if (PRESENT(carriage_return) && PRESENT(scroll_forward)) {
- strncpy(buf, carriage_return, MAX_LINE - 2);
- buf[MAX_LINE - 1] = '\0';
- strncat(buf, scroll_forward, MAX_LINE - strlen(buf) - 1);
- buf[MAX_LINE] = '\0';
- newline = _nc_save_str(buf);
+ _nc_str_init(&result, buf, sizeof(buf));
+ if (_nc_safe_strcat(&result, carriage_return)
+ && _nc_safe_strcat(&result, scroll_forward))
+ newline = _nc_save_str(buf);
} else if (PRESENT(carriage_return) && PRESENT(cursor_down)) {
- strncpy(buf, carriage_return, MAX_LINE - 2);
- buf[MAX_LINE - 1] = '\0';
- strncat(buf, cursor_down, MAX_LINE - strlen(buf) - 1);
- buf[MAX_LINE] = '\0';
- newline = _nc_save_str(buf);
+ _nc_str_init(&result, buf, sizeof(buf));
+ if (_nc_safe_strcat(&result, carriage_return)
+ && _nc_safe_strcat(&result, cursor_down))
+ newline = _nc_save_str(buf);
}
}
}
@@ -695,7 +716,7 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
else {
if (tab && _nc_capcmp(tab, C_HT))
_nc_warning("hardware tabs with a non-^I tab string %s",
- _nc_visbuf(tab));
+ _nc_visbuf(tab));
else {
if (WANTED(tab))
tab = _nc_save_str(C_HT);
@@ -708,7 +729,8 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
* isn't from mytinfo...
*/
if (PRESENT(other_non_function_keys)) {
- char *dp, *cp = strtok(other_non_function_keys, ",");
+ char *base = other_non_function_keys;
+ char *bp, *cp, *dp;
struct name_table_entry const *from_ptr;
struct name_table_entry const *to_ptr;
assoc const *ap;
@@ -717,15 +739,21 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
/* we're going to use this for a special case later */
dp = strchr(other_non_function_keys, 'i');
- foundim = dp && dp[1] == 'm';
+ foundim = (dp != 0) && (dp[1] == 'm');
/* look at each comma-separated capability in the ko string... */
- do {
+ for (base = other_non_function_keys;
+ (cp = strchr(base, ',')) != 0;
+ base = cp + 1) {
+ size_t len = cp - base;
+
for (ap = ko_xlate; ap->from; ap++)
- if (strcmp(ap->from, cp) == 0)
+ if (len == strlen(ap->from)
+ && strncmp(ap->from, base, len) == 0)
break;
if (!ap->to) {
- _nc_warning("unknown capability `%s' in ko string", cp);
+ _nc_warning("unknown capability `%.*s' in ko string",
+ (int) len, base);
continue;
} else if (ap->to == CANCELLED_STRING) /* ignore it */
continue;
@@ -748,11 +776,11 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
* string; that's just an inefficiency.
*/
if (strcmp(
- tp->Strings[from_ptr->nte_index],
- tp->Strings[to_ptr->nte_index]) != 0)
+ tp->Strings[from_ptr->nte_index],
+ tp->Strings[to_ptr->nte_index]) != 0)
_nc_warning("%s (%s) already has an explicit value %s, ignoring ko",
- ap->to, ap->from,
- _nc_visbuf(tp->Strings[to_ptr->nte_index]));
+ ap->to, ap->from,
+ _nc_visbuf(tp->Strings[to_ptr->nte_index]));
continue;
}
@@ -760,22 +788,18 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
* The magic moment -- copy the mapped key string over,
* stripping out padding.
*/
- dp = buf2;
- for (cp = tp->Strings[from_ptr->nte_index]; *cp; cp++) {
- if (cp[0] == '$' && cp[1] == '<') {
- while (*cp && *cp != '>')
- if (!*cp)
- break;
- else
- ++cp;
+ for (dp = buf2, bp = tp->Strings[from_ptr->nte_index]; *bp; bp++) {
+ if (bp[0] == '$' && bp[1] == '<') {
+ while (*bp && *bp != '>') {
+ ++bp;
+ }
} else
- *dp++ = *cp;
+ *dp++ = *bp;
}
*dp++ = '\0';
tp->Strings[to_ptr->nte_index] = _nc_save_str(buf2);
- } while
- ((cp = strtok((char *) 0, ",")) != 0);
+ }
/*
* Note: ko=im and ko=ic both want to grab the `Insert'
@@ -812,74 +836,36 @@ postprocess_termcap(TERMTYPE * tp, bool has_base)
PRESENT(acs_hline) ||
PRESENT(acs_vline) ||
PRESENT(acs_plus)) {
- char buf2[MAX_TERMCAP_LENGTH], *bp = buf2;
-
- if (acs_chars) {
- (void) strcpy(bp, acs_chars);
- bp += strlen(bp);
- }
-
- if (acs_ulcorner && acs_ulcorner[1] == '\0') {
- *bp++ = 'l';
- *bp++ = *acs_ulcorner;
- }
- if (acs_llcorner && acs_llcorner[1] == '\0') {
- *bp++ = 'm';
- *bp++ = *acs_llcorner;
- }
- if (acs_urcorner && acs_urcorner[1] == '\0') {
- *bp++ = 'k';
- *bp++ = *acs_urcorner;
- }
- if (acs_lrcorner && acs_lrcorner[1] == '\0') {
- *bp++ = 'j';
- *bp++ = *acs_lrcorner;
- }
- if (acs_ltee && acs_ltee[1] == '\0') {
- *bp++ = 't';
- *bp++ = *acs_ltee;
- }
- if (acs_rtee && acs_rtee[1] == '\0') {
- *bp++ = 'u';
- *bp++ = *acs_rtee;
- }
- if (acs_btee && acs_btee[1] == '\0') {
- *bp++ = 'v';
- *bp++ = *acs_btee;
- }
- if (acs_ttee && acs_ttee[1] == '\0') {
- *bp++ = 'w';
- *bp++ = *acs_ttee;
- }
- if (acs_hline && acs_hline[1] == '\0') {
- *bp++ = 'q';
- *bp++ = *acs_hline;
- }
- if (acs_vline && acs_vline[1] == '\0') {
- *bp++ = 'x';
- *bp++ = *acs_vline;
- }
- if (acs_plus) {
- *bp++ = 'n';
- strcpy(bp, acs_plus);
- bp = buf2 + strlen(buf2);
- }
-
- if (bp != buf2) {
- *bp++ = '\0';
+ char buf2[MAX_TERMCAP_LENGTH];
+
+ _nc_str_init(&result, buf2, sizeof(buf2));
+ _nc_safe_strcat(&result, acs_chars);
+
+ append_acs (&result, 'j', acs_lrcorner);
+ append_acs (&result, 'k', acs_urcorner);
+ append_acs (&result, 'l', acs_ulcorner);
+ append_acs (&result, 'm', acs_llcorner);
+ append_acs (&result, 'n', acs_plus);
+ append_acs (&result, 'q', acs_hline);
+ append_acs (&result, 't', acs_ltee);
+ append_acs (&result, 'u', acs_rtee);
+ append_acs (&result, 'v', acs_btee);
+ append_acs (&result, 'w', acs_ttee);
+ append_acs (&result, 'x', acs_vline);
+
+ if (buf2[0]) {
acs_chars = _nc_save_str(buf2);
_nc_warning("acsc string synthesized from XENIX capabilities");
}
} else if (acs_chars == 0
- && enter_alt_charset_mode != 0
- && exit_alt_charset_mode != 0) {
+ && enter_alt_charset_mode != 0
+ && exit_alt_charset_mode != 0) {
acs_chars =
_nc_save_str("``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~");
}
}
-static
-void
+static void
postprocess_terminfo(TERMTYPE * tp)
{
/*
@@ -891,60 +877,25 @@ postprocess_terminfo(TERMTYPE * tp)
* Translate AIX forms characters.
*/
if (PRESENT(box_chars_1)) {
- char buf2[MAX_TERMCAP_LENGTH], *bp = buf2;
-
- if (acs_chars) {
- (void) strcpy(bp, acs_chars);
- bp += strlen(bp);
- }
-
- if (box_chars_1[0]) { /* ACS_ULCORNER */
- *bp++ = 'l';
- *bp++ = box_chars_1[0];
- }
- if (box_chars_1[1]) { /* ACS_HLINE */
- *bp++ = 'q';
- *bp++ = box_chars_1[1];
- }
- if (box_chars_1[2]) { /* ACS_URCORNER */
- *bp++ = 'k';
- *bp++ = box_chars_1[2];
- }
- if (box_chars_1[3]) { /* ACS_VLINE */
- *bp++ = 'x';
- *bp++ = box_chars_1[3];
- }
- if (box_chars_1[4]) { /* ACS_LRCORNER */
- *bp++ = 'j';
- *bp++ = box_chars_1[4];
- }
- if (box_chars_1[5]) { /* ACS_LLCORNER */
- *bp++ = 'm';
- *bp++ = box_chars_1[5];
- }
- if (box_chars_1[6]) { /* ACS_TTEE */
- *bp++ = 'w';
- *bp++ = box_chars_1[6];
- }
- if (box_chars_1[7]) { /* ACS_RTEE */
- *bp++ = 'u';
- *bp++ = box_chars_1[7];
- }
- if (box_chars_1[8]) { /* ACS_BTEE */
- *bp++ = 'v';
- *bp++ = box_chars_1[8];
- }
- if (box_chars_1[9]) { /* ACS_LTEE */
- *bp++ = 't';
- *bp++ = box_chars_1[9];
- }
- if (box_chars_1[10]) { /* ACS_PLUS */
- *bp++ = 'n';
- *bp++ = box_chars_1[10];
- }
-
- if (bp != buf2) {
- *bp++ = '\0';
+ char buf2[MAX_TERMCAP_LENGTH];
+ string_desc result;
+
+ _nc_str_init(&result, buf2, sizeof(buf2));
+ _nc_safe_strcat(&result, acs_chars);
+
+ append_acs0 (&result, 'l', box_chars_1[0]); /* ACS_ULCORNER */
+ append_acs0 (&result, 'q', box_chars_1[1]); /* ACS_HLINE */
+ append_acs0 (&result, 'k', box_chars_1[2]); /* ACS_URCORNER */
+ append_acs0 (&result, 'x', box_chars_1[3]); /* ACS_VLINE */
+ append_acs0 (&result, 'j', box_chars_1[4]); /* ACS_LRCORNER */
+ append_acs0 (&result, 'm', box_chars_1[5]); /* ACS_LLCORNER */
+ append_acs0 (&result, 'w', box_chars_1[6]); /* ACS_TTEE */
+ append_acs0 (&result, 'u', box_chars_1[7]); /* ACS_RTEE */
+ append_acs0 (&result, 'v', box_chars_1[8]); /* ACS_BTEE */
+ append_acs0 (&result, 't', box_chars_1[9]); /* ACS_LTEE */
+ append_acs0 (&result, 'n', box_chars_1[10]); /* ACS_PLUS */
+
+ if (buf2[0]) {
acs_chars = _nc_save_str(buf2);
_nc_warning("acsc string synthesized from AIX capabilities");
box_chars_1 = ABSENT_STRING;
@@ -963,8 +914,7 @@ postprocess_terminfo(TERMTYPE * tp)
* up in _nc_info_table, which is organized so that the nte_index fields are
* sorted, but the nte_type fields are not necessarily grouped together.
*/
-static
-struct name_table_entry const *
+static struct name_table_entry const *
lookup_fullname(const char *find)
{
int state = -1;
@@ -991,7 +941,7 @@ lookup_fullname(const char *find)
if (!strcmp(names[count], find)) {
struct name_table_entry const *entry_ptr = _nc_get_table(FALSE);
while (entry_ptr->nte_type != state
- || entry_ptr->nte_index != count)
+ || entry_ptr->nte_index != count)
entry_ptr++;
return entry_ptr;
}
diff --git a/contrib/ncurses/ncurses/tinfo/read_entry.c b/contrib/ncurses/ncurses/tinfo/read_entry.c
index 85dc3e0bf6e9..deef49859a3e 100644
--- a/contrib/ncurses/ncurses/tinfo/read_entry.c
+++ b/contrib/ncurses/ncurses/tinfo/read_entry.c
@@ -41,7 +41,7 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: read_entry.c,v 1.67 2000/03/11 12:35:45 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.69 2000/10/10 00:57:40 Todd.Miller Exp $")
#if !HAVE_TELL
#define tell(fd) 0 /* lseek() is POSIX, but not tell() - odd... */
@@ -79,7 +79,7 @@ _nc_tic_dir(const char *path)
if (path != 0) {
result = path;
have_tic_directory = TRUE;
- } else if (!have_tic_directory) {
+ } else if (!have_tic_directory && use_terminfo_vars()) {
char *envp;
if ((envp = getenv("TERMINFO")) != 0)
return _nc_tic_dir(envp);
@@ -176,9 +176,9 @@ read_termtype(int fd, TERMTYPE * ptr)
str_size = LOW_MSB(buf + 10);
TR(TRACE_DATABASE,
- ("TERMTYPE name_size=%d, bool=%d/%d, num=%d/%d str=%d/%d(%d)",
- name_size, bool_count, BOOLCOUNT, num_count, NUMCOUNT,
- str_count, STRCOUNT, str_size));
+ ("TERMTYPE name_size=%d, bool=%d/%d, num=%d/%d str=%d/%d(%d)",
+ name_size, bool_count, BOOLCOUNT, num_count, NUMCOUNT,
+ str_count, STRCOUNT, str_size));
if (name_size < 0
|| bool_count < 0
|| num_count < 0
@@ -281,19 +281,20 @@ read_termtype(int fd, TERMTYPE * ptr)
ptr->Strings = typeRealloc(char *, ptr->num_Strings, ptr->Strings);
TR(TRACE_DATABASE, ("extended header is %d/%d/%d(%d:%d)",
- ext_bool_count, ext_num_count, ext_str_count, ext_str_size, ext_str_limit));
+ ext_bool_count, ext_num_count, ext_str_count,
+ ext_str_size, ext_str_limit));
TR(TRACE_DATABASE, ("READ %d extended-booleans @%d",
- ext_bool_count, tell(fd)));
+ ext_bool_count, tell(fd)));
if ((ptr->ext_Booleans = ext_bool_count) != 0) {
if (read(fd, ptr->Booleans + BOOLCOUNT, (unsigned)
- ext_bool_count) != ext_bool_count)
+ ext_bool_count) != ext_bool_count)
return (0);
}
even_boundary(ext_bool_count);
TR(TRACE_DATABASE, ("READ %d extended-numbers @%d",
- ext_num_count, tell(fd)));
+ ext_num_count, tell(fd)));
if ((ptr->ext_Numbers = ext_num_count) != 0) {
if (!read_shorts(fd, buf, ext_num_count))
return (0);
@@ -307,7 +308,7 @@ read_termtype(int fd, TERMTYPE * ptr)
return (0);
TR(TRACE_DATABASE, ("READ %d bytes of extended-strings @%d",
- ext_str_limit, tell(fd)));
+ ext_str_limit, tell(fd)));
if (ext_str_limit) {
if ((ptr->ext_str_table = typeMalloc(char, ext_str_limit)) == 0)
@@ -319,20 +320,20 @@ read_termtype(int fd, TERMTYPE * ptr)
if ((ptr->ext_Strings = ext_str_count) != 0) {
TR(TRACE_DATABASE,
- ("Before computing extended-string capabilities str_count=%d, ext_str_count=%d",
- str_count, ext_str_count));
+ ("Before computing extended-string capabilities str_count=%d, ext_str_count=%d",
+ str_count, ext_str_count));
convert_strings(buf, ptr->Strings + str_count, ext_str_count,
- ext_str_limit, ptr->ext_str_table);
+ ext_str_limit, ptr->ext_str_table);
for (i = ext_str_count - 1; i >= 0; i--) {
TR(TRACE_DATABASE, ("MOVE from [%d:%d] %s",
- i, i + str_count,
- _nc_visbuf(ptr->Strings[i + str_count])));
+ i, i + str_count,
+ _nc_visbuf(ptr->Strings[i + str_count])));
ptr->Strings[i + STRCOUNT] = ptr->Strings[i + str_count];
if (VALID_STRING(ptr->Strings[i + STRCOUNT]))
base += (strlen(ptr->Strings[i + STRCOUNT]) + 1);
TR(TRACE_DATABASE, ("... to [%d] %s",
- i + STRCOUNT,
- _nc_visbuf(ptr->Strings[i + STRCOUNT])));
+ i + STRCOUNT,
+ _nc_visbuf(ptr->Strings[i + STRCOUNT])));
}
}
@@ -340,23 +341,23 @@ read_termtype(int fd, TERMTYPE * ptr)
if ((ptr->ext_Names = typeCalloc(char *, need)) == 0)
return (0);
TR(TRACE_DATABASE,
- ("ext_NAMES starting @%d in extended_strings, first = %s",
- base, _nc_visbuf(ptr->ext_str_table + base)));
+ ("ext_NAMES starting @%d in extended_strings, first = %s",
+ base, _nc_visbuf(ptr->ext_str_table + base)));
convert_strings(buf + (2 * ext_str_count), ptr->ext_Names, need,
- ext_str_limit, ptr->ext_str_table + base);
+ ext_str_limit, ptr->ext_str_table + base);
}
T(("...done reading terminfo bool %d(%d) num %d(%d) str %d(%d)",
- ptr->num_Booleans, ptr->ext_Booleans,
- ptr->num_Numbers, ptr->ext_Numbers,
- ptr->num_Strings, ptr->ext_Strings));
+ ptr->num_Booleans, ptr->ext_Booleans,
+ ptr->num_Numbers, ptr->ext_Numbers,
+ ptr->num_Strings, ptr->ext_Strings));
TR(TRACE_DATABASE, ("extend: num_Booleans:%d", ptr->num_Booleans));
} else
#endif /* NCURSES_XNAMES */
{
T(("...done reading terminfo bool %d num %d str %d",
- bool_count, num_count, str_count));
+ bool_count, num_count, str_count));
#if NCURSES_XNAMES
TR(TRACE_DATABASE, ("normal: num_Booleans:%d", ptr->num_Booleans));
#endif
@@ -398,7 +399,7 @@ _nc_read_file_entry(const char *const filename, TERMTYPE * ptr)
*/
static int
_nc_read_tic_entry(char *const filename,
- const char *const dir, const char *ttn, TERMTYPE * const tp)
+ const char *const dir, const char *ttn, TERMTYPE * const tp)
{
/* maximum safe length of terminfo root directory name */
#define MAX_TPATH (PATH_MAX - MAX_ALIAS - 6)
@@ -415,7 +416,7 @@ _nc_read_tic_entry(char *const filename,
*/
static int
_nc_read_terminfo_dirs(const char *dirs, char *const filename, const char *const
- ttn, TERMTYPE * const tp)
+ ttn, TERMTYPE * const tp)
{
char *list, *a;
const char *b;
@@ -471,19 +472,22 @@ _nc_read_entry(const char *const tn, char *const filename, TERMTYPE * const tp)
&& _nc_read_tic_entry(filename, _nc_tic_dir(0), ttn, tp) == 1)
return 1;
- if ((envp = getenv("TERMINFO")) != 0
- && _nc_read_tic_entry(filename, _nc_tic_dir(envp), ttn, tp) == 1)
- return 1;
+ if (use_terminfo_vars()) {
+ if ((envp = getenv("TERMINFO")) != 0
+ && _nc_read_tic_entry(filename, _nc_tic_dir(envp), ttn, tp) == 1)
+ return 1;
- if ((envp = _nc_home_terminfo()) != 0) {
- if (_nc_read_tic_entry(filename, envp, ttn, tp) == 1) {
- return (1);
+ /* this is an ncurses extension */
+ if ((envp = _nc_home_terminfo()) != 0) {
+ if (_nc_read_tic_entry(filename, envp, ttn, tp) == 1) {
+ return (1);
+ }
}
- }
- /* this is an ncurses extension */
- if ((envp = getenv("TERMINFO_DIRS")) != 0)
- return _nc_read_terminfo_dirs(envp, filename, ttn, tp);
+ /* this is an ncurses extension */
+ if ((envp = getenv("TERMINFO_DIRS")) != 0)
+ return _nc_read_terminfo_dirs(envp, filename, ttn, tp);
+ }
/* Try the system directory. Note that the TERMINFO_DIRS value, if
* defined by the configure script, begins with a ":", which will be
diff --git a/contrib/ncurses/ncurses/tinfo/read_termcap.c b/contrib/ncurses/ncurses/tinfo/read_termcap.c
index 26e72d403263..f74c5a1eb760 100644
--- a/contrib/ncurses/ncurses/tinfo/read_termcap.c
+++ b/contrib/ncurses/ncurses/tinfo/read_termcap.c
@@ -55,9 +55,9 @@
#include <tic.h>
#include <term_entry.h>
-MODULE_ID("$Id: read_termcap.c,v 1.47 2000/04/15 16:53:19 Todd.C.Miller Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.50 2000/10/10 00:56:46 Todd.Miller Exp $")
-#ifndef PURE_TERMINFO
+#if !PURE_TERMINFO
#ifdef __EMX__
#define is_pathname(s) ((((s) != 0) && ((s)[0] == '/')) \
@@ -81,7 +81,8 @@ MODULE_ID("$Id: read_termcap.c,v 1.47 2000/04/15 16:53:19 Todd.C.Miller Exp $")
#define _nc_cgetset cgetset
#else
static int _nc_cgetmatch(char *, const char *);
-static int _nc_getent(char **, unsigned *, int *, int, char **, int, const char *, int, char *);
+static int _nc_getent(char **, unsigned *, int *, int, char **, int, const char
+ *, int, char *);
static int _nc_nfcmp(const char *, char *);
/*-
@@ -257,15 +258,15 @@ _nc_cgetent(char **buf, int *oline, char **db_array, const char *name)
#define DOALLOC(size) typeRealloc(char, size, record)
static int
_nc_getent(
- char **cap, /* termcap-content */
- unsigned *len, /* length, needed for recursion */
- int *beginning, /* line-number at match */
- int in_array, /* index in 'db_array[] */
- char **db_array, /* list of files to search */
- int fd,
- const char *name,
- int depth,
- char *nfield)
+ char **cap, /* termcap-content */
+ unsigned *len, /* length, needed for recursion */
+ int *beginning, /* line-number at match */
+ int in_array, /* index in 'db_array[] */
+ char **db_array, /* list of files to search */
+ int fd,
+ const char *name,
+ int depth,
+ char *nfield)
{
register char *r_end, *rp;
int myfd = FALSE;
@@ -318,7 +319,7 @@ _nc_getent(
if (fd >= 0) {
(void) lseek(fd, (off_t) 0, SEEK_SET);
} else if ((_nc_access(db_array[current], R_OK) < 0)
- || (fd = open(db_array[current], O_RDONLY, 0)) < 0) {
+ || (fd = open(db_array[current], O_RDONLY, 0)) < 0) {
/* No error on unfound file. */
if (errno == ENOENT)
continue;
@@ -481,7 +482,7 @@ _nc_getent(
tcend = s;
iret = _nc_getent(&icap, &ilen, &oline, current, db_array, fd,
- tc, depth + 1, 0);
+ tc, depth + 1, 0);
newicap = icap; /* Put into a register. */
newilen = ilen;
if (iret != TC_SUCCESS) {
@@ -777,12 +778,13 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name)
char *pathvec[PVECSIZ]; /* to point to names in pathbuf */
char **pvec; /* holds usable tail of path vector */
char *termpath;
+ string_desc desc;
fname = pathvec;
pvec = pathvec;
tbuf = bp;
p = pathbuf;
- cp = getenv("TERMCAP");
+ cp = use_terminfo_vars() ? getenv("TERMCAP") : NULL;
/*
* TERMCAP can have one of two things in it. It can be the name of a file
@@ -793,22 +795,29 @@ _nc_tgetent(char *bp, char **sourcename, int *lineno, const char *name)
* instead. The path is found in the TERMPATH variable, or becomes
* "$HOME/.termcap /etc/termcap" if no TERMPATH exists.
*/
- if (!is_pathname(cp)) { /* no TERMCAP or it holds an entry */
+ _nc_str_init(&desc, pathbuf, sizeof(pathbuf));
+ if (cp == NULL) {
+ _nc_safe_strcpy(&desc, "/etc/termcap /usr/share/misc/termcap");
+ } else if (!is_pathname(cp)) { /* TERMCAP holds an entry */
if ((termpath = getenv("TERMPATH")) != 0) {
- strncpy(pathbuf, termpath, PBUFSIZ - 1);
+ _nc_safe_strcat(&desc, termpath);
} else {
- if ((home = getenv("HOME")) != 0 &&
- strlen(home) < PBUFSIZ) { /* setup path */
- p += strlen(home); /* path, looking in */
- strcpy(pathbuf, home); /* $HOME first */
- *p++ = '/';
- } /* if no $HOME look in current directory */
-#define MY_PATH_DEF ".termcap /etc/termcap /usr/share/misc/termcap"
- strncpy(p, MY_PATH_DEF, (size_t) (PBUFSIZ - (p - pathbuf) - 1));
+ char temp[PBUFSIZ];
+ temp[0] = 0;
+ if ((home = getenv("HOME")) != 0 && *home != '\0'
+ && strchr(home, ' ') == 0
+ && strlen(home) < sizeof(temp) - 10) { /* setup path */
+ sprintf(temp, "%s/", home); /* $HOME first */
+ }
+ /* if no $HOME look in current directory */
+ strcat(temp, ".termcap");
+ _nc_safe_strcat(&desc, temp);
+ _nc_safe_strcat(&desc, " /etc/termcap");
+ _nc_safe_strcat(&desc, " /usr/share/misc/termcap");
}
- } else /* user-defined name in TERMCAP */
- strncpy(pathbuf, cp, PBUFSIZ - 1); /* still can be tokenized */
- pathbuf[PBUFSIZ - 1] = '\0';
+ } else { /* user-defined name in TERMCAP */
+ _nc_safe_strcat(&desc, cp); /* still can be tokenized */
+ }
*fname++ = pathbuf; /* tokenize path into vector of names */
while (*++p) {
@@ -921,7 +930,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp)
static char *source;
static int lineno;
- if ((p = getenv("TERMCAP")) != 0
+ if (use_terminfo_vars() && (p = getenv("TERMCAP")) != 0
&& !is_pathname(p) && _nc_name_match(p, tn, "|:")) {
/* TERMCAP holds a termcap entry */
strncpy(tc, p, sizeof(tc) - 1);
@@ -971,7 +980,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp)
char pathbuf[PATH_MAX];
termpaths[filecount] = 0;
- if ((tc = getenv("TERMCAP")) != 0) {
+ if (use_terminfo_vars() && (tc = getenv("TERMCAP")) != 0) {
if (is_pathname(tc)) { /* interpret as a filename */
ADD_TC(tc, 0);
} else if (_nc_name_match(tc, tn, "|:")) { /* treat as a capability file */
@@ -1004,7 +1013,7 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE * const tp)
#define PRIVATE_CAP "%s/.termcap"
- if ((h = getenv("HOME")) != NULL
+ if ((h = getenv("HOME")) != NULL && *h != '\0'
&& (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) {
/* user's .termcap, if any, should override it */
(void) strcpy(envhome, h);
diff --git a/contrib/ncurses/ncurses/tinfo/strings.c b/contrib/ncurses/ncurses/tinfo/strings.c
new file mode 100644
index 000000000000..8198ec4050ad
--- /dev/null
+++ b/contrib/ncurses/ncurses/tinfo/strings.c
@@ -0,0 +1,139 @@
+/****************************************************************************
+ * Copyright (c) 2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey *
+ ****************************************************************************/
+
+/*
+** lib_mvcur.c
+**/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id")
+
+/****************************************************************************
+ * Useful string functions (especially for mvcur)
+ ****************************************************************************/
+
+#if !HAVE_STRSTR
+char *
+_nc_strstr(const char *haystack, const char *needle)
+{
+ size_t len1 = strlen(haystack);
+ size_t len2 = strlen(needle);
+ char *result = 0;
+
+ while ((len1 != 0) && (len1-- >= len2)) {
+ if (!strncmp(haystack, needle, len2)) {
+ result = haystack;
+ break;
+ }
+ haystack++;
+ }
+ return result;
+}
+#endif
+
+/*
+ * Initialize the descriptor so we can append to it.
+ */
+string_desc *
+_nc_str_init(string_desc * dst, char *src, size_t len)
+{
+ if (dst != 0) {
+ dst->s_head = src;
+ dst->s_tail = src;
+ dst->s_size = len - 1;
+ if (src != 0)
+ *src = 0;
+ }
+ return dst;
+}
+
+/*
+ * Initialize the descriptor for only tracking the amount of memory used.
+ */
+string_desc *
+_nc_str_null(string_desc * dst, size_t len)
+{
+ return _nc_str_init(dst, 0, len);
+}
+
+/*
+ * Copy a descriptor
+ */
+string_desc *
+_nc_str_copy(string_desc * dst, string_desc * src)
+{
+ *dst = *src;
+ return dst;
+}
+
+/*
+ * Replaces strcat into a fixed buffer, returning false on failure.
+ */
+bool
+_nc_safe_strcat(string_desc * dst, const char *src)
+{
+ if (src != 0) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+ if (dst->s_tail != 0) {
+ strcpy(dst->s_tail, src);
+ dst->s_tail += len;
+ }
+ dst->s_size -= len;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/*
+ * Replaces strcpy into a fixed buffer, returning false on failure.
+ */
+bool
+_nc_safe_strcpy(string_desc * dst, const char *src)
+{
+ if (src != 0) {
+ size_t len = strlen(src);
+
+ if (len < dst->s_size) {
+ if (dst->s_head != 0) {
+ strcpy(dst->s_head, src);
+ dst->s_tail = dst->s_head + len;
+ }
+ dst->s_size -= len;
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
diff --git a/contrib/ncurses/ncurses/tinfo/write_entry.c b/contrib/ncurses/ncurses/tinfo/write_entry.c
index 12aedd6e565c..af4b4fda2a3a 100644
--- a/contrib/ncurses/ncurses/tinfo/write_entry.c
+++ b/contrib/ncurses/ncurses/tinfo/write_entry.c
@@ -52,7 +52,7 @@
#define TRACE_OUT(p) /*nothing */
#endif
-MODULE_ID("$Id: write_entry.c,v 1.52 2000/03/11 12:23:42 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.53 2000/10/04 02:32:14 tom Exp $")
static int total_written;
@@ -116,10 +116,12 @@ _nc_set_writedir(char *dir)
const char *destination;
char actual[PATH_MAX];
+ if (dir == 0
+ && use_terminfo_vars())
+ dir = getenv("TERMINFO");
+
if (dir != 0)
(void) _nc_tic_dir(dir);
- else if (getenv("TERMINFO") != NULL)
- (void) _nc_tic_dir(getenv("TERMINFO"));
destination = _nc_tic_dir(0);
if (make_directory(destination) < 0) {
diff --git a/contrib/ncurses/ncurses/trace/lib_traceatr.c b/contrib/ncurses/ncurses/trace/lib_traceatr.c
index d9e007517f76..c65c584f8600 100644
--- a/contrib/ncurses/ncurses/trace/lib_traceatr.c
+++ b/contrib/ncurses/ncurses/trace/lib_traceatr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,27 +31,29 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
-
/*
* lib_traceatr.c - Tracing/Debugging routines (attributes)
*/
#include <curses.priv.h>
-#include <term.h> /* acs_chars */
+#include <term.h> /* acs_chars */
-MODULE_ID("$Id: lib_traceatr.c,v 1.28 1998/03/21 18:39:36 tom Exp $")
+MODULE_ID("$Id: lib_traceatr.c,v 1.30 2000/07/29 18:06:09 tom Exp $")
#define COLOR_OF(c) (c < 0 || c > 7 ? "default" : colors[c].name)
#ifdef TRACE
-char *_traceattr2(int bufnum, attr_t newmode)
+char *
+_traceattr2(int bufnum, attr_t newmode)
{
-char *buf = _nc_trace_buf(bufnum, BUFSIZ);
-char *tmp = buf;
-static const struct {unsigned int val; const char *name;}
-names[] =
+ char *buf = _nc_trace_buf(bufnum, BUFSIZ);
+ char *tmp = buf;
+ static const struct {
+ unsigned int val;
+ const char *name;
+ } names[] =
{
+ /* *INDENT-OFF* */
{ A_STANDOUT, "A_STANDOUT" },
{ A_UNDERLINE, "A_UNDERLINE" },
{ A_REVERSE, "A_REVERSE" },
@@ -64,9 +66,12 @@ names[] =
{ A_CHARTEXT, "A_CHARTEXT" },
{ A_NORMAL, "A_NORMAL" },
{ A_COLOR, "A_COLOR" },
+ /* *INDENT-ON* */
+
},
-colors[] =
+ colors[] =
{
+ /* *INDENT-OFF* */
{ COLOR_BLACK, "COLOR_BLACK" },
{ COLOR_RED, "COLOR_RED" },
{ COLOR_GREEN, "COLOR_GREEN" },
@@ -75,122 +80,125 @@ colors[] =
{ COLOR_MAGENTA, "COLOR_MAGENTA" },
{ COLOR_CYAN, "COLOR_CYAN" },
{ COLOR_WHITE, "COLOR_WHITE" },
+ /* *INDENT-ON* */
+
};
-size_t n;
-unsigned save_nc_tracing = _nc_tracing;
- _nc_tracing = 0;
-
- strcpy(tmp++, "{");
-
- for (n = 0; n < SIZEOF(names); n++) {
- if ((newmode & names[n].val) != 0) {
- if (buf[1] != '\0')
- strcat(tmp, "|");
- strcat(tmp, names[n].name);
- tmp += strlen(tmp);
-
- if (names[n].val == A_COLOR)
- {
- short pairnum = PAIR_NUMBER(newmode);
- short fg, bg;
-
- if (pair_content(pairnum, &fg, &bg) == OK)
- (void) sprintf(tmp,
- "{%d = {%s, %s}}",
- pairnum,
- COLOR_OF(fg),
- COLOR_OF(bg)
- );
- else
- (void) sprintf(tmp, "{%d}", pairnum);
- }
- }
- }
- if (AttrOf(newmode) == A_NORMAL) {
- if (buf[1] != '\0')
- strcat(tmp, "|");
- strcat(tmp, "A_NORMAL");
+ size_t n;
+ unsigned save_nc_tracing = _nc_tracing;
+ _nc_tracing = 0;
+
+ strcpy(tmp++, "{");
+
+ for (n = 0; n < SIZEOF(names); n++) {
+ if ((newmode & names[n].val) != 0) {
+ if (buf[1] != '\0')
+ strcat(tmp, "|");
+ strcat(tmp, names[n].name);
+ tmp += strlen(tmp);
+
+ if (names[n].val == A_COLOR) {
+ short pairnum = PAIR_NUMBER(newmode);
+ short fg, bg;
+
+ if (pair_content(pairnum, &fg, &bg) == OK)
+ (void) sprintf(tmp,
+ "{%d = {%s, %s}}",
+ pairnum,
+ COLOR_OF(fg),
+ COLOR_OF(bg)
+ );
+ else
+ (void) sprintf(tmp, "{%d}", pairnum);
+ }
}
+ }
+ if (AttrOf(newmode) == A_NORMAL) {
+ if (buf[1] != '\0')
+ strcat(tmp, "|");
+ strcat(tmp, "A_NORMAL");
+ }
- _nc_tracing = save_nc_tracing;
- return (strcat(buf,"}"));
+ _nc_tracing = save_nc_tracing;
+ return (strcat(buf, "}"));
}
-char *_traceattr(attr_t newmode)
+char *
+_traceattr(attr_t newmode)
{
- return _traceattr2(0, newmode);
+ return _traceattr2(0, newmode);
}
/* Trace 'int' return-values */
-attr_t _nc_retrace_attr_t(attr_t code)
+attr_t
+_nc_retrace_attr_t(attr_t code)
{
- T((T_RETURN("%s"), _traceattr(code)));
- return code;
+ T((T_RETURN("%s"), _traceattr(code)));
+ return code;
}
-char *_tracechtype2(int bufnum, chtype ch)
+char *
+_tracechtype2(int bufnum, chtype ch)
{
-char *buf = _nc_trace_buf(bufnum, BUFSIZ);
-char *found = 0;
+ char *buf = _nc_trace_buf(bufnum, BUFSIZ);
+ char *found = 0;
strcpy(buf, "{");
- if (ch & A_ALTCHARSET)
- {
- char *cp;
- static const struct {unsigned int val; const char *name;}
- names[] =
+ if (ch & A_ALTCHARSET) {
+ char *cp;
+ static const struct {
+ unsigned int val;
+ const char *name;
+ } names[] =
{
- {'l', "ACS_ULCORNER"}, /* upper left corner */
- {'m', "ACS_LLCORNER"}, /* lower left corner */
- {'k', "ACS_URCORNER"}, /* upper right corner */
- {'j', "ACS_LRCORNER"}, /* lower right corner */
- {'t', "ACS_LTEE"}, /* tee pointing right */
- {'u', "ACS_RTEE"}, /* tee pointing left */
- {'v', "ACS_BTEE"}, /* tee pointing up */
- {'w', "ACS_TTEE"}, /* tee pointing down */
- {'q', "ACS_HLINE"}, /* horizontal line */
- {'x', "ACS_VLINE"}, /* vertical line */
- {'n', "ACS_PLUS"}, /* large plus or crossover */
- {'o', "ACS_S1"}, /* scan line 1 */
- {'s', "ACS_S9"}, /* scan line 9 */
- {'`', "ACS_DIAMOND"}, /* diamond */
- {'a', "ACS_CKBOARD"}, /* checker board (stipple) */
- {'f', "ACS_DEGREE"}, /* degree symbol */
- {'g', "ACS_PLMINUS"}, /* plus/minus */
- {'~', "ACS_BULLET"}, /* bullet */
- {',', "ACS_LARROW"}, /* arrow pointing left */
- {'+', "ACS_RARROW"}, /* arrow pointing right */
- {'.', "ACS_DARROW"}, /* arrow pointing down */
- {'-', "ACS_UARROW"}, /* arrow pointing up */
- {'h', "ACS_BOARD"}, /* board of squares */
- {'i', "ACS_LANTERN"}, /* lantern symbol */
- {'0', "ACS_BLOCK"}, /* solid square block */
- {'p', "ACS_S3"}, /* scan line 3 */
- {'r', "ACS_S7"}, /* scan line 7 */
- {'y', "ACS_LEQUAL"}, /* less/equal */
- {'z', "ACS_GEQUAL"}, /* greater/equal */
- {'{', "ACS_PI"}, /* Pi */
- {'|', "ACS_NEQUAL"}, /* not equal */
- {'}', "ACS_STERLING"}, /* UK pound sign */
- {'\0',(char *)0}
+ /* *INDENT-OFF* */
+ { 'l', "ACS_ULCORNER" }, /* upper left corner */
+ { 'm', "ACS_LLCORNER" }, /* lower left corner */
+ { 'k', "ACS_URCORNER" }, /* upper right corner */
+ { 'j', "ACS_LRCORNER" }, /* lower right corner */
+ { 't', "ACS_LTEE" }, /* tee pointing right */
+ { 'u', "ACS_RTEE" }, /* tee pointing left */
+ { 'v', "ACS_BTEE" }, /* tee pointing up */
+ { 'w', "ACS_TTEE" }, /* tee pointing down */
+ { 'q', "ACS_HLINE" }, /* horizontal line */
+ { 'x', "ACS_VLINE" }, /* vertical line */
+ { 'n', "ACS_PLUS" }, /* large plus or crossover */
+ { 'o', "ACS_S1" }, /* scan line 1 */
+ { 's', "ACS_S9" }, /* scan line 9 */
+ { '`', "ACS_DIAMOND" }, /* diamond */
+ { 'a', "ACS_CKBOARD" }, /* checker board (stipple) */
+ { 'f', "ACS_DEGREE" }, /* degree symbol */
+ { 'g', "ACS_PLMINUS" }, /* plus/minus */
+ { '~', "ACS_BULLET" }, /* bullet */
+ { ',', "ACS_LARROW" }, /* arrow pointing left */
+ { '+', "ACS_RARROW" }, /* arrow pointing right */
+ { '.', "ACS_DARROW" }, /* arrow pointing down */
+ { '-', "ACS_UARROW" }, /* arrow pointing up */
+ { 'h', "ACS_BOARD" }, /* board of squares */
+ { 'i', "ACS_LANTERN" }, /* lantern symbol */
+ { '0', "ACS_BLOCK" }, /* solid square block */
+ { 'p', "ACS_S3" }, /* scan line 3 */
+ { 'r', "ACS_S7" }, /* scan line 7 */
+ { 'y', "ACS_LEQUAL" }, /* less/equal */
+ { 'z', "ACS_GEQUAL" }, /* greater/equal */
+ { '{', "ACS_PI" }, /* Pi */
+ { '|', "ACS_NEQUAL" }, /* not equal */
+ { '}', "ACS_STERLING" }, /* UK pound sign */
+ { '\0', (char *) 0 }
+ /* *INDENT-OFF* */
},
- *sp;
+ *sp;
- for (cp = acs_chars; cp[0] && cp[1]; cp += 2)
- {
- if (TextOf(cp[1]) == TextOf(ch))
- {
+ for (cp = acs_chars; cp[0] && cp[1]; cp += 2) {
+ if (TextOf(cp[1]) == TextOf(ch)) {
found = cp;
/* don't exit from loop - there may be redefinitions */
}
}
- if (found != 0)
- {
+ if (found != 0) {
ch = TextOf(*found);
for (sp = names; sp->val; sp++)
- if (sp->val == ch)
- {
+ if (sp->val == ch) {
(void) strcat(buf, sp->name);
ch &= ~A_ALTCHARSET;
break;
@@ -202,17 +210,31 @@ char *found = 0;
(void) strcat(buf, _tracechar(TextOf(ch)));
if (AttrOf(ch) != A_NORMAL)
- (void) sprintf(buf + strlen(buf), " | %s", _traceattr2(bufnum+20,AttrOf(ch)));
+ (void) sprintf(buf + strlen(buf), " | %s",
+ _traceattr2(bufnum + 20, AttrOf(ch)));
strcat(buf, "}");
- return(buf);
+ return (buf);
}
-char *_tracechtype(chtype ch)
+char *
+_tracechtype(chtype ch)
{
- return _tracechtype2(0, ch);
+ return _tracechtype2(0, ch);
}
+
+/* Trace 'chtype' return-values */
+attr_t
+_nc_retrace_chtype(attr_t code)
+{
+ T((T_RETURN("%s"), _tracechtype(code)));
+ return code;
+}
+
#else
-extern void _nc_lib_traceatr(void);
- void _nc_lib_traceatr(void) { }
+extern void _nc_lib_traceatr(void);
+void
+_nc_lib_traceatr(void)
+{
+}
#endif /* TRACE */
diff --git a/contrib/ncurses/ncurses/trace/lib_tracebits.c b/contrib/ncurses/ncurses/trace/lib_tracebits.c
index 6dbb2f793ad0..a8cb343be59f 100644
--- a/contrib/ncurses/ncurses/trace/lib_tracebits.c
+++ b/contrib/ncurses/ncurses/trace/lib_tracebits.c
@@ -34,9 +34,9 @@
#include <curses.priv.h>
#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_tracebits.c,v 1.5 2000/02/13 01:01:55 tom Exp $")
+MODULE_ID("$Id: lib_tracebits.c,v 1.7 2000/09/02 18:08:37 tom Exp $")
-#if defined(SVR4_TERMIO) && !defined(_POSIX_SOURCE)
+#if SVR4_TERMIO && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
@@ -153,30 +153,41 @@ _nc_tracebits(void)
lookup_bits(buf, cflags, "cflags", cur_term->Nttyb.c_cflag);
#if defined(CS5) && defined(CS8)
- switch (cur_term->Nttyb.c_cflag & CSIZE) {
-#if defined(CS5) && (CS5 != 0)
- case CS5:
- strcat(buf, "CS5 ");
- break;
-#endif
-#if defined(CS6) && (CS6 != 0)
- case CS6:
- strcat(buf, "CS6 ");
- break;
-#endif
-#if defined(CS7) && (CS7 != 0)
- case CS7:
- strcat(buf, "CS7 ");
- break;
-#endif
-#if defined(CS8) && (CS8 != 0)
- case CS8:
- strcat(buf, "CS8 ");
- break;
-#endif
- default:
- strcat(buf, "CSIZE? ");
- break;
+ {
+ static struct {
+ char *name;
+ int value;
+ } csizes[] = {
+ {
+ "CS5 ", CS5
+ },
+#ifdef CS6
+ {
+ "CS6 ", CS6
+ },
+#endif
+#ifdef CS7
+ {
+ "CS7 ", CS7
+ },
+#endif
+ {
+ "CS8 ", CS8
+ },
+ };
+ char *result = "CSIZE? ";
+ int value = (cur_term->Nttyb.c_cflag & CSIZE);
+ unsigned n;
+
+ if (value != 0) {
+ for (n = 0; n < SIZEOF(csizes); n++) {
+ if (csizes[n].value == value) {
+ result = csizes[n].name;
+ break;
+ }
+ }
+ }
+ strcat(buf, result);
}
#endif
diff --git a/contrib/ncurses/ncurses/tty/MKexpanded.sh b/contrib/ncurses/ncurses/tty/MKexpanded.sh
index b008becc4f07..e44f58343a5d 100755
--- a/contrib/ncurses/ncurses/tty/MKexpanded.sh
+++ b/contrib/ncurses/ncurses/tty/MKexpanded.sh
@@ -1,6 +1,6 @@
#! /bin/sh
##############################################################################
-# Copyright (c) 1998 Free Software Foundation, Inc. #
+# Copyright (c) 1998,2000 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -29,7 +29,7 @@
#
# Author: Thomas E. Dickey <dickey@clark.net> 1997
#
-# $Id: MKexpanded.sh,v 1.7 1998/11/11 20:15:39 Alexander.V.Lukyanov Exp $
+# $Id: MKexpanded.sh,v 1.9 2000/09/02 22:55:21 tom Exp $
#
# Script to generate 'expanded.c', a dummy source that contains functions
# corresponding to complex macros used in this library. By making functions,
@@ -54,7 +54,7 @@ cat <<EOF
/* generated by MKexpanded.sh */
#include <curses.priv.h>
#include <term.h>
-#ifdef NCURSES_EXPANDED
+#if NCURSES_EXPANDED
EOF
cat >$TMP <<EOF
@@ -76,10 +76,6 @@ void _nc_toggle_attr_off(attr_t *S, attr_t at)
{
toggle_attr_off(*S,at);
}
-int _nc_can_clear_with(chtype ch)
-{
- return can_clear_with(ch);
-}
int _nc_DelCharCost(int count)
{
return DelCharCost(count);
diff --git a/contrib/ncurses/ncurses/tty/lib_mvcur.c b/contrib/ncurses/ncurses/tty/lib_mvcur.c
index 190c59bd4a15..03abaffb4d84 100644
--- a/contrib/ncurses/ncurses/tty/lib_mvcur.c
+++ b/contrib/ncurses/ncurses/tty/lib_mvcur.c
@@ -152,9 +152,7 @@
#include <term.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_mvcur.c,v 1.67 2000/06/24 21:13:51 tom Exp $")
-
-#define STRLEN(s) (s != 0) ? strlen(s) : 0
+MODULE_ID("$Id: lib_mvcur.c,v 1.72 2000/10/08 00:58:25 tom Exp $")
#define CURRENT_ROW SP->_cursrow /* phys cursor row */
#define CURRENT_COLUMN SP->_curscol /* phys cursor column */
@@ -174,25 +172,6 @@ static float diff;
static int normalized_cost(const char *const cap, int affcnt);
-#if !HAVE_STRSTR
-char *
-_nc_strstr(const char *haystack, const char *needle)
-{
- size_t len1 = strlen(haystack);
- size_t len2 = strlen(needle);
- char *result = 0;
-
- while ((len1 != 0) && (len1-- >= len2)) {
- if (!strncmp(haystack, needle, len2)) {
- result = haystack;
- break;
- }
- haystack++;
- }
- return result;
-}
-#endif
-
/****************************************************************************
*
* Initialization/wrapup (including cost pre-computation)
@@ -205,7 +184,7 @@ trace_cost_of(const char *capname, const char *cap, int affcnt)
{
int result = _nc_msec_cost(cap, affcnt);
TR(TRACE_CHARPUT | TRACE_MOVE,
- ("CostOf %s %d %s", capname, result, _nc_visbuf(cap)));
+ ("CostOf %s %d %s", capname, result, _nc_visbuf(cap)));
return result;
}
#define CostOf(cap,affcnt) trace_cost_of(#cap,cap,affcnt);
@@ -215,7 +194,7 @@ trace_normalized_cost(const char *capname, const char *cap, int affcnt)
{
int result = normalized_cost(cap, affcnt);
TR(TRACE_CHARPUT | TRACE_MOVE,
- ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap)));
+ ("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap)));
return result;
}
#define NormalizedCost(cap,affcnt) trace_normalized_cost(#cap,cap,affcnt);
@@ -235,12 +214,12 @@ _nc_msec_cost(const char *const cap, int affcnt)
return (INFINITY);
else {
const char *cp;
- float cum_cost = 0;
+ float cum_cost = 0.0;
for (cp = cap; *cp; cp++) {
/* extract padding, either mandatory or required */
if (cp[0] == '$' && cp[1] == '<' && strchr(cp, '>')) {
- float number = 0;
+ float number = 0.0;
for (cp += 2; *cp != '>'; cp++) {
if (isdigit(*cp))
@@ -251,7 +230,7 @@ _nc_msec_cost(const char *const cap, int affcnt)
number += (*cp - '0') / 10.0;
}
-#ifdef NCURSES_NO_PADDING
+#if NCURSES_NO_PADDING
if (!(SP->_no_padding))
#endif
cum_cost += number * 10;
@@ -402,13 +381,8 @@ _nc_mvcur_init(void)
SP->_hpa_ch_cost = NormalizedCost(tparm(column_address, 23), 1);
SP->_cuf_ch_cost = NormalizedCost(tparm(parm_right_cursor, 23), 1);
SP->_inline_cost = min(SP->_cup_ch_cost,
- min(SP->_hpa_ch_cost,
- SP->_cuf_ch_cost));
-
- /* pre-compute some capability lengths */
- SP->_carriage_return_length = STRLEN(carriage_return);
- SP->_cursor_home_length = STRLEN(cursor_home);
- SP->_cursor_to_ll_length = STRLEN(cursor_to_ll);
+ min(SP->_hpa_ch_cost,
+ SP->_cuf_ch_cost));
/*
* If save_cursor is used within enter_ca_mode, we should not use it for
@@ -468,18 +442,17 @@ _nc_mvcur_wrap(void)
* Perform repeated-append, returning cost
*/
static inline int
-repeated_append(int total, int num, int repeat, char *dst, const char *src)
+repeated_append(string_desc * target, int total, int num, int repeat, const char *src)
{
- register size_t src_len = strlen(src);
- register size_t dst_len = STRLEN(dst);
-
- if ((dst_len + repeat * src_len) < OPT_SIZE - 1) {
- total += (num * repeat);
- if (dst) {
- dst += dst_len;
- while (repeat-- > 0) {
- (void) strcpy(dst, src);
- dst += src_len;
+ size_t need = repeat * strlen(src);
+
+ if (need < target->s_size) {
+ while (repeat-- > 0) {
+ if (_nc_safe_strcat(target, src)) {
+ total += num;
+ } else {
+ total = INFINITY;
+ break;
}
}
} else {
@@ -497,53 +470,51 @@ repeated_append(int total, int num, int repeat, char *dst, const char *src)
*/
#define LASTTAB(fr) ((fr > 0) ? ((fr - 1) / init_tabs) * init_tabs : -1)
-/* Note: we'd like to inline this for speed, but GNU C barfs on the attempt. */
-
static int
-relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw)
+relative_move(string_desc * target, int from_y, int from_x, int to_y, int
+ to_x, bool ovw)
/* move via local motions (cuu/cuu1/cud/cud1/cub1/cub/cuf1/cuf/vpa/hpa) */
{
+ string_desc save;
int n, vcost = 0, hcost = 0;
- if (result)
- result[0] = '\0';
+ (void) _nc_str_copy(&save, target);
if (to_y != from_y) {
vcost = INFINITY;
- if (row_address) {
- if (result)
- (void) strcpy(result, tparm(row_address, to_y));
+ if (row_address != 0
+ && _nc_safe_strcat(target, tparm(row_address, to_y))) {
vcost = SP->_vpa_cost;
}
if (to_y > from_y) {
n = (to_y - from_y);
- if (parm_down_cursor && SP->_cud_cost < vcost) {
- if (result)
- (void) strcpy(result, tparm(parm_down_cursor, n));
+ if (parm_down_cursor
+ && SP->_cud_cost < vcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_down_cursor, n))) {
vcost = SP->_cud_cost;
}
if (cursor_down && (n * SP->_cud1_cost < vcost)) {
- if (result)
- result[0] = '\0';
- vcost = repeated_append(0, SP->_cud1_cost, n, result, cursor_down);
+ vcost = repeated_append(_nc_str_copy(target, &save), 0,
+ SP->_cud1_cost, n, cursor_down);
}
} else { /* (to_y < from_y) */
n = (from_y - to_y);
- if (parm_up_cursor && SP->_cup_cost < vcost) {
- if (result)
- (void) strcpy(result, tparm(parm_up_cursor, n));
+ if (parm_up_cursor
+ && SP->_cup_cost < vcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_up_cursor, n))) {
vcost = SP->_cup_cost;
}
if (cursor_up && (n * SP->_cuu1_cost < vcost)) {
- if (result)
- result[0] = '\0';
- vcost = repeated_append(0, SP->_cuu1_cost, n, result, cursor_up);
+ vcost = repeated_append(_nc_str_copy(target, &save), 0,
+ SP->_cuu1_cost, n, cursor_up);
}
}
@@ -551,33 +522,34 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
return (INFINITY);
}
- if (result)
- result += strlen(result);
+ save = *target;
if (to_x != from_x) {
char str[OPT_SIZE];
+ string_desc check;
hcost = INFINITY;
- if (column_address) {
- if (result)
- (void) strcpy(result, tparm(column_address, to_x));
+ if (column_address
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(column_address, to_x))) {
hcost = SP->_hpa_cost;
}
if (to_x > from_x) {
n = to_x - from_x;
- if (parm_right_cursor && SP->_cuf_cost < hcost) {
- if (result)
- (void) strcpy(result, tparm(parm_right_cursor, n));
+ if (parm_right_cursor
+ && SP->_cuf_cost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_right_cursor, n))) {
hcost = SP->_cuf_cost;
}
if (cursor_right) {
int lhcost = 0;
- str[0] = '\0';
+ (void) _nc_str_init(&check, str, sizeof(str));
#if USE_HARD_TABS
/* use hard tabs, if we have them, to do as much as possible */
@@ -585,8 +557,8 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
int nxt, fr;
for (fr = from_x; (nxt = NEXTTAB(fr)) <= to_x; fr = nxt) {
- lhcost = repeated_append(lhcost, SP->_ht_cost, 1,
- str, tab);
+ lhcost = repeated_append(&check, lhcost,
+ SP->_ht_cost, 1, tab);
if (lhcost == INFINITY)
break;
}
@@ -597,7 +569,7 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
#endif /* USE_HARD_TABS */
#if defined(REAL_ATTR) && defined(WANT_CHAR)
-#ifdef BSD_TPUTS
+#if BSD_TPUTS
/*
* If we're allowing BSD-style padding in tputs, don't generate
* a string with a leading digit. Otherwise, that will be
@@ -606,6 +578,7 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
*/
if (ovw
&& n > 0
+ && n < (int) check.s_size
&& vcost == 0
&& str[0] == '\0'
&& isdigit(TextOf(WANT_CHAR(to_y, from_x))))
@@ -629,48 +602,47 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
}
}
if (ovw) {
- char *sp;
int i;
- sp = str + strlen(str);
-
for (i = 0; i < n; i++)
- *sp++ = WANT_CHAR(to_y, from_x + i);
- *sp = '\0';
+ *check.s_tail++ = WANT_CHAR(to_y, from_x + i);
+ *check.s_tail = '\0';
+ check.s_size -= n;
lhcost += n * SP->_char_padding;
} else
#endif /* defined(REAL_ATTR) && defined(WANT_CHAR) */
{
- lhcost = repeated_append(lhcost, SP->_cuf1_cost, n, str, cursor_right);
+ lhcost = repeated_append(&check, lhcost, SP->_cuf1_cost,
+ n, cursor_right);
}
- if (lhcost < hcost) {
- if (result)
- (void) strcpy(result, str);
+ if (lhcost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
hcost = lhcost;
}
}
} else { /* (to_x < from_x) */
n = from_x - to_x;
- if (parm_left_cursor && SP->_cub_cost < hcost) {
- if (result)
- (void) strcpy(result, tparm(parm_left_cursor, n));
+ if (parm_left_cursor
+ && SP->_cub_cost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save),
+ tparm(parm_left_cursor, n))) {
hcost = SP->_cub_cost;
}
if (cursor_left) {
int lhcost = 0;
- str[0] = '\0';
+ (void) _nc_str_init(&check, str, sizeof(str));
#if USE_HARD_TABS
if (init_tabs > 0 && back_tab) {
int nxt, fr;
for (fr = from_x; (nxt = LASTTAB(fr)) >= to_x; fr = nxt) {
- lhcost = repeated_append(lhcost, SP->_cbt_cost, 1,
- str, back_tab);
+ lhcost = repeated_append(&check, lhcost,
+ SP->_cbt_cost, 1, back_tab);
if (lhcost == INFINITY)
break;
}
@@ -679,11 +651,10 @@ relative_move(char *result, int from_y, int from_x, int to_y, int to_x, bool ovw
}
#endif /* USE_HARD_TABS */
- lhcost = repeated_append(lhcost, SP->_cub1_cost, n, str, cursor_left);
+ lhcost = repeated_append(&check, lhcost, SP->_cub1_cost, n, cursor_left);
- if (lhcost < hcost) {
- if (result)
- (void) strcpy(result, str);
+ if (lhcost < hcost
+ && _nc_safe_strcat(_nc_str_copy(target, &save), str)) {
hcost = lhcost;
}
}
@@ -712,7 +683,8 @@ static inline int
onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/* onscreen move from (yold, xold) to (ynew, xnew) */
{
- char use[OPT_SIZE], *sp;
+ string_desc result;
+ char buffer[OPT_SIZE];
int tactic = 0, newcost, usecost = INFINITY;
int t5_cr_cost;
@@ -722,11 +694,12 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
gettimeofday(&before, NULL);
#endif /* MAIN */
+#define NullResult _nc_str_null(&result, sizeof(buffer))
+#define InitResult _nc_str_init(&result, buffer, sizeof(buffer))
+
/* tactic #0: use direct cursor addressing */
- sp = tparm(SP->_address_cursor, ynew, xnew);
- if (sp) {
+ if (_nc_safe_strcpy(InitResult, tparm(SP->_address_cursor, ynew, xnew))) {
tactic = 0;
- (void) strcpy(use, sp);
usecost = SP->_cup_cost;
#if defined(TRACE) || defined(NCURSES_TEST)
@@ -756,7 +729,8 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
#ifndef NO_OPTIMIZE
/* tactic #1: use local movement */
if (yold != -1 && xold != -1
- && ((newcost = relative_move(NULL, yold, xold, ynew, xnew, ovw)) != INFINITY)
+ && ((newcost = relative_move(NullResult, yold, xold, ynew, xnew,
+ ovw)) != INFINITY)
&& newcost < usecost) {
tactic = 1;
usecost = newcost;
@@ -764,7 +738,8 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/* tactic #2: use carriage-return + local movement */
if (yold != -1 && carriage_return
- && ((newcost = relative_move(NULL, yold, 0, ynew, xnew, ovw)) != INFINITY)
+ && ((newcost = relative_move(NullResult, yold, 0, ynew, xnew, ovw))
+ != INFINITY)
&& SP->_cr_cost + newcost < usecost) {
tactic = 2;
usecost = SP->_cr_cost + newcost;
@@ -772,7 +747,7 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/* tactic #3: use home-cursor + local movement */
if (cursor_home
- && ((newcost = relative_move(NULL, 0, 0, ynew, xnew, ovw)) != INFINITY)
+ && ((newcost = relative_move(NullResult, 0, 0, ynew, xnew, ovw)) != INFINITY)
&& SP->_home_cost + newcost < usecost) {
tactic = 3;
usecost = SP->_home_cost + newcost;
@@ -780,8 +755,8 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/* tactic #4: use home-down + local movement */
if (cursor_to_ll
- && ((newcost = relative_move(NULL, screen_lines - 1, 0, ynew, xnew,
- ovw)) != INFINITY)
+ && ((newcost = relative_move(NullResult, screen_lines - 1, 0, ynew,
+ xnew, ovw)) != INFINITY)
&& SP->_ll_cost + newcost < usecost) {
tactic = 4;
usecost = SP->_ll_cost + newcost;
@@ -794,8 +769,8 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
t5_cr_cost = (xold > 0 ? SP->_cr_cost : 0);
if (auto_left_margin && !eat_newline_glitch
&& yold > 0 && cursor_left
- && ((newcost = relative_move(NULL, yold - 1, screen_columns - 1,
- ynew, xnew, ovw)) != INFINITY)
+ && ((newcost = relative_move(NullResult, yold - 1, screen_columns -
+ 1, ynew, xnew, ovw)) != INFINITY)
&& t5_cr_cost + SP->_cub1_cost + newcost < usecost) {
tactic = 5;
usecost = t5_cr_cost + SP->_cub1_cost + newcost;
@@ -804,32 +779,30 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
/*
* These cases are ordered by estimated relative frequency.
*/
+ if (tactic)
+ InitResult;
switch (tactic) {
case 1:
- (void) relative_move(use, yold, xold, ynew, xnew, ovw);
+ (void) relative_move(&result, yold, xold, ynew, xnew, ovw);
break;
case 2:
- (void) strcpy(use, carriage_return);
- (void) relative_move(use + SP->_carriage_return_length,
- yold, 0, ynew, xnew, ovw);
+ (void) _nc_safe_strcpy(&result, carriage_return);
+ (void) relative_move(&result, yold, 0, ynew, xnew, ovw);
break;
case 3:
- (void) strcpy(use, cursor_home);
- (void) relative_move(use + SP->_cursor_home_length,
- 0, 0, ynew, xnew, ovw);
+ (void) _nc_safe_strcpy(&result, cursor_home);
+ (void) relative_move(&result, 0, 0, ynew, xnew, ovw);
break;
case 4:
- (void) strcpy(use, cursor_to_ll);
- (void) relative_move(use + SP->_cursor_to_ll_length,
- screen_lines - 1, 0, ynew, xnew, ovw);
+ (void) _nc_safe_strcpy(&result, cursor_to_ll);
+ (void) relative_move(&result, screen_lines - 1, 0, ynew, xnew, ovw);
break;
case 5:
- use[0] = '\0';
if (xold > 0)
- (void) strcat(use, carriage_return);
- (void) strcat(use, cursor_left);
- (void) relative_move(use + strlen(use),
- yold - 1, screen_columns - 1, ynew, xnew, ovw);
+ (void) _nc_safe_strcat(&result, carriage_return);
+ (void) _nc_safe_strcat(&result, cursor_left);
+ (void) relative_move(&result, yold - 1, screen_columns - 1, ynew,
+ xnew, ovw);
break;
}
#endif /* !NO_OPTIMIZE */
@@ -840,14 +813,14 @@ onscreen_mvcur(int yold, int xold, int ynew, int xnew, bool ovw)
+ (after.tv_sec - before.tv_sec) * 1000000;
if (!profiling)
(void) fprintf(stderr,
- "onscreen: %d msec, %f 28.8Kbps char-equivalents\n",
- (int) diff, diff / 288);
+ "onscreen: %d msec, %f 28.8Kbps char-equivalents\n",
+ (int) diff, diff / 288);
#endif /* MAIN */
nonlocal:
if (usecost != INFINITY) {
TPUTS_TRACE("mvcur");
- tputs(use, 1, _nc_outch);
+ tputs(buffer, 1, _nc_outch);
return (OK);
} else
return (ERR);
@@ -951,7 +924,7 @@ _nc_outch(int ch)
}
char PC = 0; /* used by termcap library */
-speed_t ospeed = 0; /* used by termcap library */
+short ospeed = 0; /* used by termcap library */
int _nc_nulls_sent = 0; /* used by 'tack' program */
int
@@ -1009,7 +982,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
(void) puts("s[croll] n t b m -- display scrolling sequence");
(void)
printf("r[eload] -- reload terminal info for %s\n",
- termname());
+ termname());
(void)
puts("l[oad] <term> -- load terminal info for type <term>");
(void) puts("d[elete] <cap> -- delete named capability");
@@ -1030,8 +1003,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
gettimeofday(&after, NULL);
printf("\" (%ld msec)\n",
- (long) (after.tv_usec - before.tv_usec + (after.tv_sec -
- before.tv_sec) * 1000000));
+ (long) (after.tv_usec - before.tv_usec
+ + (after.tv_sec - before.tv_sec)
+ * 1000000));
} else if (sscanf(buf, "s %d %d %d %d", &fy, &fx, &ty, &tx) == 4) {
struct timeval before, after;
@@ -1042,8 +1016,9 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
gettimeofday(&after, NULL);
printf("\" (%ld msec)\n",
- (long) (after.tv_usec - before.tv_usec + (after.tv_sec -
- before.tv_sec) * 1000000));
+ (long) (after.tv_usec - before.tv_usec + (after.tv_sec -
+ before.tv_sec)
+ * 1000000));
} else if (buf[0] == 'r') {
(void) strcpy(tname, termname());
load_term();
@@ -1051,7 +1026,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
load_term();
} else if (sscanf(buf, "d %s", capname) == 1) {
struct name_table_entry const *np = _nc_find_entry(capname,
- _nc_info_hash_table);
+ _nc_info_hash_table);
if (np == NULL)
(void) printf("No such capability as \"%s\"\n", capname);
@@ -1061,19 +1036,19 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
cur_term->type.Booleans[np->nte_index] = FALSE;
(void)
printf("Boolean capability `%s' (%d) turned off.\n",
- np->nte_name, np->nte_index);
+ np->nte_name, np->nte_index);
break;
case NUMBER:
cur_term->type.Numbers[np->nte_index] = ABSENT_NUMERIC;
(void) printf("Number capability `%s' (%d) set to -1.\n",
- np->nte_name, np->nte_index);
+ np->nte_name, np->nte_index);
break;
case STRING:
cur_term->type.Strings[np->nte_index] = ABSENT_STRING;
(void) printf("String capability `%s' (%d) deleted.\n",
- np->nte_name, np->nte_index);
+ np->nte_name, np->nte_index);
break;
}
}
@@ -1110,7 +1085,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
* is winning.
*/
else if (sscanf(buf, "t %d", &n) == 1) {
- float cumtime = 0, perchar;
+ float cumtime = 0.0, perchar;
int speeds[] =
{2400, 9600, 14400, 19200, 28800, 38400, 0};
@@ -1148,7 +1123,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
perchar = cumtime / n;
(void) printf("%d moves (%ld chars) in %d msec, %f msec each:\n",
- n, xmits, (int) cumtime, perchar);
+ n, xmits, (int) cumtime, perchar);
for (i = 0; speeds[i]; i++) {
/*
@@ -1167,7 +1142,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
(void)
printf("%6d bps: %3.2f char-xmits overhead; total estimated time %15.2f\n",
- speeds[i], overhead, totalest);
+ speeds[i], overhead, totalest);
}
} else if (buf[0] == 'c') {
(void) printf("char padding: %d\n", SP->_char_padding);
diff --git a/contrib/ncurses/ncurses/tty/lib_tstp.c b/contrib/ncurses/ncurses/tty/lib_tstp.c
index d01a62f71487..512de68dc5ff 100644
--- a/contrib/ncurses/ncurses/tty/lib_tstp.c
+++ b/contrib/ncurses/ncurses/tty/lib_tstp.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -31,7 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-
/*
** lib_tstp.c
**
@@ -44,11 +43,11 @@
#include <signal.h>
#include <SigAction.h>
-#if defined(SVR4_ACTION) && !defined(_POSIX_SOURCE)
+#if SVR4_ACTION && !defined(_POSIX_SOURCE)
#define _POSIX_SOURCE
#endif
-MODULE_ID("$Id: lib_tstp.c,v 1.21 2000/05/20 23:28:56 tom Exp $")
+MODULE_ID("$Id: lib_tstp.c,v 1.22 2000/09/02 18:33:17 tom Exp $")
#if defined(SIGTSTP) && (HAVE_SIGACTION || HAVE_SIGVEC)
#define USE_SIGTSTP 1
@@ -100,151 +99,152 @@ MODULE_ID("$Id: lib_tstp.c,v 1.21 2000/05/20 23:28:56 tom Exp $")
*/
#if USE_SIGTSTP
-static void tstp(int dummy GCC_UNUSED)
+static void
+tstp(int dummy GCC_UNUSED)
{
- sigset_t mask, omask;
- sigaction_t act, oact;
+ sigset_t mask, omask;
+ sigaction_t act, oact;
#ifdef SIGTTOU
- int sigttou_blocked;
+ int sigttou_blocked;
#endif
- T(("tstp() called"));
-
- /*
- * The user may have changed the prog_mode tty bits, so save them.
- *
- * But first try to detect whether we still are in the foreground
- * process group - if not, an interactive shell may already have
- * taken ownership of the tty and modified the settings when our
- * parent was stopped before us, and we would likely pick up the
- * settings already modified by the shell.
- */
- if (SP != 0 && !SP->_endwin) /* don't do this if we're not in curses */
+ T(("tstp() called"));
+
+ /*
+ * The user may have changed the prog_mode tty bits, so save them.
+ *
+ * But first try to detect whether we still are in the foreground
+ * process group - if not, an interactive shell may already have
+ * taken ownership of the tty and modified the settings when our
+ * parent was stopped before us, and we would likely pick up the
+ * settings already modified by the shell.
+ */
+ if (SP != 0 && !SP->_endwin) /* don't do this if we're not in curses */
#if HAVE_TCGETPGRP
if (tcgetpgrp(STDIN_FILENO) == getpgrp())
#endif
def_prog_mode();
- /*
- * Block window change and timer signals. The latter
- * is because applications use timers to decide when
- * to repaint the screen.
- */
- (void)sigemptyset(&mask);
- (void)sigaddset(&mask, SIGALRM);
+ /*
+ * Block window change and timer signals. The latter
+ * is because applications use timers to decide when
+ * to repaint the screen.
+ */
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGALRM);
#if USE_SIGWINCH
- (void)sigaddset(&mask, SIGWINCH);
+ (void) sigaddset(&mask, SIGWINCH);
#endif
- (void)sigprocmask(SIG_BLOCK, &mask, &omask);
+ (void) sigprocmask(SIG_BLOCK, &mask, &omask);
#ifdef SIGTTOU
- sigttou_blocked = sigismember(&omask, SIGTTOU);
- if (!sigttou_blocked) {
- (void)sigemptyset(&mask);
- (void)sigaddset(&mask, SIGTTOU);
- (void)sigprocmask(SIG_BLOCK, &mask, NULL);
- }
+ sigttou_blocked = sigismember(&omask, SIGTTOU);
+ if (!sigttou_blocked) {
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGTTOU);
+ (void) sigprocmask(SIG_BLOCK, &mask, NULL);
+ }
#endif
- /*
- * End window mode, which also resets the terminal state to the
- * original (pre-curses) modes.
- */
- endwin();
+ /*
+ * End window mode, which also resets the terminal state to the
+ * original (pre-curses) modes.
+ */
+ endwin();
- /* Unblock SIGTSTP. */
- (void)sigemptyset(&mask);
- (void)sigaddset(&mask, SIGTSTP);
+ /* Unblock SIGTSTP. */
+ (void) sigemptyset(&mask);
+ (void) sigaddset(&mask, SIGTSTP);
#ifdef SIGTTOU
- if (!sigttou_blocked) {
- /* Unblock this too if it wasn't blocked on entry */
- (void)sigaddset(&mask, SIGTTOU);
- }
+ if (!sigttou_blocked) {
+ /* Unblock this too if it wasn't blocked on entry */
+ (void) sigaddset(&mask, SIGTTOU);
+ }
#endif
- (void)sigprocmask(SIG_UNBLOCK, &mask, NULL);
+ (void) sigprocmask(SIG_UNBLOCK, &mask, NULL);
- /* Now we want to resend SIGSTP to this process and suspend it */
- act.sa_handler = SIG_DFL;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
+ /* Now we want to resend SIGSTP to this process and suspend it */
+ act.sa_handler = SIG_DFL;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
#ifdef SA_RESTART
- act.sa_flags |= SA_RESTART;
+ act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
- sigaction(SIGTSTP, &act, &oact);
- kill(getpid(), SIGTSTP);
+ sigaction(SIGTSTP, &act, &oact);
+ kill(getpid(), SIGTSTP);
- /* Process gets suspended...time passes...process resumes */
+ /* Process gets suspended...time passes...process resumes */
- T(("SIGCONT received"));
- sigaction(SIGTSTP, &oact, NULL);
- flushinp();
+ T(("SIGCONT received"));
+ sigaction(SIGTSTP, &oact, NULL);
+ flushinp();
- /*
- * If the user modified the tty state while suspended, he wants
- * those changes to stick. So save the new "default" terminal state.
- */
- def_shell_mode();
+ /*
+ * If the user modified the tty state while suspended, he wants
+ * those changes to stick. So save the new "default" terminal state.
+ */
+ def_shell_mode();
- /*
- * This relies on the fact that doupdate() will restore the
- * program-mode tty state, and issue enter_ca_mode if need be.
- */
- doupdate();
+ /*
+ * This relies on the fact that doupdate() will restore the
+ * program-mode tty state, and issue enter_ca_mode if need be.
+ */
+ doupdate();
- /* Reset the signals. */
- (void)sigprocmask(SIG_SETMASK, &omask, NULL);
+ /* Reset the signals. */
+ (void) sigprocmask(SIG_SETMASK, &omask, NULL);
}
-#endif /* USE_SIGTSTP */
+#endif /* USE_SIGTSTP */
-static void cleanup(int sig)
+static void
+cleanup(int sig)
{
- static int nested;
-
- /*
- * Actually, doing any sort of I/O from within an signal handler is
- * "unsafe". But we'll _try_ to clean up the screen and terminal
- * settings on the way out.
- */
- if (!nested++
- && (sig == SIGINT
- || sig == SIGQUIT)) {
+ static int nested;
+
+ /*
+ * Actually, doing any sort of I/O from within an signal handler is
+ * "unsafe". But we'll _try_ to clean up the screen and terminal
+ * settings on the way out.
+ */
+ if (!nested++
+ && (sig == SIGINT
+ || sig == SIGQUIT)) {
#if HAVE_SIGACTION || HAVE_SIGVEC
- sigaction_t act;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
- act.sa_handler = SIG_IGN;
- if (sigaction(sig, &act, (sigaction_t *)0) == 0)
+ sigaction_t act;
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
+ act.sa_handler = SIG_IGN;
+ if (sigaction(sig, &act, (sigaction_t *) 0) == 0)
#else
- if (signal(sig, SIG_IGN) != SIG_ERR)
+ if (signal(sig, SIG_IGN) != SIG_ERR)
#endif
- {
- SCREEN *scan = _nc_screen_chain;
- while(scan)
- {
- if (SP != 0
- && SP->_ofp != 0
- && isatty(fileno(SP->_ofp))) {
- SP->_cleanup = TRUE;
- SP->_outch = _nc_outch;
- }
- set_term(scan);
- endwin();
- if (SP)
- SP->_endwin = FALSE; /* in case we have an atexit! */
- scan = scan->_next_screen;
- }
+ {
+ SCREEN *scan = _nc_screen_chain;
+ while (scan) {
+ if (SP != 0
+ && SP->_ofp != 0
+ && isatty(fileno(SP->_ofp))) {
+ SP->_cleanup = TRUE;
+ SP->_outch = _nc_outch;
}
+ set_term(scan);
+ endwin();
+ if (SP)
+ SP->_endwin = FALSE; /* in case we have an atexit! */
+ scan = scan->_next_screen;
+ }
}
- exit(EXIT_FAILURE);
+ }
+ exit(EXIT_FAILURE);
}
#if USE_SIGWINCH
-static void sigwinch(int sig GCC_UNUSED)
+static void
+sigwinch(int sig GCC_UNUSED)
{
SCREEN *scan = _nc_screen_chain;
- while(scan)
- {
+ while (scan) {
scan->_sig_winch = TRUE;
scan = scan->_next_screen;
}
@@ -256,38 +256,40 @@ static void sigwinch(int sig GCC_UNUSED)
* handler.
*/
#if HAVE_SIGACTION || HAVE_SIGVEC
-static int CatchIfDefault(int sig, sigaction_t *act)
+static int
+CatchIfDefault(int sig, sigaction_t * act)
{
- sigaction_t old_act;
+ sigaction_t old_act;
- if (sigaction(sig, (sigaction_t *)0, &old_act) == 0
- && (old_act.sa_handler == SIG_DFL
+ if (sigaction(sig, (sigaction_t *) 0, &old_act) == 0
+ && (old_act.sa_handler == SIG_DFL
#if USE_SIGWINCH
|| (sig == SIGWINCH && old_act.sa_handler == SIG_IGN)
#endif
- )) {
- (void)sigaction(sig, act, (sigaction_t *)0);
- return TRUE;
- }
- return FALSE;
+ )) {
+ (void) sigaction(sig, act, (sigaction_t *) 0);
+ return TRUE;
+ }
+ return FALSE;
}
#else
-static int CatchIfDefault(int sig, RETSIGTYPE (*handler)(int))
+static int
+CatchIfDefault(int sig, RETSIGTYPE(*handler) (int))
{
- void (*ohandler)(int);
+ void (*ohandler) (int);
- ohandler = signal(sig, SIG_IGN);
- if (ohandler == SIG_DFL
+ ohandler = signal(sig, SIG_IGN);
+ if (ohandler == SIG_DFL
#if USE_SIGWINCH
- || (sig == SIGWINCH && ohandler == SIG_IGN)
+ || (sig == SIGWINCH && ohandler == SIG_IGN)
#endif
) {
- signal(sig, handler);
- return TRUE;
- } else {
- signal(sig, ohandler);
- return FALSE;
- }
+ signal(sig, handler);
+ return TRUE;
+ } else {
+ signal(sig, ohandler);
+ return FALSE;
+ }
}
#endif
@@ -302,69 +304,63 @@ static int CatchIfDefault(int sig, RETSIGTYPE (*handler)(int))
* The XSI document implies that we shouldn't keep the SIGTSTP handler if
* the caller later changes its mind, but that doesn't seem correct.
*/
-void _nc_signal_handler(bool enable)
+void
+_nc_signal_handler(bool enable)
{
-#if USE_SIGTSTP /* Xenix 2.x doesn't have SIGTSTP, for example */
-static sigaction_t act, oact;
-static int ignore;
-
- if (!ignore)
- {
- if (!enable)
- {
- act.sa_handler = SIG_IGN;
- sigaction(SIGTSTP, &act, &oact);
- }
- else if (act.sa_handler)
- {
- sigaction(SIGTSTP, &oact, NULL);
- }
- else /*initialize */
- {
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
+#if USE_SIGTSTP /* Xenix 2.x doesn't have SIGTSTP, for example */
+ static sigaction_t act, oact;
+ static int ignore;
+
+ if (!ignore) {
+ if (!enable) {
+ act.sa_handler = SIG_IGN;
+ sigaction(SIGTSTP, &act, &oact);
+ } else if (act.sa_handler) {
+ sigaction(SIGTSTP, &oact, NULL);
+ } else { /*initialize */
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = 0;
#if USE_SIGWINCH
- act.sa_handler = sigwinch;
- CatchIfDefault(SIGWINCH, &act);
+ act.sa_handler = sigwinch;
+ CatchIfDefault(SIGWINCH, &act);
#endif
#ifdef SA_RESTART
- act.sa_flags |= SA_RESTART;
+ act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
- act.sa_handler = cleanup;
- CatchIfDefault(SIGINT, &act);
- CatchIfDefault(SIGTERM, &act);
+ act.sa_handler = cleanup;
+ CatchIfDefault(SIGINT, &act);
+ CatchIfDefault(SIGTERM, &act);
- act.sa_handler = tstp;
- if (!CatchIfDefault(SIGTSTP, &act))
- ignore = TRUE;
- }
+ act.sa_handler = tstp;
+ if (!CatchIfDefault(SIGTSTP, &act))
+ ignore = TRUE;
}
+ }
#else /* !USE_SIGTSTP */
- if (enable)
- {
+ if (enable) {
#if HAVE_SIGACTION || HAVE_SIGVEC
- static sigaction_t act;
- sigemptyset(&act.sa_mask);
+ static sigaction_t act;
+ sigemptyset(&act.sa_mask);
#if USE_SIGWINCH
- act.sa_handler = sigwinch;
- CatchIfDefault(SIGWINCH, &act);
+ act.sa_handler = sigwinch;
+ CatchIfDefault(SIGWINCH, &act);
#endif
#ifdef SA_RESTART
- act.sa_flags |= SA_RESTART;
+ act.sa_flags |= SA_RESTART;
#endif /* SA_RESTART */
- act.sa_handler = cleanup;
- CatchIfDefault(SIGINT, &act);
- CatchIfDefault(SIGTERM, &act);
+ act.sa_handler = cleanup;
+ CatchIfDefault(SIGINT, &act);
+ CatchIfDefault(SIGTERM, &act);
#else /* !(HAVE_SIGACTION || HAVE_SIGVEC) */
- CatchIfDefault(SIGINT, cleanup);
- CatchIfDefault(SIGTERM, cleanup);
+ CatchIfDefault(SIGINT, cleanup);
+ CatchIfDefault(SIGTERM, cleanup);
#if USE_SIGWINCH
- CatchIfDefault(SIGWINCH, sigwinch);
+ CatchIfDefault(SIGWINCH, sigwinch);
#endif
#endif /* !(HAVE_SIGACTION || HAVE_SIGVEC) */
- }
+ }
#endif /* !USE_SIGTSTP */
}
diff --git a/contrib/ncurses/ncurses/tty/lib_twait.c b/contrib/ncurses/ncurses/tty/lib_twait.c
index a21e2a16db0f..6d24d8ddc6cb 100644
--- a/contrib/ncurses/ncurses/tty/lib_twait.c
+++ b/contrib/ncurses/ncurses/tty/lib_twait.c
@@ -59,33 +59,34 @@
# endif
#endif
-MODULE_ID("$Id: lib_twait.c,v 1.37 2000/06/29 23:03:09 tom Exp $")
+MODULE_ID("$Id: lib_twait.c,v 1.39 2000/08/26 19:34:15 tom Exp $")
-static long _nc_gettime(bool first)
+static long
+_nc_gettime(bool first)
{
- long res;
+ long res;
#if HAVE_GETTIMEOFDAY
# define PRECISE_GETTIME 1
- static struct timeval t0;
- struct timeval t1;
- gettimeofday(&t1, (struct timezone *)0);
- if (first) {
- t0 = t1;
- }
- res = (t1.tv_sec - t0.tv_sec) * 1000
- + (t1.tv_usec - t0.tv_usec) / 1000;
+ static struct timeval t0;
+ struct timeval t1;
+ gettimeofday(&t1, (struct timezone *) 0);
+ if (first) {
+ t0 = t1;
+ }
+ res = (t1.tv_sec - t0.tv_sec) * 1000
+ + (t1.tv_usec - t0.tv_usec) / 1000;
#else
# define PRECISE_GETTIME 0
- static time_t t0;
- time_t t1 = time((time_t*)0);
- if (first) {
- t0 = t1;
- }
- res = (t1 - t0) * 1000;
+ static time_t t0;
+ time_t t1 = time((time_t *) 0);
+ if (first) {
+ t0 = t1;
+ }
+ res = (t1 - t0) * 1000;
#endif
- T(("%s time: %ld msec", first ? "get" : "elapsed", res));
- return res;
+ T(("%s time: %ld msec", first ? "get" : "elapsed", res));
+ return res;
}
/*
@@ -101,163 +102,164 @@ static long _nc_gettime(bool first)
* If the milliseconds given are -1, the wait blocks until activity on the
* descriptors.
*/
-int _nc_timed_wait(int mode, int milliseconds, int *timeleft)
+int
+_nc_timed_wait(int mode, int milliseconds, int *timeleft)
{
-int fd;
-int count;
+ int fd;
+ int count;
-int result;
+ int result;
#if USE_FUNC_POLL
-struct pollfd fds[2];
+ struct pollfd fds[2];
#elif defined(__BEOS__)
#elif HAVE_SELECT
-static fd_set set;
+ static fd_set set;
#endif
-long starttime, returntime;
+ long starttime, returntime;
- T(("start twait: %d milliseconds, mode: %d", milliseconds, mode));
+ T(("start twait: %d milliseconds, mode: %d", milliseconds, mode));
#if PRECISE_GETTIME
-retry:
+ retry:
#endif
- starttime = _nc_gettime(TRUE);
+ starttime = _nc_gettime(TRUE);
- count = 0;
+ count = 0;
#if USE_FUNC_POLL
- if (mode & 1) {
- fds[count].fd = SP->_ifd;
- fds[count].events = POLLIN;
- count++;
- }
- if ((mode & 2)
- && (fd = SP->_mouse_fd) >= 0) {
- fds[count].fd = fd;
- fds[count].events = POLLIN;
- count++;
- }
- result = poll(fds, count, milliseconds);
+ memset(fds, 0, sizeof(fds));
+ if (mode & 1) {
+ fds[count].fd = SP->_ifd;
+ fds[count].events = POLLIN;
+ count++;
+ }
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0) {
+ fds[count].fd = fd;
+ fds[count].events = POLLIN;
+ count++;
+ }
+ result = poll(fds, count, milliseconds);
#elif defined(__BEOS__)
- /*
- * BeOS's select() is declared in socket.h, so the configure script does
- * not see it. That's just as well, since that function works only for
- * sockets. This (using snooze and ioctl) was distilled from Be's patch
- * for ncurses which uses a separate thread to simulate select().
- *
- * FIXME: the return values from the ioctl aren't very clear if we get
- * interrupted.
- */
- result = 0;
- if (mode & 1) {
- bigtime_t d;
- bigtime_t useconds = milliseconds * 1000;
- int n, howmany;
+ /*
+ * BeOS's select() is declared in socket.h, so the configure script does
+ * not see it. That's just as well, since that function works only for
+ * sockets. This (using snooze and ioctl) was distilled from Be's patch
+ * for ncurses which uses a separate thread to simulate select().
+ *
+ * FIXME: the return values from the ioctl aren't very clear if we get
+ * interrupted.
+ */
+ result = 0;
+ if (mode & 1) {
+ bigtime_t d;
+ bigtime_t useconds = milliseconds * 1000;
+ int n, howmany;
- if (useconds == 0) /* we're here to go _through_ the loop */
- useconds = 1;
+ if (useconds == 0) /* we're here to go _through_ the loop */
+ useconds = 1;
- for (d = 0; d < useconds; d += 5000) {
- n = 0;
- howmany = ioctl(0, 'ichr', &n);
- if (howmany >= 0 && n > 0) {
- result = 1;
- break;
- }
- if (useconds > 1)
- snooze(5000);
- milliseconds -= 5;
- }
- } else if (milliseconds > 0) {
- snooze(milliseconds * 1000);
- milliseconds = 0;
+ for (d = 0; d < useconds; d += 5000) {
+ n = 0;
+ howmany = ioctl(0, 'ichr', &n);
+ if (howmany >= 0 && n > 0) {
+ result = 1;
+ break;
+ }
+ if (useconds > 1)
+ snooze(5000);
+ milliseconds -= 5;
}
+ } else if (milliseconds > 0) {
+ snooze(milliseconds * 1000);
+ milliseconds = 0;
+ }
#elif HAVE_SELECT
- /*
- * select() modifies the fd_set arguments; do this in the
- * loop.
- */
- FD_ZERO(&set);
+ /*
+ * select() modifies the fd_set arguments; do this in the
+ * loop.
+ */
+ FD_ZERO(&set);
- if (mode & 1) {
- FD_SET(SP->_ifd, &set);
- count = SP->_ifd + 1;
- }
- if ((mode & 2)
- && (fd = SP->_mouse_fd) >= 0) {
- FD_SET(fd, &set);
- count = max(fd, count) + 1;
- }
+ if (mode & 1) {
+ FD_SET(SP->_ifd, &set);
+ count = SP->_ifd + 1;
+ }
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0) {
+ FD_SET(fd, &set);
+ count = max(fd, count) + 1;
+ }
- if (milliseconds >= 0) {
- struct timeval ntimeout;
- ntimeout.tv_sec = milliseconds / 1000;
- ntimeout.tv_usec = (milliseconds % 1000) * 1000;
- result = select(count, &set, NULL, NULL, &ntimeout);
- } else {
- result = select(count, &set, NULL, NULL, NULL);
- }
+ if (milliseconds >= 0) {
+ struct timeval ntimeout;
+ ntimeout.tv_sec = milliseconds / 1000;
+ ntimeout.tv_usec = (milliseconds % 1000) * 1000;
+ result = select(count, &set, NULL, NULL, &ntimeout);
+ } else {
+ result = select(count, &set, NULL, NULL, NULL);
+ }
#endif
- returntime = _nc_gettime(FALSE);
+ returntime = _nc_gettime(FALSE);
- if (milliseconds >= 0)
- milliseconds -= (returntime - starttime);
+ if (milliseconds >= 0)
+ milliseconds -= (returntime - starttime);
#if PRECISE_GETTIME
- /*
- * If the timeout hasn't expired, and we've gotten no data,
- * this is probably a system where 'select()' needs to be left
- * alone so that it can complete. Make this process sleep,
- * then come back for more.
- */
- if (result == 0 && milliseconds > 100) {
- napms(100);
- milliseconds -= 100;
- goto retry;
- }
+ /*
+ * If the timeout hasn't expired, and we've gotten no data,
+ * this is probably a system where 'select()' needs to be left
+ * alone so that it can complete. Make this process sleep,
+ * then come back for more.
+ */
+ if (result == 0 && milliseconds > 100) {
+ napms(100);
+ milliseconds -= 100;
+ goto retry;
+ }
#endif
- /* return approximate time left in milliseconds */
- if (timeleft)
- *timeleft = milliseconds;
+ /* return approximate time left in milliseconds */
+ if (timeleft)
+ *timeleft = milliseconds;
- T(("end twait: returned %d (%d), remaining time %d msec",
- result, errno, milliseconds));
+ T(("end twait: returned %d (%d), remaining time %d msec",
+ result, errno, milliseconds));
- /*
- * Both 'poll()' and 'select()' return the number of file descriptors
- * that are active. Translate this back to the mask that denotes which
- * file-descriptors, so that we don't need all of this system-specific
- * code everywhere.
- */
- if (result != 0) {
- if (result > 0) {
- result = 0;
+ /*
+ * Both 'poll()' and 'select()' return the number of file descriptors
+ * that are active. Translate this back to the mask that denotes which
+ * file-descriptors, so that we don't need all of this system-specific
+ * code everywhere.
+ */
+ if (result != 0) {
+ if (result > 0) {
+ result = 0;
#if USE_FUNC_POLL
- for (count = 0; count < 2; count++) {
- if ((mode & (1 << count))
- && (fds[count].revents & POLLIN)) {
- result |= (1 << count);
- }
- }
+ for (count = 0; count < 2; count++) {
+ if ((mode & (1 << count))
+ && (fds[count].revents & POLLIN)) {
+ result |= (1 << count);
+ }
+ }
#elif defined(__BEOS__)
- result = 1; /* redundant, but simple */
+ result = 1; /* redundant, but simple */
#elif HAVE_SELECT
- if ((mode & 2)
- && (fd = SP->_mouse_fd) >= 0
- && FD_ISSET(fd, &set))
- result |= 2;
- if ((mode & 1)
- && FD_ISSET(SP->_ifd, &set))
- result |= 1;
+ if ((mode & 2)
+ && (fd = SP->_mouse_fd) >= 0
+ && FD_ISSET(fd, &set))
+ result |= 2;
+ if ((mode & 1)
+ && FD_ISSET(SP->_ifd, &set))
+ result |= 1;
#endif
- }
- else
- result = 0;
- }
+ } else
+ result = 0;
+ }
- return (result);
+ return (result);
}
diff --git a/contrib/ncurses/ncurses/tty/lib_vidattr.c b/contrib/ncurses/ncurses/tty/lib_vidattr.c
index 7cff22ec4b43..5022cbdde78a 100644
--- a/contrib/ncurses/ncurses/tty/lib_vidattr.c
+++ b/contrib/ncurses/ncurses/tty/lib_vidattr.c
@@ -64,7 +64,7 @@
#include <curses.priv.h>
#include <term.h>
-MODULE_ID("$Id: lib_vidattr.c,v 1.27 2000/04/29 23:25:27 tom Exp $")
+MODULE_ID("$Id: lib_vidattr.c,v 1.33 2000/10/09 22:45:29 tom Exp $")
#define doPut(mode) TPUTS_TRACE(#mode); tputs(mode, 1, outc)
@@ -78,7 +78,7 @@ MODULE_ID("$Id: lib_vidattr.c,v 1.27 2000/04/29 23:25:27 tom Exp $")
#define SetColorsIf(why,old_attr) \
if (can_color && (why)) { \
int old_pair = PAIR_NUMBER(old_attr); \
- T(("old pair = %d -- new pair = %d", old_pair, pair)); \
+ TR(TRACE_ATTRS, ("old pair = %d -- new pair = %d", old_pair, pair)); \
if ((pair != old_pair) \
|| (fix_pair0 && (pair == 0)) \
|| (reverse ^ ((old_attr & A_REVERSE) != 0))) { \
@@ -95,7 +95,7 @@ vidputs(attr_t newmode, int (*outc) (int))
bool reverse = FALSE;
bool used_ncv = FALSE;
bool can_color = (SP == 0 || SP->_coloron);
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
bool fix_pair0 = (SP != 0 && SP->_coloron && !SP->_default_color);
#else
#define fix_pair0 FALSE
@@ -107,7 +107,7 @@ vidputs(attr_t newmode, int (*outc) (int))
if (SP)
previous_attr = SP->_current_attr;
- T(("previous attribute was %s", _traceattr(previous_attr)));
+ TR(TRACE_ATTRS, ("previous attribute was %s", _traceattr(previous_attr)));
#if !USE_XMC_SUPPORT
if ((SP != 0)
@@ -120,36 +120,29 @@ vidputs(attr_t newmode, int (*outc) (int))
* attributes, use the colors in preference.
*/
if (((newmode & A_COLOR) != 0
- || fix_pair0)
+ || fix_pair0)
&& (no_color_video > 0)) {
- /* *INDENT-OFF* */
- static const struct {
- attr_t video;
- unsigned bit;
- } table[] = {
- { A_STANDOUT, 1 },
- { A_UNDERLINE, 2 },
- { A_REVERSE, 4 },
- { A_BLINK, 8 },
- { A_DIM, 16 },
- { A_BOLD, 32 },
- { A_INVIS, 64 },
- { A_PROTECT, 128 },
- { A_ALTCHARSET, 256 },
- };
- /* *INDENT-ON* */
-
- size_t n;
- for (n = 0; n < SIZEOF(table); n++) {
- if ((table[n].bit & no_color_video)
- && (table[n].video & newmode)) {
- used_ncv = TRUE;
- if (table[n].video == A_REVERSE)
- reverse = TRUE;
- else
- newmode &= ~table[n].video;
- }
+ /*
+ * If we had chosen the A_xxx definitions to correspond to the
+ * no_color_video mask, we could simply shift it up and mask off the
+ * attributes. But we did not (actually copied Solaris' definitions).
+ * However, this is still simpler/faster than a lookup table.
+ *
+ * The 63 corresponds to A_STANDOUT, A_UNDERLINE, A_REVERSE, A_BLINK,
+ * A_DIM, A_BOLD which are 1:1 with no_color_video. The bits that
+ * correspond to A_INVIS, A_PROTECT (192) must be shifted up 1 and
+ * A_ALTCHARSET (256) down 2 to line up. We use the NCURSES_BITS
+ * macro so this will work properly for the wide-character layout.
+ */
+ attr_t mask = NCURSES_BITS((no_color_video & 63)
+ | ((no_color_video & 192) << 1)
+ | ((no_color_video & 256) >> 2), 8);
+
+ if (mask & A_REVERSE && newmode & A_REVERSE) {
+ reverse = TRUE;
+ mask &= ~A_REVERSE;
}
+ newmode &= ~mask;
}
if (newmode == previous_attr)
@@ -172,7 +165,16 @@ vidputs(attr_t newmode, int (*outc) (int))
previous_attr &= ~A_ALTCHARSET;
}
if (previous_attr) {
- doPut(exit_attribute_mode);
+ if (exit_attribute_mode) {
+ doPut(exit_attribute_mode);
+ } else {
+ if (!SP || SP->_use_rmul) {
+ TurnOff(A_UNDERLINE, exit_underline_mode);
+ }
+ if (!SP || SP->_use_rmso) {
+ TurnOff(A_STANDOUT, exit_standout_mode);
+ }
+ }
previous_attr &= ~A_COLOR;
}
@@ -181,21 +183,21 @@ vidputs(attr_t newmode, int (*outc) (int))
if (turn_on || turn_off) {
TPUTS_TRACE("set_attributes");
tputs(tparm(set_attributes,
- (newmode & A_STANDOUT) != 0,
- (newmode & A_UNDERLINE) != 0,
- (newmode & A_REVERSE) != 0,
- (newmode & A_BLINK) != 0,
- (newmode & A_DIM) != 0,
- (newmode & A_BOLD) != 0,
- (newmode & A_INVIS) != 0,
- (newmode & A_PROTECT) != 0,
- (newmode & A_ALTCHARSET) != 0), 1, outc);
+ (newmode & A_STANDOUT) != 0,
+ (newmode & A_UNDERLINE) != 0,
+ (newmode & A_REVERSE) != 0,
+ (newmode & A_BLINK) != 0,
+ (newmode & A_DIM) != 0,
+ (newmode & A_BOLD) != 0,
+ (newmode & A_INVIS) != 0,
+ (newmode & A_PROTECT) != 0,
+ (newmode & A_ALTCHARSET) != 0), 1, outc);
previous_attr &= ~A_COLOR;
}
SetColorsIf((pair != 0) || fix_pair0, previous_attr);
} else {
- T(("turning %s off", _traceattr(turn_off)));
+ TR(TRACE_ATTRS, ("turning %s off", _traceattr(turn_off)));
TurnOff(A_ALTCHARSET, exit_alt_charset_mode);
@@ -214,7 +216,7 @@ vidputs(attr_t newmode, int (*outc) (int))
}
SetColorsIf((pair != 0) || fix_pair0, previous_attr);
- T(("turning %s on", _traceattr(turn_on)));
+ TR(TRACE_ATTRS, ("turning %s on", _traceattr(turn_on)));
/* *INDENT-OFF* */
TurnOn(A_ALTCHARSET, enter_alt_charset_mode);
TurnOn(A_BLINK, enter_blink_mode);
@@ -259,6 +261,7 @@ termattrs(void)
{
chtype attrs = A_NORMAL;
+ T((T_CALLED("termattrs()")));
if (enter_alt_charset_mode)
attrs |= A_ALTCHARSET;
@@ -289,5 +292,5 @@ termattrs(void)
if (SP->_coloron)
attrs |= A_COLOR;
- return (attrs);
+ returnChar(attrs);
}
diff --git a/contrib/ncurses/ncurses/tty/tty_update.c b/contrib/ncurses/ncurses/tty/tty_update.c
index b8670cd15f1d..298c11ed0a21 100644
--- a/contrib/ncurses/ncurses/tty/tty_update.c
+++ b/contrib/ncurses/ncurses/tty/tty_update.c
@@ -70,7 +70,7 @@
#include <term.h>
-MODULE_ID("$Id: tty_update.c,v 1.139 2000/06/24 23:45:17 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.146 2000/10/07 01:11:44 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
@@ -112,15 +112,24 @@ position_check(int expected_y, int expected_x, char *legend)
/* check to see if the real cursor position matches the virtual */
{
char buf[20];
+ char *s;
int y, x;
if (!_nc_tracing || (expected_y < 0 && expected_x < 0))
return;
+ _nc_flush();
memset(buf, '\0', sizeof(buf));
putp("\033[6n"); /* only works on ANSI-compatibles */
_nc_flush();
- (void) read(0, buf, sizeof(buf) - 1);
+ *(s = buf) = 0;
+ do {
+ int ask = sizeof(buf) - 1 - (s - buf);
+ int got = read(0, s, ask);
+ if (got == 0)
+ break;
+ s += got;
+ } while (strchr(buf, 'R') == 0);
_tracef("probe returned %s", _nc_visbuf(buf));
/* try to interpret as a position report */
@@ -133,8 +142,9 @@ position_check(int expected_y, int expected_x, char *legend)
expected_y = y - 1;
if (y - 1 != expected_y || x - 1 != expected_x) {
beep();
+ tputs(tparm("\033[%d;%dH", expected_y + 1, expected_x + 1), 1, _nc_outch);
_tracef("position seen (%d, %d) doesn't match expected one (%d, %d) in %s",
- y - 1, x - 1, expected_y, expected_x, legend);
+ y - 1, x - 1, expected_y, expected_x, legend);
} else {
_tracef("position matches OK in %s", legend);
}
@@ -156,7 +166,7 @@ GoTo(int const row, int const col)
chtype oldattr = SP->_current_attr;
TR(TRACE_MOVE, ("GoTo(%d, %d) from (%d, %d)",
- row, col, SP->_cursrow, SP->_curscol));
+ row, col, SP->_cursrow, SP->_curscol));
position_check(SP->_cursrow, SP->_curscol, "GoTo");
@@ -168,7 +178,7 @@ GoTo(int const row, int const col)
if ((oldattr & A_ALTCHARSET)
|| (oldattr && !move_standout_mode)) {
TR(TRACE_CHARPUT, ("turning off (%#lx) %s before move",
- oldattr, _traceattr(oldattr)));
+ oldattr, _traceattr(oldattr)));
vidattr(A_NORMAL);
}
@@ -187,8 +197,8 @@ PutAttrChar(chtype ch)
ch = ('`' | AttrOf(ch));
TR(TRACE_CHARPUT, ("PutAttrChar(%s) at (%d, %d)",
- _tracechtype(ch),
- SP->_cursrow, SP->_curscol));
+ _tracechtype(ch),
+ SP->_cursrow, SP->_curscol));
UpdateAttrs(ch);
data = TextOf(ch);
if (SP->_outch != 0) {
@@ -295,7 +305,7 @@ PutCharLR(chtype const ch)
TPUTS_TRACE("enter_am_mode");
putp(enter_am_mode);
} else if ((enter_insert_mode && exit_insert_mode)
- || insert_character || parm_ich) {
+ || insert_character || parm_ich) {
GoTo(screen_lines - 1, screen_columns - 2);
callPutChar(ch);
GoTo(screen_lines - 1, screen_columns - 2);
@@ -361,7 +371,7 @@ can_clear_with(chtype ch)
if (!back_color_erase && SP->_coloron) {
if (ch & A_COLOR)
return FALSE;
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (!SP->_default_color)
return FALSE;
if (SP->_default_fg != C_MASK || SP->_default_bg != C_MASK)
@@ -427,10 +437,11 @@ EmitRange(const chtype * ntext, int num)
* don't bother moving cursor, since it can be the
* last update on the line.
*/
- if (runcount < num)
+ if (runcount < num) {
GoTo(SP->_cursrow, SP->_curscol + runcount);
- else
+ } else {
return 1; /* cursor stays in the middle */
+ }
} else if (repeat_char && runcount > SP->_rep_cost) {
bool wrap_possible = (SP->_curscol + runcount >= screen_columns);
int rep_count = runcount;
@@ -469,15 +480,15 @@ EmitRange(const chtype * ntext, int num)
*/
static int
PutRange(
- const chtype * otext,
- const chtype * ntext,
- int row,
- int first, int last)
+ const chtype * otext,
+ const chtype * ntext,
+ int row,
+ int first, int last)
{
int j, run;
TR(TRACE_CHARPUT, ("PutRange(%p, %p, %d, %d, %d)",
- otext, ntext, row, first, last));
+ otext, ntext, row, first, last));
if (otext != ntext
&& (last - first + 1) > SP->_inline_cost) {
@@ -597,8 +608,8 @@ doupdate(void)
continue;
}
- T(("At (%d, %d): from %s...", i, j, _traceattr(rattr)));
- T(("...to %s", _traceattr(turnon)));
+ TR(TRACE_ATTRS, ("At (%d, %d): from %s...", i, j, _traceattr(rattr)));
+ TR(TRACE_ATTRS, ("...to %s", _traceattr(turnon)));
/*
* If the attribute change location is a blank with a
@@ -628,15 +639,17 @@ doupdate(void)
for (; n < screen_columns; n++) {
if (AttrOf(newscr->_line[m].text[n]) == rattr) {
end_onscreen = TRUE;
- T(("Range attributed with %s ends at (%d, %d)",
- _traceattr(turnon), m, n));
+ TR(TRACE_ATTRS,
+ ("Range attributed with %s ends at (%d, %d)",
+ _traceattr(turnon), m, n));
goto foundit;
}
}
n = 0;
}
- T(("Range attributed with %s ends offscreen",
- _traceattr(turnon)));
+ TR(TRACE_ATTRS,
+ ("Range attributed with %s ends offscreen",
+ _traceattr(turnon)));
foundit:;
if (end_onscreen) {
@@ -649,8 +662,8 @@ doupdate(void)
* of span.
*/
while (n >= 0
- && TextOf(lastline[n]) == ' '
- && SAFE(AttrOf(lastline[n])))
+ && TextOf(lastline[n]) == ' '
+ && SAFE(AttrOf(lastline[n])))
lastline[n--] &= ~turnon;
/* check that there's enough room at end of span */
@@ -665,8 +678,9 @@ doupdate(void)
if (failed) {
int p, q = j;
- T(("Clearing %s beginning at (%d, %d)",
- _traceattr(turnon), i, j));
+ TR(TRACE_ATTRS,
+ ("Clearing %s beginning at (%d, %d)",
+ _traceattr(turnon), i, j));
/* turn off new attributes over span */
for (p = i; p < screen_lines; p++) {
@@ -679,8 +693,9 @@ doupdate(void)
}
foundend:;
} else {
- T(("Cookie space for %s found before (%d, %d)",
- _traceattr(turnon), i, j));
+ TR(TRACE_ATTRS,
+ ("Cookie space for %s found before (%d, %d)",
+ _traceattr(turnon), i, j));
/*
* back up the start of range so there's room
@@ -706,7 +721,7 @@ doupdate(void)
nonempty = 0;
if (curscr->_clear || newscr->_clear) { /* force refresh ? */
- T(("clearing and updating from scratch"));
+ TR(TRACE_UPDATE, ("clearing and updating from scratch"));
ClrUpdate();
curscr->_clear = FALSE; /* reset flag */
newscr->_clear = FALSE; /* reset flag */
@@ -724,7 +739,7 @@ doupdate(void)
nonempty = ClrBottom(nonempty);
- T(("Transforming lines, nonempty %d", nonempty));
+ TR(TRACE_UPDATE, ("Transforming lines, nonempty %d", nonempty));
for (i = 0; i < nonempty; i++) {
/*
* Here is our line-breakout optimization.
@@ -785,10 +800,10 @@ doupdate(void)
#if USE_TRACE_TIMES
(void) times(&after);
TR(TRACE_TIMES,
- ("Update cost: %ld chars, %ld clocks system time, %ld clocks user time",
- _nc_outchars,
- after.tms_stime - before.tms_stime,
- after.tms_utime - before.tms_utime));
+ ("Update cost: %ld chars, %ld clocks system time, %ld clocks user time",
+ _nc_outchars,
+ after.tms_stime - before.tms_stime,
+ after.tms_utime - before.tms_utime));
#endif /* USE_TRACE_TIMES */
_nc_signal_handler(TRUE);
@@ -832,11 +847,11 @@ ClrUpdate(void)
chtype blank = ClrBlank(stdscr);
int nonempty = min(screen_lines, newscr->_maxy + 1);
- T(("ClrUpdate() called"));
+ TR(TRACE_UPDATE, ("ClrUpdate() called"));
ClearScreen(blank);
- T(("updating screen from scratch"));
+ TR(TRACE_UPDATE, ("updating screen from scratch"));
nonempty = ClrBottom(nonempty);
@@ -856,14 +871,15 @@ ClrToEOL(chtype blank, bool needclear)
int j;
if (curscr != 0
- && SP->_cursrow >= 0
- && SP->_curscol >= 0) {
+ && SP->_cursrow >= 0) {
for (j = SP->_curscol; j < screen_columns; j++) {
- chtype *cp = &(curscr->_line[SP->_cursrow].text[j]);
+ if (j >= 0) {
+ chtype *cp = &(curscr->_line[SP->_cursrow].text[j]);
- if (*cp != blank) {
- *cp = blank;
- needclear = TRUE;
+ if (*cp != blank) {
+ *cp = blank;
+ needclear = TRUE;
+ }
}
}
} else {
@@ -897,11 +913,9 @@ ClrToEOS(chtype blank)
row = SP->_cursrow;
col = SP->_curscol;
- {
- UpdateAttrs(blank);
- TPUTS_TRACE("clr_eos");
- tputs(clr_eos, screen_lines - row, _nc_outch);
- }
+ UpdateAttrs(blank);
+ TPUTS_TRACE("clr_eos");
+ tputs(clr_eos, screen_lines - row, _nc_outch);
while (col < screen_columns)
curscr->_line[row].text[col++] = blank;
@@ -922,53 +936,40 @@ ClrToEOS(chtype blank)
static int
ClrBottom(int total)
{
- static chtype *tstLine;
- static size_t lenLine;
-
int row;
- size_t col;
+ int col;
int top = total;
int last = min(screen_columns, newscr->_maxx + 1);
- size_t length = sizeof(chtype) * last;
- chtype blank = newscr->_line[total - 1].text[last - 1]; /* lower right char */
-
- if (!clr_eos || !can_clear_with(blank))
- return total;
-
- if ((tstLine == 0) || (last > (int) lenLine)) {
- tstLine = typeRealloc(chtype, last, tstLine);
- if (tstLine == 0)
- return total;
- lenLine = last;
- tstLine[0] = ~blank; /* force the fill below */
- }
- if (tstLine[0] != blank) {
- for (col = 0; col < lenLine; col++)
- tstLine[col] = blank;
- }
+ chtype blank = ClrBlank(stdscr);
+ bool ok;
- for (row = total - 1; row >= 0; row--) {
- if (memcmp(tstLine, newscr->_line[row].text, length))
- break;
- if (memcmp(tstLine, curscr->_line[row].text, length))
- top = row;
- }
+ if (clr_eos && can_clear_with(blank)) {
- /* don't use clr_eos for just one line if clr_eol available */
- if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) {
- GoTo(top, 0);
- ClrToEOS(blank);
- total = top;
- if (SP->oldhash && SP->newhash) {
- for (row = top; row < screen_lines; row++)
- SP->oldhash[row] = SP->newhash[row];
+ for (row = total - 1; row >= 0; row--) {
+ for (col = 0, ok = TRUE; ok && col < last; col++) {
+ ok = (newscr->_line[row].text[col] == blank);
+ }
+ if (!ok)
+ break;
+
+ for (col = 0; ok && col < last; col++) {
+ ok = (curscr->_line[row].text[col] == blank);
+ }
+ if (!ok)
+ top = row;
+ }
+
+ /* don't use clr_eos for just one line if clr_eol available */
+ if (top < total - 1 || (top < total && !clr_eol && !clr_bol)) {
+ GoTo(top, 0);
+ ClrToEOS(blank);
+ total = top;
+ if (SP->oldhash && SP->newhash) {
+ for (row = top; row < screen_lines; row++)
+ SP->oldhash[row] = SP->newhash[row];
+ }
}
}
-#if NO_LEAKS
- if (tstLine != 0) {
- FreeAndNull(tstLine);
- }
-#endif
return total;
}
@@ -999,7 +1000,7 @@ TransformLine(int const lineno)
int n;
bool attrchanged = FALSE;
- T(("TransformLine(%d) called", lineno));
+ TR(TRACE_UPDATE, ("TransformLine(%d) called", lineno));
/* copy new hash value to old one */
if (SP->oldhash && SP->newhash)
@@ -1081,11 +1082,11 @@ TransformLine(int const lineno)
*/
if (TextOf(newLine[n]) == ' '
&& ((n > 0
- && xmc_turn_on(newLine[n - 1], newLine[n]))
+ && xmc_turn_on(newLine[n - 1], newLine[n]))
|| (n == 0
&& lineno > 0
&& xmc_turn_on(NEW(lineno - 1, screen_columns - 1),
- newLine[n])))) {
+ newLine[n])))) {
n = m;
}
@@ -1097,7 +1098,7 @@ TransformLine(int const lineno)
*/
if (TextOf(newLine[n]) != ' '
&& ((n + 1 < screen_columns
- && xmc_turn_off(newLine[n], newLine[n + 1]))
+ && xmc_turn_off(newLine[n], newLine[n + 1]))
|| (n + 1 >= screen_columns
&& lineno + 1 < screen_lines
&& xmc_turn_off(newLine[n], NEW(lineno + 1, 0))))) {
@@ -1112,7 +1113,7 @@ TransformLine(int const lineno)
/* find the first differing character */
while (firstChar < screen_columns &&
- newLine[firstChar] == oldLine[firstChar])
+ newLine[firstChar] == oldLine[firstChar])
firstChar++;
/* if there wasn't one, we're done */
@@ -1158,15 +1159,15 @@ TransformLine(int const lineno)
nLastChar = screen_columns - 1;
while (nLastChar > firstChar
- && newLine[nLastChar] == oldLine[nLastChar])
+ && newLine[nLastChar] == oldLine[nLastChar])
nLastChar--;
if (nLastChar >= firstChar) {
GoTo(lineno, firstChar);
PutRange(oldLine, newLine, lineno, firstChar, nLastChar);
memcpy(oldLine + firstChar,
- newLine + firstChar,
- (nLastChar - firstChar + 1) * sizeof(chtype));
+ newLine + firstChar,
+ (nLastChar - firstChar + 1) * sizeof(chtype));
}
return;
}
@@ -1188,8 +1189,8 @@ TransformLine(int const lineno)
PutChar(newLine[firstChar]);
ClrToEOL(blank, FALSE);
} else if ((nLastChar != oLastChar)
- && (newLine[nLastChar] != oldLine[oLastChar]
- || !(_nc_idcok && has_ic()))) {
+ && (newLine[nLastChar] != oldLine[oLastChar]
+ || !(_nc_idcok && has_ic()))) {
GoTo(lineno, firstChar);
if ((oLastChar - nLastChar) > SP->_el_cost) {
if (PutRange(oldLine, newLine, lineno, firstChar, nLastChar))
@@ -1234,7 +1235,7 @@ TransformLine(int const lineno)
if (DelCharCost(oLastChar - nLastChar)
> SP->_el_cost + nLastNonblank - (n + 1)) {
if (PutRange(oldLine, newLine, lineno,
- n + 1, nLastNonblank))
+ n + 1, nLastNonblank))
GoTo(lineno, nLastNonblank + 1);
ClrToEOL(blank, FALSE);
} else {
@@ -1256,8 +1257,8 @@ TransformLine(int const lineno)
/* update the code's internal representation */
if (screen_columns > firstChar)
memcpy(oldLine + firstChar,
- newLine + firstChar,
- (screen_columns - firstChar) * sizeof(chtype));
+ newLine + firstChar,
+ (screen_columns - firstChar) * sizeof(chtype));
}
/*
@@ -1273,9 +1274,9 @@ ClearScreen(chtype blank)
int i, j;
bool fast_clear = (clear_screen || clr_eos || clr_eol);
- T(("ClearScreen() called"));
+ TR(TRACE_UPDATE, ("ClearScreen() called"));
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (SP->_coloron
&& !SP->_default_color) {
_nc_do_color(COLOR_PAIR(SP->_current_attr), 0, FALSE, _nc_outch);
@@ -1302,18 +1303,18 @@ ClearScreen(chtype blank)
} else if (clr_eol) {
SP->_cursrow = SP->_curscol = -1;
+ UpdateAttrs(blank);
for (i = 0; i < screen_lines; i++) {
GoTo(i, 0);
- UpdateAttrs(blank);
TPUTS_TRACE("clr_eol");
putp(clr_eol);
}
GoTo(0, 0);
}
} else {
+ UpdateAttrs(blank);
for (i = 0; i < screen_lines; i++) {
GoTo(i, 0);
- UpdateAttrs(blank);
for (j = 0; j < screen_columns; j++)
PutChar(blank);
}
@@ -1325,7 +1326,7 @@ ClearScreen(chtype blank)
curscr->_line[i].text[j] = blank;
}
- T(("screen cleared"));
+ TR(TRACE_UPDATE, ("screen cleared"));
}
/*
@@ -1338,7 +1339,7 @@ ClearScreen(chtype blank)
static void
InsStr(chtype * line, int count)
{
- T(("InsStr(%p,%d) called", line, count));
+ TR(TRACE_UPDATE, ("InsStr(%p,%d) called", line, count));
/* Prefer parm_ich as it has the smallest cost - no need to shift
* the whole line on each character. */
@@ -1393,7 +1394,8 @@ DelChar(int count)
{
int n;
- T(("DelChar(%d) called, position = (%d,%d)", count, newscr->_cury, newscr->_curx));
+ TR(TRACE_UPDATE, ("DelChar(%d) called, position = (%d,%d)", count,
+ newscr->_cury, newscr->_curx));
if (parm_dch) {
TPUTS_TRACE("parm_dch");
@@ -1494,7 +1496,7 @@ scroll_csr_forward(int n, int top, int bot, int miny, int maxy, chtype blank)
} else
return ERR;
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (FILL_BCE()) {
for (i = 0; i < n; i++) {
GoTo(bot - i, 0);
@@ -1550,7 +1552,7 @@ scroll_csr_backward(int n, int top, int bot, int miny, int maxy, chtype blank)
} else
return ERR;
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (FILL_BCE()) {
for (i = 0; i < n; i++) {
GoTo(top + i, 0);
@@ -1630,18 +1632,11 @@ _nc_scrolln(int n, int top, int bot, int maxy)
* Explicitly clear if stuff pushed off top of region might
* be saved by the terminal.
*/
- if (non_dest_scroll_region || (memory_above && top == 0)) {
- for (i = 0; i < n; i++) {
- GoTo(i, 0);
- ClrToEOL(BLANK, FALSE);
- }
- }
-
res = scroll_csr_forward(n, top, bot, 0, maxy, blank);
if (res == ERR && change_scroll_region) {
if ((((n == 1 && scroll_forward) || parm_index)
- && (SP->_cursrow == bot || SP->_cursrow == bot - 1))
+ && (SP->_cursrow == bot || SP->_cursrow == bot - 1))
&& save_cursor && restore_cursor) {
cursor_saved = TRUE;
TPUTS_TRACE("save_cursor");
@@ -1665,23 +1660,24 @@ _nc_scrolln(int n, int top, int bot, int maxy)
if (res == ERR && _nc_idlok)
res = scroll_idl(n, top, bot - n + 1, blank);
- } else { /* (n < 0) - scroll down (backward) */
+
/*
- * Do explicit clear to end of region if it's possible that the
- * terminal might hold on to stuff we push off the end.
+ * Clear the newly shifted-in text.
*/
- if (non_dest_scroll_region || (memory_below && bot == maxy)) {
+ if (res != ERR
+ && (non_dest_scroll_region || (memory_below && bot == maxy))) {
if (bot == maxy && clr_eos) {
- GoTo(maxy + n, 0);
+ GoTo(bot - n, 0);
ClrToEOS(BLANK);
- } else if (clr_eol) {
- for (i = 0; i < -n; i++) {
- GoTo(maxy + n + i, 0);
+ } else {
+ for (i = 0; i < n; i++) {
+ GoTo(bot - i, 0);
ClrToEOL(BLANK, FALSE);
}
}
}
+ } else { /* (n < 0) - scroll down (backward) */
res = scroll_csr_backward(-n, top, bot, 0, maxy, blank);
if (res == ERR && change_scroll_region) {
@@ -1709,6 +1705,17 @@ _nc_scrolln(int n, int top, int bot, int maxy)
if (res == ERR && _nc_idlok)
res = scroll_idl(-n, bot + n + 1, top, blank);
+
+ /*
+ * Clear the newly shifted-in text.
+ */
+ if (res != ERR
+ && (non_dest_scroll_region || (memory_above && top == 0))) {
+ for (i = 0; i < -n; i++) {
+ GoTo(i + top, 0);
+ ClrToEOL(BLANK, FALSE);
+ }
+ }
}
if (res == ERR)
@@ -1759,7 +1766,7 @@ void
_nc_screen_wrap(void)
{
UpdateAttrs(A_NORMAL);
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
if (SP->_coloron
&& !SP->_default_color) {
SP->_default_color = TRUE;
@@ -1786,7 +1793,7 @@ _nc_do_xmc_glitch(attr_t previous)
SP->_curscol += magic_cookie_glitch;
if (SP->_curscol >= SP->_columns)
wrap_cursor();
- T(("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol));
+ TR(TRACE_UPDATE, ("bumped to %d,%d after cookie", SP->_cursrow, SP->_curscol));
}
chg >>= 1;
}
diff --git a/contrib/ncurses/panel/Makefile.in b/contrib/ncurses/panel/Makefile.in
index e5f528d79157..9b8092d22ac9 100644
--- a/contrib/ncurses/panel/Makefile.in
+++ b/contrib/ncurses/panel/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.31 2000/05/28 01:40:32 tom Exp $
+# $Id: Makefile.in,v 1.34 2000/08/26 21:51:28 tom Exp $
##############################################################################
# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
# #
@@ -46,7 +46,7 @@ SHELL = /bin/sh
THIS = Makefile
MODEL = @DFT_LWR_MODEL@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -54,8 +54,6 @@ libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
-ticdir = $(datadir)/terminfo
-
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
INSTALL_DATA = @INSTALL_DATA@
@@ -71,7 +69,7 @@ CPP = @CPP@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ \
- -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
+ -DHAVE_CONFIG_H
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
@@ -111,7 +109,7 @@ install :: $(AUTO_SRC) $(LIBRARIES)
sources: $(AUTO_SRC)
-$(INSTALL_PREFIX)$(libdir) :
+$(DESTDIR)$(libdir) :
$(srcdir)/../mkinstalldirs $@
# make a copy to simplify include-paths while still keeping panel's include
@@ -127,8 +125,8 @@ PANEL_PRIV_H = \
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/panel/panel.priv.h b/contrib/ncurses/panel/panel.priv.h
index 57bf793a007e..f5a4798f0e0f 100644
--- a/contrib/ncurses/panel/panel.priv.h
+++ b/contrib/ncurses/panel/panel.priv.h
@@ -1,4 +1,32 @@
-/* $Id: panel.priv.h,v 1.13 2000/01/15 20:39:53 juergen Exp $ */
+/****************************************************************************
+ * Copyright (c) 2000 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/* $Id: panel.priv.h,v 1.14 2000/09/02 18:22:23 tom Exp $ */
#ifndef _PANEL_PRIV_H
#define _PANEL_PRIV_H
@@ -28,7 +56,7 @@
# define INLINE
#endif
-#ifdef USE_RCS_IDS
+#if USE_RCS_IDS
# define MODULE_ID(id) static const char Ident[] = id;
#else
# define MODULE_ID(id) /*nothing*/
diff --git a/contrib/ncurses/progs/Makefile.in b/contrib/ncurses/progs/Makefile.in
index f0ecd0bdf724..8898c149f36f 100644
--- a/contrib/ncurses/progs/Makefile.in
+++ b/contrib/ncurses/progs/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.40 2000/05/28 01:28:09 tom Exp $
+# $Id: Makefile.in,v 1.49 2000/09/30 23:08:58 tom Exp $
##############################################################################
# Copyright (c) 1998-2000 Free Software Foundation, Inc. #
# #
@@ -50,7 +50,7 @@ CF_MFLAGS = @cf_cv_makeflags@
x = @PROG_EXT@
MODEL = ../@DFT_OBJ_SUBDIR@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -59,10 +59,9 @@ libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
-ticdir = $(datadir)/terminfo
-
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
+transform = @program_transform_name@
AWK = @AWK@
LN_S = @LN_S@
@@ -73,14 +72,14 @@ CFLAGS = @CFLAGS@
INCDIR = $(srcdir)/../include
CPPFLAGS = -I../progs -I$(srcdir) @CPPFLAGS@ \
- -DHAVE_CONFIG_H -DTERMINFO=\"$(ticdir)\"
+ -DHAVE_CONFIG_H
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
-CFLAGS_SHARED = $(CCFLAGS) # @CC_SHARED_OPTS@
+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@@ -101,7 +100,8 @@ LINT_OPTS = @LINT_OPTS@
LINT_LIBS = -lncurses @LIBS@
AUTO_SRC = \
- termsort.c
+ termsort.c \
+ transform.h
PROGS = tic$x toe$x infocmp$x clear$x tput$x tset$x
@@ -111,47 +111,66 @@ TESTPROGS = mvcur$x tctest$x hardscroll$x hashmap$x
DEPS_CURSES = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
################################################################################
-all: $(AUTO_SRC) $(PROGS)
+all: $(AUTO_SRC) $(PROGS)
sources: $(AUTO_SRC)
-install: install.progs
-uninstall: uninstall.progs
+install: $(AUTO_SRC) install.progs
+uninstall: uninstall.progs
# this line simplifies the configure-script
libs \
install.libs \
uninstall.libs:
-install.progs: $(PROGS) $(INSTALL_PREFIX)$(bindir)
- $(INSTALL_PROGRAM) tic$x $(INSTALL_PREFIX)$(bindir)/tic$x
- $(INSTALL_PROGRAM) toe$x $(INSTALL_PREFIX)$(bindir)/toe$x
- $(INSTALL_PROGRAM) infocmp$x $(INSTALL_PREFIX)$(bindir)/infocmp$x
- $(INSTALL_PROGRAM) clear$x $(INSTALL_PREFIX)$(bindir)/clear$x
- $(INSTALL_PROGRAM) tput$x $(INSTALL_PREFIX)$(bindir)/tput$x
- $(INSTALL_PROGRAM) tset$x $(INSTALL_PREFIX)$(bindir)/tset$x
- @echo "linking captoinfo to tic"
- -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo$x
- (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic$x captoinfo$x)
- @echo "linking infotocap to tic"
- -@rm -f $(INSTALL_PREFIX)$(bindir)/infotocap$x
- (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tic$x infotocap$x)
- @echo "linking reset to tset"
- -@rm -f $(INSTALL_PREFIX)$(bindir)/reset$x
- (cd $(INSTALL_PREFIX)$(bindir) && $(LN_S) tset$x reset$x)
+TRANSFORM = sed 's/$x$$//'|sed '$(transform)'|sed 's/$$/$x/'
+
+actual_captoinfo = `echo captoinfo$x| $(TRANSFORM)`
+actual_clear = `echo clear$x| $(TRANSFORM)`
+actual_infocmp = `echo infocmp$x| $(TRANSFORM)`
+actual_infotocap = `echo infotocap$x| $(TRANSFORM)`
+actual_init = `echo init$x| $(TRANSFORM)`
+actual_reset = `echo reset$x| $(TRANSFORM)`
+actual_tic = `echo tic$x| $(TRANSFORM)`
+actual_toe = `echo toe$x| $(TRANSFORM)`
+actual_tput = `echo tput$x| $(TRANSFORM)`
+actual_tset = `echo tset$x| $(TRANSFORM)`
+
+transform.h :
+ echo "#define PROG_CAPTOINFO \"$(actual_captoinfo)\"" >$@
+ echo "#define PROG_INFOTOCAP \"$(actual_infotocap)\"" >>$@
+ echo "#define PROG_RESET \"$(actual_reset)\"" >>$@
+ echo "#define PROG_INIT \"$(actual_init)\"" >>$@
+
+install.progs: $(AUTO_SRC) $(PROGS) $(DESTDIR)$(bindir)
+ $(INSTALL_PROGRAM) tic$x $(DESTDIR)$(bindir)/$(actual_tic)
+ $(INSTALL_PROGRAM) toe$x $(DESTDIR)$(bindir)/$(actual_toe)
+ $(INSTALL_PROGRAM) infocmp$x $(DESTDIR)$(bindir)/$(actual_infocmp)
+ $(INSTALL_PROGRAM) clear$x $(DESTDIR)$(bindir)/$(actual_clear)
+ $(INSTALL_PROGRAM) tput$x $(DESTDIR)$(bindir)/$(actual_tput)
+ $(INSTALL_PROGRAM) tset$x $(DESTDIR)$(bindir)/$(actual_tset)
+ @echo "linking $(actual_captoinfo) to $(actual_tic)"
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
+ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_captoinfo))
+ @echo "linking $(actual_infotocap) to $(actual_tic)"
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
+ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tic) $(actual_infotocap))
+ @echo "linking $(actual_reset) to $(actual_tset)"
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
+ (cd $(DESTDIR)$(bindir) && $(LN_S) $(actual_tset) $(actual_reset))
uninstall.progs:
- -@rm -f $(INSTALL_PREFIX)$(bindir)/tic$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/toe$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/infocmp$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/clear$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/tput$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/tset$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/captoinfo$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/infotocap$x
- -@rm -f $(INSTALL_PREFIX)$(bindir)/reset$x
-
-$(INSTALL_PREFIX)$(bindir) :
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_tic)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_toe)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_infocmp)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_clear)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_tput)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_tset)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_captoinfo)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_infotocap)
+ -@rm -f $(DESTDIR)$(bindir)/$(actual_reset)
+
+$(DESTDIR)$(bindir) :
$(srcdir)/../mkinstalldirs $@
#
@@ -162,7 +181,7 @@ DEPS_TIC = \
$(MODEL)/tic.o \
$(MODEL)/dump_entry.o
-tic$x: $(DEPS_TIC) $(DEPS_CURSES)
+tic$x: $(DEPS_TIC) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TIC) $(LDFLAGS_DEFAULT) -o $@
DEPS_TOE = \
@@ -181,7 +200,7 @@ clear$x: $(DEPS_CLEAR) $(DEPS_CURSES)
DEPS_TPUT = \
$(MODEL)/tput.o
-tput$x: $(DEPS_TPUT) $(DEPS_CURSES)
+tput$x: $(DEPS_TPUT) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TPUT) $(LDFLAGS_DEFAULT) -o $@
DEPS_INFOCMP = \
@@ -195,7 +214,7 @@ DEPS_TSET = \
$(MODEL)/tset.o \
$(MODEL)/dump_entry.o
-tset$x: $(DEPS_TSET) $(DEPS_CURSES)
+tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
@ECHO_LINK@ $(LINK) $(DEPS_TSET) $(LDFLAGS_DEFAULT) -o $@
termsort.c: $(srcdir)/MKtermsort.sh
@@ -208,8 +227,8 @@ termsort.c: $(srcdir)/MKtermsort.sh
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.ln *.atac trace
diff --git a/contrib/ncurses/progs/dump_entry.c b/contrib/ncurses/progs/dump_entry.c
index 3830742fcbd6..60c88d3f9cab 100644
--- a/contrib/ncurses/progs/dump_entry.c
+++ b/contrib/ncurses/progs/dump_entry.c
@@ -38,7 +38,7 @@
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$Id: dump_entry.c,v 1.53 2000/04/15 21:23:30 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.54 2000/10/01 01:34:06 tom Exp $")
#define INDENT 8
#define DISCARD(string) string = ABSENT_STRING
@@ -641,8 +641,9 @@ fmt_entry(TERMTYPE * tterm,
sprintf(buffer, "%s@", name);
WRAP_CONCAT;
} else if (outform == F_TERMCAP || outform == F_TCONVERR) {
+ int params = (i < (int) SIZEOF(parametrized)) ? parametrized[i] : 0;
char *srccap = _nc_tic_expand(tterm->Strings[i], TRUE, numbers);
- char *cv = _nc_infotocap(name, srccap, parametrized[i]);
+ char *cv = _nc_infotocap(name, srccap, params);
if (cv == 0) {
if (outform == F_TCONVERR) {
diff --git a/contrib/ncurses/progs/infocmp.c b/contrib/ncurses/progs/infocmp.c
index add5efb9b4d0..bf7ff1c54b07 100644
--- a/contrib/ncurses/progs/infocmp.c
+++ b/contrib/ncurses/progs/infocmp.c
@@ -41,7 +41,7 @@
#include <term_entry.h>
#include <dump_entry.h>
-MODULE_ID("$Id: infocmp.c,v 1.54 2000/03/19 02:56:14 tom Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.57 2000/10/01 01:26:25 tom Exp $")
#define L_CURL "{"
#define R_CURL "}"
@@ -73,7 +73,7 @@ static const char *tversion; /* terminfo version selected */
static int itrace; /* trace flag for debugging */
static int mwidth = 60;
static int numbers = 0; /* format "%'char'" to/from "%{number}" */
-static int outform = F_TERMINFO;/* output format */
+static int outform = F_TERMINFO; /* output format */
static int sortmode; /* sort_mode */
/* main comparison mode */
@@ -90,8 +90,8 @@ static bool ignorepads; /* ignore pad prefixes when diffing */
static void
ExitProgram(int code) GCC_NORETURN;
/* prototype is to get gcc to accept the noreturn attribute */
-static void
-ExitProgram(int code)
+ static void
+ ExitProgram(int code)
{
while (termcount-- > 0)
_nc_free_termtype(&entries[termcount].tterm);
@@ -350,10 +350,10 @@ compare_predicate(int type, int idx, const char *name)
case C_DIFFERENCE:
if (!(b1 == ABSENT_BOOLEAN && b2 == ABSENT_BOOLEAN) && b1 != b2)
(void) printf("\t%s: %s%s%s.\n",
- name,
- dump_boolean(b1),
- bool_sep,
- dump_boolean(b2));
+ name,
+ dump_boolean(b1),
+ bool_sep,
+ dump_boolean(b2));
break;
case C_COMMON:
@@ -732,8 +732,8 @@ file_comparison(int argc, char *argv[])
/* maybe do use resolution */
if (!_nc_resolve_uses(!limited)) {
(void) fprintf(stderr,
- "There are unresolved use entries in %s:\n",
- argv[n]);
+ "There are unresolved use entries in %s:\n",
+ argv[n]);
for_entry_list(qp) {
if (qp->nuses) {
(void) fputs(qp->tterm.term_names, stderr);
@@ -773,30 +773,30 @@ file_comparison(int argc, char *argv[])
for (qp = heads[0]; qp; qp = qp->next) {
if (qp->ncrosslinks > 1) {
(void) fprintf(stderr,
- "%s in file 1 (%s) has %d matches in file 2 (%s):\n",
- _nc_first_name(qp->tterm.term_names),
- argv[0],
- qp->ncrosslinks,
- argv[1]);
+ "%s in file 1 (%s) has %d matches in file 2 (%s):\n",
+ _nc_first_name(qp->tterm.term_names),
+ argv[0],
+ qp->ncrosslinks,
+ argv[1]);
for (i = 0; i < qp->ncrosslinks; i++)
(void) fprintf(stderr,
- "\t%s\n",
- _nc_first_name((qp->crosslinks[i])->tterm.term_names));
+ "\t%s\n",
+ _nc_first_name((qp->crosslinks[i])->tterm.term_names));
}
}
for (rp = heads[1]; rp; rp = rp->next) {
if (rp->ncrosslinks > 1) {
(void) fprintf(stderr,
- "%s in file 2 (%s) has %d matches in file 1 (%s):\n",
- _nc_first_name(rp->tterm.term_names),
- argv[1],
- rp->ncrosslinks,
- argv[0]);
+ "%s in file 2 (%s) has %d matches in file 1 (%s):\n",
+ _nc_first_name(rp->tterm.term_names),
+ argv[1],
+ rp->ncrosslinks,
+ argv[0]);
for (i = 0; i < rp->ncrosslinks; i++)
(void) fprintf(stderr,
- "\t%s\n",
- _nc_first_name((rp->crosslinks[i])->tterm.term_names));
+ "\t%s\n",
+ _nc_first_name((rp->crosslinks[i])->tterm.term_names));
}
}
@@ -804,13 +804,13 @@ file_comparison(int argc, char *argv[])
for (qp = heads[0]; qp; qp = qp->next)
if (qp->ncrosslinks == 0)
(void) printf("\t%s\n",
- _nc_first_name(qp->tterm.term_names));
+ _nc_first_name(qp->tterm.term_names));
(void) printf("In file 2 (%s) only:\n", argv[1]);
for (rp = heads[1]; rp; rp = rp->next)
if (rp->ncrosslinks == 0)
(void) printf("\t%s\n",
- _nc_first_name(rp->tterm.term_names));
+ _nc_first_name(rp->tterm.term_names));
(void) printf("The following entries are equivalent:\n");
for (qp = heads[0]; qp; qp = qp->next) {
@@ -858,7 +858,7 @@ file_comparison(int argc, char *argv[])
case C_DIFFERENCE:
if (itrace)
(void) fprintf(stderr,
- "infocmp: dumping differences\n");
+ "infocmp: dumping differences\n");
(void) printf("comparing %s to %s.\n", name1, name2);
compare_entry(compare_predicate, &entries->tterm, quiet);
break;
@@ -866,7 +866,7 @@ file_comparison(int argc, char *argv[])
case C_COMMON:
if (itrace)
(void) fprintf(stderr,
- "infocmp: dumping common capabilities\n");
+ "infocmp: dumping common capabilities\n");
(void) printf("comparing %s to %s.\n", name1, name2);
compare_entry(compare_predicate, &entries->tterm, quiet);
break;
@@ -874,7 +874,7 @@ file_comparison(int argc, char *argv[])
case C_NAND:
if (itrace)
(void) fprintf(stderr,
- "infocmp: dumping differences\n");
+ "infocmp: dumping differences\n");
(void) printf("comparing %s to %s.\n", name1, name2);
compare_entry(compare_predicate, &entries->tterm, quiet);
break;
@@ -924,7 +924,7 @@ usage(void)
," -w number (width)"
};
const size_t first = 3;
- const size_t last = sizeof(tbl) / sizeof(tbl[0]);
+ const size_t last = SIZEOF(tbl);
const size_t left = (last - first + 1) / 2 + first;
size_t n;
@@ -985,7 +985,7 @@ dump_initializers(TERMTYPE * term)
break;
}
(void) printf("\t/* %3d: %-8s */\t%s,\n",
- n, ExtBoolname(term, n, boolnames), str);
+ n, ExtBoolname(term, n, boolnames), str);
}
(void) printf("%s;\n", R_CURL);
@@ -1005,8 +1005,8 @@ dump_initializers(TERMTYPE * term)
str = buf;
break;
}
- (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtNumname(term, n,
- numnames), str);
+ (void) printf("\t/* %3d: %-8s */\t%s,\n", n,
+ ExtNumname(term, n, numnames), str);
}
(void) printf("%s;\n", R_CURL);
@@ -1027,8 +1027,8 @@ dump_initializers(TERMTYPE * term)
tp = buf;
*tp++ = '"';
for (sp = term->Strings[n];
- *sp != 0 && (tp - buf) < MAX_STRING - 6;
- sp++) {
+ *sp != 0 && (tp - buf) < MAX_STRING - 6;
+ sp++) {
if (isascii(*sp) && isprint(*sp) && *sp != '\\' && *sp != '"')
*tp++ = *sp;
else {
@@ -1046,11 +1046,11 @@ dump_initializers(TERMTYPE * term)
(void) printf("%s;\n", R_CURL);
(void) printf("static char * %s[] = %s\n",
- name_initializer("string_ext"), L_CURL);
+ name_initializer("string_ext"), L_CURL);
}
#endif
- (void) printf("\t/* %3d: %-8s */\t%s,\n", n, ExtStrname(term, n,
- strnames), str);
+ (void) printf("\t/* %3d: %-8s */\t%s,\n", n,
+ ExtStrname(term, n, strnames), str);
}
(void) printf("%s;\n", R_CURL);
}
@@ -1071,26 +1071,39 @@ dump_termtype(TERMTYPE * term)
(void) printf("#if NCURSES_XNAMES\n");
(void) printf("\t\t(char *)0,\t/* pointer to extended string table */\n");
(void) printf("\t\t%s,\t/* ...corresponding names */\n",
- (NUM_STRINGS(term) != STRCOUNT)
- ? name_initializer("string_ext")
- : "(char **)0");
+ (NUM_STRINGS(term) != STRCOUNT)
+ ? name_initializer("string_ext")
+ : "(char **)0");
(void) printf("\t\t%d,\t\t/* count total Booleans */\n", NUM_BOOLEANS(term));
(void) printf("\t\t%d,\t\t/* count total Numbers */\n", NUM_NUMBERS(term));
(void) printf("\t\t%d,\t\t/* count total Strings */\n", NUM_STRINGS(term));
(void) printf("\t\t%d,\t\t/* count extensions to Booleans */\n",
- NUM_BOOLEANS(term) - BOOLCOUNT);
+ NUM_BOOLEANS(term) - BOOLCOUNT);
(void) printf("\t\t%d,\t\t/* count extensions to Numbers */\n",
- NUM_NUMBERS(term) - NUMCOUNT);
+ NUM_NUMBERS(term) - NUMCOUNT);
(void) printf("\t\t%d,\t\t/* count extensions to Strings */\n",
- NUM_STRINGS(term) - STRCOUNT);
+ NUM_STRINGS(term) - STRCOUNT);
(void) printf("#endif /* NCURSES_XNAMES */\n");
#endif /* NCURSES_XNAMES */
(void) printf("\t%s\n", R_CURL);
}
+static int
+optarg_to_number(void)
+{
+ char *temp = 0;
+ long value = strtol(optarg, &temp, 0);
+
+ if (temp == 0 || temp == optarg || *temp != 0) {
+ fprintf(stderr, "Expected a number, not \"%s\"\n", optarg);
+ exit(EXIT_FAILURE);
+ }
+ return (int) value;
+}
+
/***************************************************************************
*
* Main sequence
@@ -1112,7 +1125,7 @@ main(int argc, char *argv[])
if ((terminal = getenv("TERM")) == 0) {
(void) fprintf(stderr,
- "infocmp: environment variable TERM not set\n");
+ "infocmp: environment variable TERM not set\n");
return EXIT_FAILURE;
}
@@ -1222,7 +1235,7 @@ main(int argc, char *argv[])
sortmode = S_TERMCAP;
else {
(void) fprintf(stderr,
- "infocmp: unknown sort mode\n");
+ "infocmp: unknown sort mode\n");
return EXIT_FAILURE;
}
break;
@@ -1232,17 +1245,16 @@ main(int argc, char *argv[])
break;
case 'v':
- itrace = atoi(optarg);
+ itrace = optarg_to_number();
set_trace_level(itrace);
break;
case 'V':
- (void) fputs(NCURSES_VERSION, stdout);
- putchar('\n');
+ puts(curses_version());
ExitProgram(EXIT_SUCCESS);
case 'w':
- mwidth = atoi(optarg);
+ mwidth = optarg_to_number();
break;
case 'A':
@@ -1289,7 +1301,7 @@ main(int argc, char *argv[])
for (; optind < argc; optind++) {
if (termcount >= MAXTERMS) {
(void) fprintf(stderr,
- "infocmp: too many terminal type arguments\n");
+ "infocmp: too many terminal type arguments\n");
return EXIT_FAILURE;
} else {
const char *directory = termcount ? restdir : firstdir;
@@ -1299,31 +1311,31 @@ main(int argc, char *argv[])
if (directory) {
(void) sprintf(tfile[termcount], "%s/%c/%s",
- directory,
- *argv[optind], argv[optind]);
+ directory,
+ *argv[optind], argv[optind]);
if (itrace)
(void) fprintf(stderr,
- "infocmp: reading entry %s from file %s\n",
- argv[optind], tfile[termcount]);
+ "infocmp: reading entry %s from file %s\n",
+ argv[optind], tfile[termcount]);
status = _nc_read_file_entry(tfile[termcount],
- &entries[termcount].tterm);
+ &entries[termcount].tterm);
} else {
if (itrace)
(void) fprintf(stderr,
- "infocmp: reading entry %s from system directories %s\n",
- argv[optind], tname[termcount]);
+ "infocmp: reading entry %s from system directories %s\n",
+ argv[optind], tname[termcount]);
status = _nc_read_entry(tname[termcount],
- tfile[termcount],
- &entries[termcount].tterm);
+ tfile[termcount],
+ &entries[termcount].tterm);
directory = TERMINFO; /* for error message */
}
if (status <= 0) {
(void) fprintf(stderr,
- "infocmp: couldn't open terminfo file %s.\n",
- tfile[termcount]);
+ "infocmp: couldn't open terminfo file %s.\n",
+ tfile[termcount]);
return EXIT_FAILURE;
}
repair_acsc(&entries[termcount].tterm);
@@ -1368,10 +1380,10 @@ main(int argc, char *argv[])
case C_DEFAULT:
if (itrace)
(void) fprintf(stderr,
- "infocmp: about to dump %s\n",
- tname[0]);
+ "infocmp: about to dump %s\n",
+ tname[0]);
(void) printf("#\tReconstructed via infocmp from file: %s\n",
- tfile[0]);
+ tfile[0]);
len = dump_entry(&entries[0].tterm, limited, numbers, NULL);
putchar('\n');
if (itrace)
@@ -1388,7 +1400,7 @@ main(int argc, char *argv[])
case C_COMMON:
if (itrace)
(void) fprintf(stderr,
- "infocmp: dumping common capabilities\n");
+ "infocmp: dumping common capabilities\n");
(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
compare_entry(compare_predicate, &entries->tterm, quiet);
break;
@@ -1396,7 +1408,7 @@ main(int argc, char *argv[])
case C_NAND:
if (itrace)
(void) fprintf(stderr,
- "infocmp: dumping differences\n");
+ "infocmp: dumping differences\n");
(void) printf("comparing %s to %s.\n", tname[0], tname[1]);
compare_entry(compare_predicate, &entries->tterm, quiet);
break;
@@ -1407,7 +1419,7 @@ main(int argc, char *argv[])
len = dump_entry(&entries[0].tterm, limited, numbers, use_predicate);
for (i = 1; i < termcount; i++)
len += dump_uses(tname[i], !(outform == F_TERMCAP || outform
- == F_TCONVERR));
+ == F_TCONVERR));
putchar('\n');
if (itrace)
(void) fprintf(stderr, "infocmp: length %d\n", len);
@@ -1419,7 +1431,7 @@ main(int argc, char *argv[])
(void) fprintf(stderr, "Use `tic -[CI] <file>' for this.\n");
else if (argc - optind != 2)
(void) fprintf(stderr,
- "File comparison needs exactly two file arguments.\n");
+ "File comparison needs exactly two file arguments.\n");
else
file_comparison(argc - optind, argv + optind);
diff --git a/contrib/ncurses/progs/progs.priv.h b/contrib/ncurses/progs/progs.priv.h
index 2d22c9ad1a8a..d704c0989b33 100644
--- a/contrib/ncurses/progs/progs.priv.h
+++ b/contrib/ncurses/progs/progs.priv.h
@@ -30,7 +30,7 @@
* Author: Thomas E. Dickey <dickey@clark.net> 1997,1998 *
****************************************************************************/
/*
- * $Id: progs.priv.h,v 1.22 2000/04/08 23:47:39 tom Exp $
+ * $Id: progs.priv.h,v 1.24 2000/10/01 01:33:34 tom Exp $
*
* progs.priv.h
*
@@ -39,7 +39,7 @@
#include <ncurses_cfg.h>
-#ifdef USE_RCS_IDS
+#if USE_RCS_IDS
#define MODULE_ID(id) static const char Ident[] = id;
#else
#define MODULE_ID(id) /*nothing*/
@@ -162,7 +162,7 @@ extern int optind;
/* We use isascii only to guard against use of 7-bit ctype tables in the
* isprint test in infocmp.
*/
-#ifndef HAVE_ISASCII
+#if !HAVE_ISASCII
# undef isascii
# if ('z'-'a' == 25) && ('z' < 127) && ('Z'-'A' == 25) && ('Z' < 127) && ('9' < 127)
# define isascii(c) (((c) & 0xff) <= 127)
@@ -170,3 +170,5 @@ extern int optind;
# define isascii(c) 1 /* not really ascii anyway */
# endif
#endif
+
+#define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
diff --git a/contrib/ncurses/progs/tic.c b/contrib/ncurses/progs/tic.c
index cc73a4db220c..9ab0f10776d0 100644
--- a/contrib/ncurses/progs/tic.c
+++ b/contrib/ncurses/progs/tic.c
@@ -38,11 +38,13 @@
*/
#include <progs.priv.h>
+#include <sys/stat.h>
#include <dump_entry.h>
#include <term_entry.h>
+#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.69 2000/04/08 23:53:49 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.82 2000/10/01 02:11:39 tom Exp $")
const char *_nc_progname = "tic";
@@ -54,7 +56,7 @@ static const char *to_remove;
static void (*save_check_termtype) (TERMTYPE *);
static void check_termtype(TERMTYPE * tt);
-static const char usage_string[] = "[-h] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n";
+static const char usage_string[] = "[-V] [-v[n]] [-e names] [-CILNRTcfrswx1] source-file\n";
static void
cleanup(void)
@@ -91,6 +93,7 @@ usage(void)
" -N disable smart defaults for source translation",
" -R restrict translation to given terminfo/termcap version",
" -T remove size-restrictions on compiled description",
+ " -V print version",
#if NCURSES_XNAMES
" -a retain commented-out capabilities (sets -x also)",
#endif
@@ -114,7 +117,7 @@ usage(void)
size_t j;
fprintf(stderr, "Usage: %s %s\n", _nc_progname, usage_string);
- for (j = 0; j < sizeof(tbl) / sizeof(tbl[0]); j++) {
+ for (j = 0; j < SIZEOF(tbl); j++) {
fputs(tbl[j], stderr);
putc('\n', stderr);
}
@@ -148,7 +151,7 @@ write_it(ENTRY * ep)
if (ch == '\\') {
*d++ = *t++;
} else if ((ch == '%')
- && (*t == L_BRACE)) {
+ && (*t == L_BRACE)) {
char *v = 0;
long value = strtol(t + 1, &v, 0);
if (v != 0
@@ -179,7 +182,7 @@ static bool
immedhook(ENTRY * ep GCC_UNUSED)
/* write out entries with no use capabilities immediately to save storage */
{
-#ifndef HAVE_BIG_CORE
+#if !HAVE_BIG_CORE
/*
* This is strictly a core-economy kluge. The really clean way to handle
* compilation is to slurp the whole file into core and then do all the
@@ -301,6 +304,24 @@ stripped(char *src)
return 0;
}
+static FILE *
+open_input(const char *filename)
+{
+ FILE *fp = fopen(filename, "r");
+ struct stat sb;
+
+ if (fp == 0) {
+ fprintf(stderr, "%s: Can't open %s\n", _nc_progname, filename);
+ exit(EXIT_FAILURE);
+ }
+ if (fstat(fileno(fp), &sb) < 0
+ || (sb.st_mode & S_IFMT) != S_IFREG) {
+ fprintf(stderr, "%s: %s is not a file\n", _nc_progname, filename);
+ exit(EXIT_FAILURE);
+ }
+ return fp;
+}
+
/* Parse the "-e" option-value into a list of names */
static const char **
make_namelist(char *src)
@@ -314,9 +335,7 @@ make_namelist(char *src)
if (src == 0) {
/* EMPTY */ ;
} else if (strchr(src, '/') != 0) { /* a filename */
- FILE *fp = fopen(src, "r");
- if (fp == 0)
- failed(src);
+ FILE *fp = open_input(src);
for (pass = 1; pass <= 2; pass++) {
nn = 0;
@@ -425,16 +444,13 @@ main(int argc, char *argv[])
log_fp = stderr;
- if ((_nc_progname = strrchr(argv[0], '/')) == NULL)
- _nc_progname = argv[0];
- else
- _nc_progname++;
+ _nc_progname = _nc_basename(argv[0]);
- if ((infodump = (strcmp(_nc_progname, "captoinfo") == 0)) != FALSE) {
+ if ((infodump = (strcmp(_nc_progname, PROG_CAPTOINFO) == 0)) != FALSE) {
outform = F_TERMINFO;
sortmode = S_TERMINFO;
}
- if ((capdump = (strcmp(_nc_progname, "infotocap") == 0)) != FALSE) {
+ if ((capdump = (strcmp(_nc_progname, PROG_INFOTOCAP) == 0)) != FALSE) {
outform = F_TERMCAP;
sortmode = S_TERMCAP;
}
@@ -448,7 +464,7 @@ main(int argc, char *argv[])
* be optional.
*/
while ((this_opt = getopt(argc, argv,
- "0123456789CILNR:TVace:fGgo:rsvwx")) != EOF) {
+ "0123456789CILNR:TVace:fGgo:rsvwx")) != EOF) {
if (isdigit(this_opt)) {
switch (last_opt) {
case 'v':
@@ -491,7 +507,7 @@ main(int argc, char *argv[])
limited = FALSE;
break;
case 'V':
- puts(NCURSES_VERSION);
+ puts(curses_version());
return EXIT_SUCCESS;
case 'c':
check_only = TRUE;
@@ -544,7 +560,7 @@ main(int argc, char *argv[])
save_check_termtype = _nc_check_termtype;
_nc_check_termtype = check_termtype;
}
-#ifndef HAVE_BIG_CORE
+#if !HAVE_BIG_CORE
/*
* Aaargh! immedhook seriously hoses us!
*
@@ -557,7 +573,7 @@ main(int argc, char *argv[])
*/
if (namelst && (!infodump && !capdump)) {
(void) fprintf(stderr,
- "Sorry, -e can't be used without -I or -C\n");
+ "Sorry, -e can't be used without -I or -C\n");
cleanup();
return EXIT_FAILURE;
}
@@ -567,10 +583,10 @@ main(int argc, char *argv[])
source_file = argv[optind++];
if (optind < argc) {
fprintf(stderr,
- "%s: Too many file names. Usage:\n\t%s %s",
- _nc_progname,
- _nc_progname,
- usage_string);
+ "%s: Too many file names. Usage:\n\t%s %s",
+ _nc_progname,
+ _nc_progname,
+ usage_string);
return EXIT_FAILURE;
}
} else {
@@ -582,11 +598,13 @@ main(int argc, char *argv[])
if (access(termcap, F_OK) == 0) {
/* file exists */
source_file = termcap;
- } else if ((tmp_fp = open_tempfile(my_tmpname)) != 0) {
+ } else if ((tmp_fp = open_tempfile(strcpy(my_tmpname,
+ "/tmp/XXXXXX")))
+ != 0) {
source_file = my_tmpname;
fprintf(tmp_fp, "%s\n", termcap);
fclose(tmp_fp);
- tmp_fp = fopen(source_file, "r");
+ tmp_fp = open_input(source_file);
to_remove = source_file;
} else {
failed("tmpnam");
@@ -595,41 +613,38 @@ main(int argc, char *argv[])
} else {
/* tic */
fprintf(stderr,
- "%s: File name needed. Usage:\n\t%s %s",
- _nc_progname,
- _nc_progname,
- usage_string);
+ "%s: File name needed. Usage:\n\t%s %s",
+ _nc_progname,
+ _nc_progname,
+ usage_string);
cleanup();
return EXIT_FAILURE;
}
}
- if (tmp_fp == 0
- && (tmp_fp = fopen(source_file, "r")) == 0) {
- fprintf(stderr, "%s: Can't open %s\n", _nc_progname, source_file);
- return EXIT_FAILURE;
- }
+ if (tmp_fp == 0)
+ tmp_fp = open_input(source_file);
if (infodump)
dump_init(tversion,
- smart_defaults
- ? outform
- : F_LITERAL,
- sortmode, width, debug_level, formatted);
+ smart_defaults
+ ? outform
+ : F_LITERAL,
+ sortmode, width, debug_level, formatted);
else if (capdump)
dump_init(tversion,
- outform,
- sortmode, width, debug_level, FALSE);
+ outform,
+ sortmode, width, debug_level, FALSE);
/* parse entries out of the source file */
_nc_set_source(source_file);
-#ifndef HAVE_BIG_CORE
+#if !HAVE_BIG_CORE
if (!(check_only || infodump || capdump))
_nc_set_writedir(outdir);
#endif /* HAVE_BIG_CORE */
_nc_read_entry_source(tmp_fp, (char *) NULL,
- !smart_defaults, FALSE,
- (check_only || infodump || capdump) ? NULLHOOK : immedhook);
+ !smart_defaults, FALSE,
+ (check_only || infodump || capdump) ? NULLHOOK : immedhook);
/* do use resolution */
if (check_only || (!infodump && !capdump) || forceresolve) {
@@ -647,9 +662,9 @@ main(int argc, char *argv[])
if (len > (infodump ? MAX_TERMINFO_LENGTH : MAX_TERMCAP_LENGTH))
(void) fprintf(stderr,
- "warning: resolved %s entry is %d bytes long\n",
- _nc_first_name(qp->tterm.term_names),
- len);
+ "warning: resolved %s entry is %d bytes long\n",
+ _nc_first_name(qp->tterm.term_names),
+ len);
}
}
}
@@ -722,8 +737,8 @@ main(int argc, char *argv[])
int total = _nc_tic_written();
if (total != 0)
fprintf(log_fp, "%d entries written to %s\n",
- total,
- _nc_tic_dir((char *) 0));
+ total,
+ _nc_tic_dir((char *) 0));
else
fprintf(log_fp, "No entries written\n");
}
@@ -743,6 +758,145 @@ TERMINAL *cur_term; /* tweak to avoid linking lib_cur_term.c */
#define CUR tp->
/*
+ * Returns the expected number of parameters for the given capability.
+ */
+static int
+expected_params(char *name)
+{
+ /* *INDENT-OFF* */
+ static const struct {
+ const char *name;
+ int count;
+ } table[] = {
+ { "birep", 2 },
+ { "chr", 1 },
+ { "colornm", 1 },
+ { "cpi", 1 },
+ { "csr", 2 },
+ { "cub", 1 },
+ { "cud", 1 },
+ { "cuf", 1 },
+ { "cup", 2 },
+ { "cvr", 1 },
+ { "cuu", 1 },
+ { "cwin", 5 },
+ { "dch", 1 },
+ { "dclk", 2 },
+ { "dial", 1 },
+ { "dispc", 1 },
+ { "dl", 1 },
+ { "ech", 1 },
+ { "getm", 1 },
+ { "hpa", 1 },
+ { "ich", 1 },
+ { "il", 1 },
+ { "indn", 1 },
+ { "initc", 4 },
+ { "initp", 7 },
+ { "lpi", 1 },
+ { "mc5p", 1 },
+ { "mrcup", 2 },
+ { "mvpa", 1 },
+ { "pfkey", 2 },
+ { "pfloc", 2 },
+ { "pfx", 2 },
+ { "pfxl", 3 },
+ { "pln", 2 },
+ { "qdial", 1 },
+ { "rep", 2 },
+ { "rin", 1 },
+ { "sclk", 3 },
+ { "scp", 1 },
+ { "scs", 1 },
+ { "setab", 1 },
+ { "setaf", 1 },
+ { "setb", 1 },
+ { "setcolor", 1 },
+ { "setf", 1 },
+ { "sgr", 9 },
+ { "sgr1", 6 },
+ { "slength", 1 },
+ { "slines", 1 },
+ { "smgbp", 2 },
+ { "smglp", 2 },
+ { "smglr", 2 },
+ { "smgrp", 1 },
+ { "smgtb", 2 },
+ { "smgtp", 2 },
+ { "tsl", 1 },
+ { "u6", -1 },
+ { "vpa", 1 },
+ { "wind", 4 },
+ { "wingo", 1 },
+ };
+ /* *INDENT-ON* */
+
+ unsigned n;
+ int result = 0; /* function-keys, etc., use none */
+
+ for (n = 0; n < SIZEOF(table); n++) {
+ if (!strcmp(name, table[n].name)) {
+ result = table[n].count;
+ break;
+ }
+ }
+
+ return result;
+}
+
+/*
+ * Make a quick sanity check for the parameters which are used in the given
+ * strings. If there are no "%p" tokens, then there should be no other "%"
+ * markers.
+ */
+static void
+check_params(TERMTYPE * tp, char *name, char *value)
+{
+ int expected = expected_params(name);
+ int actual = 0;
+ int n;
+ bool params[10];
+ char *s = value;
+
+ for (n = 0; n < 10; n++)
+ params[n] = FALSE;
+
+ while (*s != 0) {
+ if (*s == '%') {
+ if (*++s == '\0') {
+ _nc_warning("expected character after %% in %s", name);
+ break;
+ } else if (*s == 'p') {
+ if (*++s == '\0' || !isdigit((int) *s)) {
+ _nc_warning("expected digit after %%p in %s", name);
+ return;
+ } else {
+ n = (*s - '0');
+ if (n > actual)
+ actual = n;
+ params[n] = TRUE;
+ }
+ }
+ }
+ s++;
+ }
+
+ if (params[0]) {
+ _nc_warning("%s refers to parameter 0 (%%p0), which is not allowed", name);
+ }
+ if (value == set_attributes || expected < 0) {
+ ;
+ } else if (expected != actual) {
+ _nc_warning("%s uses %d parameters, expected %d", name,
+ actual, expected);
+ for (n = 1; n < actual; n++) {
+ if (!params[n])
+ _nc_warning("%s omits parameter %d", name, n);
+ }
+ }
+}
+
+/*
* An sgr string may contain several settings other than the one we're
* interested in, essentially sgr0 + rmacs + whatever. As long as the
* "whatever" is contained in the sgr string, that is close enough for our
@@ -767,20 +921,20 @@ static void
check_sgr(TERMTYPE * tp, char *zero, int num, char *cap, const char *name)
{
char *test = tparm(set_attributes,
- num == 1,
- num == 2,
- num == 3,
- num == 4,
- num == 5,
- num == 6,
- num == 7,
- num == 8,
- num == 9);
+ num == 1,
+ num == 2,
+ num == 3,
+ num == 4,
+ num == 5,
+ num == 6,
+ num == 7,
+ num == 8,
+ num == 9);
if (test != 0) {
if (PRESENT(cap)) {
if (!similar_sgr(test, cap)) {
_nc_warning("%s differs from sgr(%d): %s", name, num,
- _nc_visbuf(test));
+ _nc_visbuf(test));
}
} else if (strcmp(test, zero)) {
_nc_warning("sgr(%d) present, but not %s", num, name);
@@ -827,12 +981,12 @@ check_termtype(TERMTYPE * tp)
conflict = TRUE;
}
fprintf(stderr, "... %s is the same as %s",
- keyname(_nc_tinfo_fkeys[j].code),
- keyname(_nc_tinfo_fkeys[k].code));
+ keyname(_nc_tinfo_fkeys[j].code),
+ keyname(_nc_tinfo_fkeys[k].code));
first = FALSE;
} else {
fprintf(stderr, ", %s",
- keyname(_nc_tinfo_fkeys[k].code));
+ keyname(_nc_tinfo_fkeys[k].code));
}
}
}
@@ -840,6 +994,12 @@ check_termtype(TERMTYPE * tp)
fprintf(stderr, "\n");
}
+ for (j = 0; j < NUM_STRINGS(tp); j++) {
+ char *a = tp->Strings[j];
+ if (VALID_STRING(a))
+ check_params(tp, ExtStrname(tp, j, strnames), a);
+ }
+
/*
* Quick check for color. We could also check if the ANSI versus
* non-ANSI strings are misused.
diff --git a/contrib/ncurses/progs/toe.c b/contrib/ncurses/progs/toe.c
index afdf379fb287..b7afb676b015 100644
--- a/contrib/ncurses/progs/toe.c
+++ b/contrib/ncurses/progs/toe.c
@@ -43,7 +43,7 @@
#include <dump_entry.h>
#include <term_entry.h>
-MODULE_ID("$Id: toe.c,v 1.22 2000/03/11 21:47:35 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.24 2000/09/09 19:52:35 tom Exp $")
#define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
@@ -87,10 +87,7 @@ main(int argc, char *argv[])
int i, c;
int code;
- if ((_nc_progname = strrchr(argv[0], '/')) == 0)
- _nc_progname = argv[0];
- else
- _nc_progname++;
+ _nc_progname = _nc_basename(argv[0]);
while ((c = getopt(argc, argv, "huv:UV")) != EOF)
switch (c) {
@@ -107,8 +104,7 @@ main(int argc, char *argv[])
invert_dependencies = TRUE;
break;
case 'V':
- (void) fputs(NCURSES_VERSION, stdout);
- putchar('\n');
+ puts(curses_version());
ExitProgram(EXIT_SUCCESS);
default:
(void) fprintf(stderr, "usage: toe [-huUV] [-v n] [file...]\n");
@@ -191,7 +187,7 @@ main(int argc, char *argv[])
if ((eargv[j] = get_directory(personal)) != 0)
j++;
}
- if ((eargv[j] = get_directory(TERMINFO)) != 0)
+ if ((eargv[j] = get_directory(strcpy(personal, TERMINFO))) != 0)
j++;
}
eargv[j] = 0;
diff --git a/contrib/ncurses/progs/tput.c b/contrib/ncurses/progs/tput.c
index 63c6d1a5be5b..a72a2e892fdf 100644
--- a/contrib/ncurses/progs/tput.c
+++ b/contrib/ncurses/progs/tput.c
@@ -39,17 +39,27 @@
*/
#include <progs.priv.h>
-#ifndef PURE_TERMINFO
+
+#if !PURE_TERMINFO
#include <termsort.c>
#endif
+#include <transform.h>
-MODULE_ID("$Id: tput.c,v 1.16 2000/03/19 01:08:08 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.24 2000/10/05 00:05:04 tom Exp $")
#define PUTS(s) fputs(s, stdout)
#define PUTCHAR(c) putchar(c)
#define FLUSH fflush(stdout)
+typedef enum {
+ Numbers = 0
+ ,Num_Str
+ ,Num_Str_Str
+} TParams;
+
static char *prg_name;
+static bool is_init = FALSE;
+static bool is_reset = FALSE;
static void
quit(int status, const char *fmt,...)
@@ -66,38 +76,77 @@ quit(int status, const char *fmt,...)
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-S] [-T term] capname\n", prg_name);
+ fprintf(stderr, "usage: %s [-V] [-S] [-T term] capname\n", prg_name);
exit(EXIT_FAILURE);
}
+static void
+check_aliases(const char *name)
+{
+ is_init = (strcmp(name, PROG_INIT) == 0);
+ is_reset = (strcmp(name, PROG_RESET) == 0);
+}
+
+/*
+ * Lookup the type of call we should make to tparm(). This ignores the actual
+ * terminfo capability (bad, because it is not extensible), but makes this
+ * code portable to platforms where sizeof(int) != sizeof(char *).
+ *
+ * FIXME: If we want extensibility, analyze the capability string as we do
+ * in tparm() to decide how to parse the varargs list.
+ */
+static TParams
+tparm_type(char *name)
+{
+#define TD(code, longname, ti, tc) {code,longname},{code,ti},{code,tc}
+ TParams result = Numbers;
+ /* *INDENT-OFF* */
+ static const struct {
+ TParams code;
+ const char *name;
+ } table[] = {
+ TD(Num_Str, "pkey_key", "pfkey", "pk"),
+ TD(Num_Str, "pkey_local", "pfloc", "pl"),
+ TD(Num_Str, "pkey_xmit", "pfx", "px"),
+ TD(Num_Str, "plab_norm", "pln", "pn"),
+ TD(Num_Str_Str, "pkey_plab", "pfxl", "xl"),
+ };
+ /* *INDENT-ON* */
+
+ unsigned n;
+ for (n = 0; n < SIZEOF(table); n++) {
+ if (!strcmp(name, table[n].name)) {
+ result = table[n].code;
+ break;
+ }
+ }
+ return result;
+}
+
static int
tput(int argc, char *argv[])
{
NCURSES_CONST char *name;
char *s;
int i, j, c;
- int reset, status;
+ int status;
FILE *f;
- reset = 0;
- name = argv[0];
- if (strcmp(name, "reset") == 0) {
- reset = 1;
- }
- if (reset || strcmp(name, "init") == 0) {
+ check_aliases(name = argv[0]);
+ if (is_reset || is_init) {
if (init_prog != 0) {
system(init_prog);
}
FLUSH;
- if (reset && reset_1string != 0) {
+ if (is_reset && reset_1string != 0) {
PUTS(reset_1string);
} else if (init_1string != 0) {
PUTS(init_1string);
}
FLUSH;
- if (reset && reset_2string != 0) {
+ if (is_reset && reset_2string != 0) {
PUTS(reset_2string);
} else if (init_2string != 0) {
PUTS(init_2string);
@@ -107,12 +156,12 @@ tput(int argc, char *argv[])
if (set_lr_margin != 0) {
PUTS(tparm(set_lr_margin, 0, columns - 1));
} else if (set_left_margin_parm != 0
- && set_right_margin_parm != 0) {
+ && set_right_margin_parm != 0) {
PUTS(tparm(set_left_margin_parm, 0));
PUTS(tparm(set_right_margin_parm, columns - 1));
} else if (clear_margins != 0
- && set_left_margin != 0
- && set_right_margin != 0) {
+ && set_left_margin != 0
+ && set_right_margin != 0) {
PUTS(clear_margins);
if (carriage_return != 0) {
PUTS(carriage_return);
@@ -151,7 +200,7 @@ tput(int argc, char *argv[])
}
}
- if (reset && reset_file != 0) {
+ if (is_reset && reset_file != 0) {
f = fopen(reset_file, "r");
if (f == 0) {
quit(errno, "Can't open reset_file: '%s'", reset_file);
@@ -172,7 +221,7 @@ tput(int argc, char *argv[])
}
FLUSH;
- if (reset && reset_3string != 0) {
+ if (is_reset && reset_3string != 0) {
PUTS(reset_3string);
} else if (init_2string != 0) {
PUTS(init_2string);
@@ -185,7 +234,7 @@ tput(int argc, char *argv[])
PUTS(longname());
return 0;
}
-#ifndef PURE_TERMINFO
+#if !PURE_TERMINFO
{
const struct name_table_entry *np;
@@ -216,10 +265,11 @@ tput(int argc, char *argv[])
return (0);
} else if ((s = tigetstr(name)) == CANCELLED_STRING) {
quit(4, "%s: unknown terminfo capability '%s'", prg_name, name);
- } else if (s != 0) {
+ } else if (s != ABSENT_STRING) {
if (argc > 1) {
int k;
- char * params[10];
+ int numbers[10];
+ char *strings[10];
/* Nasty hack time. The tparm function needs to see numeric
* parameters as numbers, not as pointers to their string
@@ -227,20 +277,31 @@ tput(int argc, char *argv[])
*/
for (k = 1; k < argc; k++) {
- if (isdigit(argv[k][0])) {
- long val = atol(argv[k]);
- params[k] = (char *)val;
- } else {
- params[k] = argv[k];
- }
+ char *tmp = 0;
+ strings[k] = argv[k];
+ numbers[k] = strtol(argv[k], &tmp, 0);
+ if (tmp == 0 || *tmp != 0)
+ numbers[k] = 0;
+ }
+ for (k = argc; k <= 9; k++) {
+ numbers[k] = 0;
+ strings[k] = 0;
}
- for (k = argc; k <= 9; k++)
- params[k] = 0;
- s = tparm(s,
- params[1], params[2], params[3],
- params[4], params[5], params[6],
- params[7], params[8], params[9]);
+ switch (tparm_type(name)) {
+ case Num_Str:
+ s = tparm(s, numbers[1], strings[2]);
+ break;
+ case Num_Str_Str:
+ s = tparm(s, numbers[1], strings[2], strings[3]);
+ break;
+ default:
+ s = tparm(s,
+ numbers[1], numbers[2], numbers[3],
+ numbers[4], numbers[5], numbers[6],
+ numbers[7], numbers[8], numbers[9]);
+ break;
+ }
}
/* use putp() in order to perform padding */
@@ -253,38 +314,47 @@ tput(int argc, char *argv[])
int
main(int argc, char **argv)
{
- char *s, *term;
- int errret, cmdline = 1;
+ char *term;
+ int errret;
+ bool cmdline = TRUE;
int c;
char buf[BUFSIZ];
int errors = 0;
- prg_name = argv[0];
- s = strrchr(prg_name, '/');
- if (s != 0 && *++s != '\0')
- prg_name = s;
+ check_aliases(prg_name = _nc_basename(argv[0]));
term = getenv("TERM");
- while ((c = getopt(argc, argv, "ST:")) != EOF)
+ while ((c = getopt(argc, argv, "ST:V")) != EOF) {
switch (c) {
case 'S':
- cmdline = 0;
+ cmdline = FALSE;
break;
case 'T':
use_env(FALSE);
term = optarg;
break;
+ case 'V':
+ puts(curses_version());
+ return EXIT_SUCCESS;
default:
usage();
/* NOTREACHED */
}
- argc -= optind;
- argv += optind;
+ }
- if (cmdline && argc == 0) {
- usage();
- /* NOTREACHED */
+ /*
+ * Modify the argument list to omit the options we processed.
+ */
+ if (is_reset || is_init) {
+ if (optind-- < argc) {
+ argc -= optind;
+ argv += optind;
+ }
+ argv[0] = prg_name;
+ } else {
+ argc -= optind;
+ argv += optind;
}
if (term == 0 || *term == '\0')
@@ -293,8 +363,11 @@ main(int argc, char **argv)
if (setupterm(term, STDOUT_FILENO, &errret) != OK && errret <= 0)
quit(3, "unknown terminal \"%s\"", term);
- if (cmdline)
+ if (cmdline) {
+ if ((argc <= 0) && !is_reset && !is_init)
+ usage();
return tput(argc, argv);
+ }
while (fgets(buf, sizeof(buf), stdin) != 0) {
char *argvec[16]; /* command, 9 parms, null, & slop */
diff --git a/contrib/ncurses/progs/tset.c b/contrib/ncurses/progs/tset.c
index 392aac0ef551..d8dbda4974f5 100644
--- a/contrib/ncurses/progs/tset.c
+++ b/contrib/ncurses/progs/tset.c
@@ -101,8 +101,9 @@ char *ttyname(int fd);
#include <curses.h> /* for bool typedef */
#include <dump_entry.h>
+#include <transform.h>
-MODULE_ID("$Id: tset.c,v 0.41 2000/03/12 00:03:00 tom Exp $")
+MODULE_ID("$Id: tset.c,v 0.47 2000/10/08 01:01:08 tom Exp $")
extern char **environ;
@@ -113,9 +114,9 @@ const char *_nc_progname = "tset";
static TTY mode, oldmode;
+static bool isreset = FALSE; /* invoked as reset */
static int terasechar = -1; /* new erase character */
static int intrchar = -1; /* new interrupt character */
-static int isreset; /* invoked as reset */
static int tkillchar = -1; /* new kill character */
static int tlines, tcolumns; /* window size */
@@ -233,7 +234,7 @@ typedef struct map {
const char *porttype; /* Port type, or "" for any. */
const char *type; /* Terminal type to select. */
int conditional; /* Baud rate conditionals bitmask. */
- speed_t speed; /* Baud rate to compare against. */
+ int speed; /* Baud rate to compare against. */
} MAP;
static MAP *cur, *maplist;
@@ -260,10 +261,19 @@ static const SPEEDS speeds[] =
{"2400", B2400},
{"4800", B4800},
{"9600", B9600},
+ /* sgttyb may define up to this point */
+#ifdef B19200
{"19200", B19200},
+#endif
+#ifdef B38400
{"38400", B38400},
+#endif
+#ifdef B19200
{"19200", B19200},
+#endif
+#ifdef B38400
{"38400", B38400},
+#endif
#ifdef B19200
{"19200", B19200},
#else
@@ -505,10 +515,7 @@ get_termcap_entry(char *userarg)
goto map;
if ((ttypath = ttyname(STDERR_FILENO)) != 0) {
- if ((p = strrchr(ttypath, '/')) != 0)
- ++p;
- else
- p = ttypath;
+ p = _nc_basename(ttypath);
#if HAVE_GETTTYNAM
/*
* We have the 4.3BSD library call getttynam(3); that means
@@ -582,15 +589,15 @@ get_termcap_entry(char *userarg)
}
/* Find the terminfo entry. If it doesn't exist, ask the user. */
while ((rval = setupterm((NCURSES_CONST char *) ttype, STDOUT_FILENO,
- &errret)) != OK) {
+ &errret)) != OK) {
if (errret == 0) {
(void) fprintf(stderr, "tset: unknown terminal type %s\n",
- ttype);
+ ttype);
ttype = 0;
} else {
(void) fprintf(stderr,
- "tset: can't initialize terminal type %s (error %d)\n",
- ttype, errret);
+ "tset: can't initialize terminal type %s (error %d)\n",
+ ttype, errret);
ttype = 0;
}
ttype = askuser(ttype);
@@ -683,46 +690,46 @@ reset_mode(void)
mode.c_iflag &= ~(IGNBRK | PARMRK | INPCK | ISTRIP | INLCR | IGNCR
#ifdef IUCLC
- | IUCLC
+ | IUCLC
#endif
#ifdef IXANY
- | IXANY
+ | IXANY
#endif
- | IXOFF);
+ | IXOFF);
mode.c_iflag |= (BRKINT | IGNPAR | ICRNL | IXON
#ifdef IMAXBEL
- | IMAXBEL
+ | IMAXBEL
#endif
);
mode.c_oflag &= ~(0
#ifdef OLCUC
- | OLCUC
+ | OLCUC
#endif
#ifdef OCRNL
- | OCRNL
+ | OCRNL
#endif
#ifdef ONOCR
- | ONOCR
+ | ONOCR
#endif
#ifdef ONLRET
- | ONLRET
+ | ONLRET
#endif
#ifdef OFILL
- | OFILL
+ | OFILL
#endif
#ifdef OFDEL
- | OFDEL
+ | OFDEL
#endif
#ifdef NLDLY
- | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY
+ | NLDLY | CRDLY | TABDLY | BSDLY | VTDLY | FFDLY
#endif
);
mode.c_oflag |= (OPOST
#ifdef ONLCR
- | ONLCR
+ | ONLCR
#endif
);
@@ -730,22 +737,22 @@ reset_mode(void)
mode.c_cflag |= (CS8 | CREAD);
mode.c_lflag &= ~(ECHONL | NOFLSH
#ifdef TOSTOP
- | TOSTOP
+ | TOSTOP
#endif
#ifdef ECHOPTR
- | ECHOPRT
+ | ECHOPRT
#endif
#ifdef XCASE
- | XCASE
+ | XCASE
#endif
);
mode.c_lflag |= (ISIG | ICANON | ECHO | ECHOE | ECHOK
#ifdef ECHOCTL
- | ECHOCTL
+ | ECHOCTL
#endif
#ifdef ECHOKE
- | ECHOKE
+ | ECHOKE
#endif
);
#endif
@@ -761,6 +768,7 @@ reset_mode(void)
* Returns a "good" value for the erase character. This is loosely based on
* the BSD4.4 logic.
*/
+#ifdef TERMIOS
static int
default_erase(void)
{
@@ -775,6 +783,7 @@ default_erase(void)
return result;
}
+#endif
/*
* Update the values of the erase, interrupt, and kill characters in 'mode'.
@@ -954,10 +963,10 @@ set_tabs()
/*
* Tell the user if a control key has been changed from the default value.
*/
+#ifdef TERMIOS
static void
report(const char *name, int which, unsigned def)
{
-#ifdef TERMIOS
unsigned older, newer;
char *p;
@@ -976,16 +985,16 @@ report(const char *name, int which, unsigned def)
if (newer == 0177)
(void) fprintf(stderr, "delete.\n");
else if ((p = key_backspace) != 0
- && newer == (unsigned char) p[0]
- && p[1] == '\0')
+ && newer == (unsigned char) p[0]
+ && p[1] == '\0')
(void) fprintf(stderr, "backspace.\n");
else if (newer < 040) {
newer ^= 0100;
(void) fprintf(stderr, "control-%c (^%c).\n", newer, newer);
} else
(void) fprintf(stderr, "%c.\n", newer);
-#endif
}
+#endif
/*
* Convert the obsolete argument forms into something that getopt can handle.
@@ -1025,7 +1034,7 @@ static void
usage(const char *pname)
{
(void) fprintf(stderr,
- "usage: %s [-IQrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]\n", pname);
+ "usage: %s [-IQVrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [terminal]\n", pname);
exit(EXIT_FAILURE);
}
@@ -1047,32 +1056,24 @@ main(int argc, char **argv)
const char *p;
const char *ttype;
-#ifdef TERMIOS
- if (tcgetattr(STDERR_FILENO, &mode) < 0)
+ if (GET_TTY(STDERR_FILENO, &mode) < 0)
failed("standard error");
-
oldmode = mode;
+#ifdef TERMIOS
ospeed = cfgetospeed(&mode);
#else
- if (gtty(STDERR_FILENO, &mode) < 0)
- failed("standard error");
-
- oldmode = mode;
ospeed = mode.sg_ospeed;
#endif
- if ((p = strrchr(*argv, '/')) != 0)
- ++p;
- else
- p = *argv;
- if (!CaselessCmp(p, "reset")) {
- isreset = 1;
+ p = _nc_basename(*argv);
+ if (!strcmp(p, PROG_RESET)) {
+ isreset = TRUE;
reset_mode();
}
obsolete(argv);
noinit = noset = quiet = Sflag = sflag = showterm = 0;
- while ((ch = getopt(argc, argv, "a:d:e:Ii:k:m:np:qQSrs")) != EOF) {
+ while ((ch = getopt(argc, argv, "a:d:e:Ii:k:m:np:qQSrsV")) != EOF) {
switch (ch) {
case 'q': /* display term only */
noset = 1;
@@ -1115,6 +1116,9 @@ main(int argc, char **argv)
case 's': /* output TERM set command */
sflag = 1;
break;
+ case 'V':
+ puts(curses_version());
+ return EXIT_SUCCESS;
case '?':
default:
usage(*argv);
@@ -1170,11 +1174,13 @@ main(int argc, char **argv)
* If erase, kill and interrupt characters could have been
* modified and not -Q, display the changes.
*/
+#ifdef TERMIOS
if (!quiet) {
report("Erase", VERASE, CERASE);
report("Kill", VKILL, CINTR);
report("Interrupt", VINTR, CKILL);
}
+#endif
}
if (Sflag)
diff --git a/contrib/ncurses/tack/Makefile.in b/contrib/ncurses/tack/Makefile.in
index a4d08ead9264..f3f3c21b6d61 100644
--- a/contrib/ncurses/tack/Makefile.in
+++ b/contrib/ncurses/tack/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.18 2000/05/28 01:28:24 tom Exp $
+# $Id: Makefile.in,v 1.22 2000/08/26 21:51:23 tom Exp $
# Makefile for tack
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
@@ -18,7 +18,7 @@ CF_MFLAGS = @cf_cv_makeflags@
x = @PROG_EXT@
MODEL = ../@DFT_OBJ_SUBDIR@
-INSTALL_PREFIX = @INSTALL_PREFIX@
+DESTDIR = @DESTDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -28,8 +28,6 @@ mandir = @mandir@/man1
includedir = @includedir@
datadir = @datadir@
-ticdir = $(datadir)/terminfo
-
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -49,7 +47,7 @@ CCFLAGS = $(CPPFLAGS) $(CFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
-CFLAGS_SHARED = $(CCFLAGS) # @CC_SHARED_OPTS@
+CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@@ -88,17 +86,17 @@ install.libs \
uninstall.libs:
install.tack: $(PROGS) \
- $(INSTALL_PREFIX)$(bindir) \
- $(INSTALL_PREFIX)$(mandir)
- $(INSTALL_PROGRAM) tack$x $(INSTALL_PREFIX)$(bindir)/tack$x
- $(INSTALL_DATA) $(srcdir)/tack.1 $(INSTALL_PREFIX)$(mandir)/tack.1
+ $(DESTDIR)$(bindir) \
+ $(DESTDIR)$(mandir)
+ $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x
+ $(INSTALL_DATA) $(srcdir)/tack.1 $(DESTDIR)$(mandir)/tack.1
uninstall.tack:
- -@rm -f $(INSTALL_PREFIX)$(bindir)/tack$x
- -@rm -f $(INSTALL_PREFIX)$(mandir)/tack.1
+ -@rm -f $(DESTDIR)$(bindir)/tack$x
+ -@rm -f $(DESTDIR)$(mandir)/tack.1
-$(INSTALL_PREFIX)$(bindir) \
-$(INSTALL_PREFIX)$(mandir) :
+$(DESTDIR)$(bindir) \
+$(DESTDIR)$(mandir) :
$(srcdir)/../mkinstalldirs $@
#
@@ -133,8 +131,8 @@ tack$x: $(DEPS_TACK) $(DEPS_CURSES)
tags:
ctags *.[ch]
-TAGS:
- etags *.[ch]
+@MAKE_UPPER_TAGS@TAGS:
+@MAKE_UPPER_TAGS@ etags *.[ch]
clean ::
-rm -f tags TAGS do.tic *~
diff --git a/contrib/ncurses/tack/sysdep.c b/contrib/ncurses/tack/sysdep.c
index 43ef4457f2a9..25376578fbcd 100644
--- a/contrib/ncurses/tack/sysdep.c
+++ b/contrib/ncurses/tack/sysdep.c
@@ -43,23 +43,37 @@
#endif
#endif
-MODULE_ID("$Id: sysdep.c,v 1.7 2000/03/04 21:02:11 tom Exp $")
+MODULE_ID("$Id: sysdep.c,v 1.9 2000/09/02 19:17:39 tom Exp $")
#if DECL_ERRNO
extern int errno;
#endif
+#ifdef TERMIOS
+#define PUT_TTY(fd, buf) tcsetattr(fd, TCSAFLUSH, buf)
+#else
+#define PUT_TTY(fd, buf) stty(fd, buf)
+#endif
+
/* globals */
int tty_frame_size; /* asynch frame size times 2 */
unsigned long tty_baud_rate; /* baud rate - bits per second */
int not_a_tty; /* TRUE if output is not a tty (i.e. pipe) */
int nodelay_read; /* TRUE if NDELAY is set */
+#ifdef TERMIOS
#define TTY_IS_NOECHO !(new_modes.c_lflag & ECHO)
#define TTY_IS_OUT_TRANS (new_modes.c_oflag & OPOST)
#define TTY_IS_CHAR_MODE !(new_modes.c_lflag & ICANON)
#define TTY_WAS_CS8 ((old_modes.c_cflag & CSIZE) == CS8)
#define TTY_WAS_XON_XOFF (old_modes.c_iflag & (IXON|IXOFF))
+#else
+#define TTY_IS_NOECHO !(new_modes.sg_flags & (ECHO))
+#define TTY_IS_OUT_TRANS (new_modes.sg_flags & (CRMOD))
+#define TTY_IS_CHAR_MODE (new_modes.sg_flags & (RAW|CBREAK))
+#define TTY_WAS_CS8 (old_modes.sg_flags & (PASS8))
+#define TTY_WAS_XON_XOFF (old_modes.sg_flags & (TANDEM|MDMBUF|DECCTQ))
+#endif
static TTY old_modes, new_modes;
@@ -89,6 +103,7 @@ void
tty_raw(int minch GCC_UNUSED, int mask)
{ /* set tty to raw noecho */
new_modes = old_modes;
+#ifdef TERMIOS
#if HAVE_SELECT
new_modes.c_cc[VMIN] = 1;
#else
@@ -108,15 +123,19 @@ tty_raw(int minch GCC_UNUSED, int mask)
new_modes.c_iflag &=
~(IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK | ISTRIP | INLCR | IGNCR | ICRNL |
IUCLC | IXON | IXANY | IXOFF);
+#else
+ new_modes.sg_flags |= RAW;
+#endif
if (not_a_tty)
return;
- tcsetattr(fileno(stdin), TCSAFLUSH, &new_modes);
+ PUT_TTY(fileno(stdin), &new_modes);
}
void
tty_set(void)
{ /* set tty to special modes */
new_modes = old_modes;
+#ifdef TERMIOS
new_modes.c_cc[VMIN] = 1;
new_modes.c_cc[VTIME] = 1;
new_modes.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHONL);
@@ -132,7 +151,7 @@ tty_set(void)
new_modes.c_iflag &= ~(IXON | IXOFF);
break;
case 1:
-#if sequent
+#if defined(sequent) && sequent
/* the sequent System V emulation is broken */
new_modes = old_modes;
new_modes.c_cc[VEOL] = 6; /* control F (ACK) */
@@ -159,9 +178,12 @@ tty_set(void)
}
if (!(new_modes.c_oflag & ~OPOST))
new_modes.c_oflag &= ~OPOST;
+#else
+ new_modes.sg_flags |= RAW;
if (not_a_tty)
return;
- tcsetattr(fileno(stdin), TCSAFLUSH, &new_modes);
+#endif
+ PUT_TTY(fileno(stdin), &new_modes);
}
@@ -171,7 +193,7 @@ tty_reset(void)
fflush(stdout);
if (not_a_tty)
return;
- tcsetattr(fileno(stdin), TCSAFLUSH, &old_modes);
+ PUT_TTY(fileno(stdin), &old_modes);
}
@@ -187,7 +209,7 @@ tty_init(void)
nodelay_read = FALSE;
#endif
not_a_tty = FALSE;
- if (tcgetattr(fileno(stdin), &old_modes) == -1) {
+ if (GET_TTY(fileno(stdin), &old_modes) == -1) {
if (errno == ENOTTY) {
tty_frame_size = 20;
not_a_tty = TRUE;
@@ -198,10 +220,12 @@ tty_init(void)
}
/* if TAB3 is set then setterm() wipes out tabs (ht) */
new_modes = old_modes;
+#ifdef TERMIOS
#ifdef TABDLY
new_modes.c_oflag &= ~TABDLY;
#endif /* TABDLY */
- if (tcsetattr(fileno(stdin), TCSAFLUSH, &new_modes) == -1) {
+#endif
+ if (PUT_TTY(fileno(stdin), &new_modes) == -1) {
printf("tcsetattr error: %d\n", errno);
exit(1);
}
@@ -211,6 +235,7 @@ tty_init(void)
old_modes.c_cflag |= CS7 | PARENB;
#endif
catchsig();
+#ifdef TERMIOS
switch (old_modes.c_cflag & CSIZE) {
#if defined(CS5) && (CS5 != 0)
case CS5:
@@ -236,6 +261,10 @@ tty_init(void)
tty_frame_size += 2 +
((old_modes.c_cflag & PARENB) ? 2 : 0) +
((old_modes.c_cflag & CSTOPB) ? 4 : 2);
+#else
+ tty_frame_size = 6 +
+ (old_modes.sg_flags & PASS8) ? 16 : 14;
+#endif
}
/*
diff --git a/contrib/ncurses/test/cardfile.c b/contrib/ncurses/test/cardfile.c
index 980ffbeba94c..75d207764a93 100644
--- a/contrib/ncurses/test/cardfile.c
+++ b/contrib/ncurses/test/cardfile.c
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: cardfile.c,v 1.4 2000/03/19 01:34:00 tom Exp $
+ * $Id: cardfile.c,v 1.5 2000/09/09 19:08:32 tom Exp $
*
* File format: text beginning in column 1 is a title; other text forms the content.
*/
@@ -72,8 +72,8 @@ strdup(char *s)
}
#endif /* not HAVE_STRDUP */
-static char *
-skip(char *buffer)
+static const char *
+skip(const char *buffer)
{
while (isspace(*buffer))
buffer++;
@@ -119,7 +119,7 @@ add_title(const char *title)
}
static void
-add_content(CARD * card, char *content)
+add_content(CARD * card, const char *content)
{
unsigned total, offset;
@@ -359,7 +359,7 @@ cardfile(char *fname)
doupdate();
switch (form_driver(top_card->form, ch =
- form_virtualize(panel_window(top_card->panel)))) {
+ form_virtualize(panel_window(top_card->panel)))) {
case E_OK:
break;
case E_UNKNOWN_COMMAND:
diff --git a/contrib/ncurses/test/configure b/contrib/ncurses/test/configure
index 2266114152d6..e27f5ef57faf 100755
--- a/contrib/ncurses/test/configure
+++ b/contrib/ncurses/test/configure
@@ -886,6 +886,7 @@ fi
if test -f $p/include/ncurses/curses.h
then
CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
+ test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
test $p != /usr && LIBS="-L$p/lib $LIBS"
break
elif test $p != /usr
@@ -907,12 +908,12 @@ fi
echo $ac_n "checking for initscr""... $ac_c" 1>&6
-echo "configure:911: checking for initscr" >&5
+echo "configure:912: checking for initscr" >&5
if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 916 "configure"
+#line 917 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr(); below. */
@@ -935,7 +936,7 @@ initscr();
; return 0; }
EOF
-if { (eval echo configure:939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_initscr=yes"
else
@@ -954,7 +955,7 @@ else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for initscr in -l$LIB_NAME""... $ac_c" 1>&6
-echo "configure:958: checking for initscr in -l$LIB_NAME" >&5
+echo "configure:959: checking for initscr in -l$LIB_NAME" >&5
ac_lib_var=`echo $LIB_NAME'_'initscr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -962,7 +963,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$LIB_NAME $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 966 "configure"
+#line 967 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -973,7 +974,7 @@ int main() {
initscr()
; return 0; }
EOF
-if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1003,7 +1004,7 @@ fi
fi
echo $ac_n "checking for form_driver in -lform""... $ac_c" 1>&6
-echo "configure:1007: checking for form_driver in -lform" >&5
+echo "configure:1008: checking for form_driver in -lform" >&5
ac_lib_var=`echo form'_'form_driver | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1011,7 +1012,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lform $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1015 "configure"
+#line 1016 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1022,7 +1023,7 @@ int main() {
form_driver()
; return 0; }
EOF
-if { (eval echo configure:1026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1050,7 +1051,7 @@ else
fi
echo $ac_n "checking for menu_driver in -lmenu""... $ac_c" 1>&6
-echo "configure:1054: checking for menu_driver in -lmenu" >&5
+echo "configure:1055: checking for menu_driver in -lmenu" >&5
ac_lib_var=`echo menu'_'menu_driver | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1058,7 +1059,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmenu $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1062 "configure"
+#line 1063 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1069,7 +1070,7 @@ int main() {
menu_driver()
; return 0; }
EOF
-if { (eval echo configure:1073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1097,7 +1098,7 @@ else
fi
echo $ac_n "checking for new_panel in -lpanel""... $ac_c" 1>&6
-echo "configure:1101: checking for new_panel in -lpanel" >&5
+echo "configure:1102: checking for new_panel in -lpanel" >&5
ac_lib_var=`echo panel'_'new_panel | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1105,7 +1106,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpanel $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1109 "configure"
+#line 1110 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1116,7 +1117,7 @@ int main() {
new_panel()
; return 0; }
EOF
-if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1145,12 +1146,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1149: checking return type of signal handlers" >&5
+echo "configure:1150: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1154 "configure"
+#line 1155 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -1167,7 +1168,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -1187,7 +1188,7 @@ EOF
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1191: checking how to run the C preprocessor" >&5
+echo "configure:1192: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1202,13 +1203,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1206 "configure"
+#line 1207 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1219,13 +1220,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1223 "configure"
+#line 1224 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1236,13 +1237,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1240 "configure"
+#line 1241 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1267,12 +1268,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1271: checking for ANSI C header files" >&5
+echo "configure:1272: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1276 "configure"
+#line 1277 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1280,7 +1281,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1297,7 +1298,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1301 "configure"
+#line 1302 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1315,7 +1316,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1319 "configure"
+#line 1320 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1336,7 +1337,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1340 "configure"
+#line 1341 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1347,7 +1348,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1371,12 +1372,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1375: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1376: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1380 "configure"
+#line 1381 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1385,7 +1386,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1420,17 +1421,17 @@ unistd.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1424: checking for $ac_hdr" >&5
+echo "configure:1425: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1429 "configure"
+#line 1430 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1468,12 +1469,12 @@ wresize \
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1472: checking for $ac_func" >&5
+echo "configure:1473: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1477 "configure"
+#line 1478 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1496,7 +1497,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1522,7 +1523,7 @@ done
echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
-echo "configure:1526: checking for function curses_version" >&5
+echo "configure:1527: checking for function curses_version" >&5
if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1531,7 +1532,7 @@ if test "$cross_compiling" = yes; then
cf_cv_func_curses_version=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 1535 "configure"
+#line 1536 "configure"
#include "confdefs.h"
#include <curses.h>
@@ -1543,7 +1544,7 @@ int main()
}
EOF
-if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
cf_cv_func_curses_version=yes
@@ -1567,13 +1568,13 @@ EOF
echo $ac_n "checking if sys/time.h conflicts with sys/select.h""... $ac_c" 1>&6
-echo "configure:1571: checking if sys/time.h conflicts with sys/select.h" >&5
+echo "configure:1572: checking if sys/time.h conflicts with sys/select.h" >&5
if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1577 "configure"
+#line 1578 "configure"
#include "confdefs.h"
#if HAVE_SYS_TIME_H
@@ -1587,7 +1588,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:1591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cf_cv_sys_time_select=yes
else
diff --git a/contrib/ncurses/test/configure.in b/contrib/ncurses/test/configure.in
index 35e2b47cb9ae..3399932c3622 100644
--- a/contrib/ncurses/test/configure.in
+++ b/contrib/ncurses/test/configure.in
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998,1999 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -26,9 +26,9 @@ dnl sale, use or other dealings in this Software without prior written *
dnl authorization. *
dnl***************************************************************************
dnl
-dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,1998
+dnl Author: Thomas E. Dickey 1996,1997,1998,2000
dnl
-dnl $Id: configure.in,v 1.29 1999/12/19 03:12:13 tom Exp $
+dnl $Id: configure.in,v 1.30 2000/08/12 22:43:08 tom Exp $
dnl This is a simple configuration-script for the ncurses test programs that
dnl allows the test-directory to be separately configured against a reference
dnl system (i.e., sysvr4 curses)
@@ -36,7 +36,7 @@ dnl
dnl If you're configuring ncurses, you shouldn't need to use this script.
dnl It's only for testing purposes.
dnl
-dnl dickey@clark.net (Thomas Dickey)
+dnl dickey@herndon4.his.com (Thomas Dickey)
AC_PREREQ(2.12)
AC_INIT(ncurses.c)
AC_CONFIG_HEADER(ncurses_cfg.h:ncurses_tst.hin)
@@ -86,6 +86,7 @@ AC_ARG_WITH(ncurses,
if test -f $p/include/ncurses/curses.h
then
CPPFLAGS="$CPPFLAGS -I$p/include/ncurses"
+ test $p != /usr && CPPFLAGS="$CPPFLAGS -I$p/include"
test $p != /usr && LIBS="-L$p/lib $LIBS"
break
elif test $p != /usr
diff --git a/contrib/ncurses/test/filter.c b/contrib/ncurses/test/filter.c
index 5d161cb64d6e..272f3722b7c7 100644
--- a/contrib/ncurses/test/filter.c
+++ b/contrib/ncurses/test/filter.c
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1998
*
- * $Id: filter.c,v 1.3 1999/11/13 23:39:19 tom Exp $
+ * $Id: filter.c,v 1.4 2000/09/02 18:50:38 tom Exp $
*/
#include <test.priv.h>
@@ -50,60 +50,60 @@
#define getnstr(s,n) getstr(s)
#endif
-static int new_command(char *buffer, int length, attr_t underline)
+static int
+new_command(char *buffer, int length, attr_t underline)
{
- int code;
+ int code;
- attron(A_BOLD);
- printw("Command: ");
- attron(underline);
- code = getnstr(buffer, length);
- attroff(underline);
- attroff(A_BOLD);
- printw("\n");
+ attron(A_BOLD);
+ printw("Command: ");
+ attron(underline);
+ code = getnstr(buffer, length);
+ attroff(underline);
+ attroff(A_BOLD);
+ printw("\n");
- return code;
+ return code;
}
-int main(
- int argc GCC_UNUSED,
- char *argv[] GCC_UNUSED)
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
- SCREEN *sp;
- char buffer[80];
- attr_t underline;
+ SCREEN *sp;
+ char buffer[80];
+ attr_t underline;
- filter();
- sp = newterm((char *)0, stdout, stdin);
- cbreak();
- keypad(stdscr, TRUE);
+ filter();
+ sp = newterm((char *) 0, stdout, stdin);
+ cbreak();
+ keypad(stdscr, TRUE);
- if (has_colors()) {
- int background = COLOR_BLACK;
- start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
- if (use_default_colors () != ERR)
- background = -1;
+ if (has_colors()) {
+ int background = COLOR_BLACK;
+ start_color();
+#if HAVE_USE_DEFAULT_COLORS
+ if (use_default_colors() != ERR)
+ background = -1;
#endif
- init_pair(1, COLOR_CYAN, background);
- underline = COLOR_PAIR(1);
- } else {
- underline = A_UNDERLINE;
- }
+ init_pair(1, COLOR_CYAN, background);
+ underline = COLOR_PAIR(1);
+ } else {
+ underline = A_UNDERLINE;
+ }
- while (new_command(buffer, sizeof(buffer)-1, underline) != ERR
- && strlen(buffer) != 0) {
- reset_shell_mode();
- printf("\n");
- fflush(stdout);
- system(buffer);
- reset_prog_mode();
- touchwin(stdscr);
- erase();
- refresh();
- }
- printw("done");
+ while (new_command(buffer, sizeof(buffer) - 1, underline) != ERR
+ && strlen(buffer) != 0) {
+ reset_shell_mode();
+ printf("\n");
+ fflush(stdout);
+ system(buffer);
+ reset_prog_mode();
+ touchwin(stdscr);
+ erase();
refresh();
- endwin();
- return 0;
+ }
+ printw("done");
+ refresh();
+ endwin();
+ return 0;
}
diff --git a/contrib/ncurses/test/firework.c b/contrib/ncurses/test/firework.c
index ba5cbda2f7d4..66c1227cf0f0 100644
--- a/contrib/ncurses/test/firework.c
+++ b/contrib/ncurses/test/firework.c
@@ -1,5 +1,5 @@
/*
- * $Id: firework.c,v 1.16 1999/11/13 23:39:16 tom Exp $
+ * $Id: firework.c,v 1.17 2000/09/02 18:41:12 tom Exp $
*/
#include <test.priv.h>
@@ -133,7 +133,7 @@ main(
if (has_colors()) {
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
my_bg = -1;
#endif
diff --git a/contrib/ncurses/test/gdc.c b/contrib/ncurses/test/gdc.c
index ea88d6c54754..df9a0c3fdf5c 100644
--- a/contrib/ncurses/test/gdc.c
+++ b/contrib/ncurses/test/gdc.c
@@ -6,7 +6,7 @@
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
*
- * $Id: gdc.c,v 1.14 2000/04/23 00:03:11 tom Exp $
+ * $Id: gdc.c,v 1.15 2000/09/02 18:40:39 tom Exp $
*/
#include <test.priv.h>
@@ -179,7 +179,7 @@ main(int argc, char *argv[])
if (hascolor) {
int bg = COLOR_BLACK;
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
bg = -1;
#endif
diff --git a/contrib/ncurses/test/hanoi.c b/contrib/ncurses/test/hanoi.c
index 23a864624b01..0b032f8318ca 100644
--- a/contrib/ncurses/test/hanoi.c
+++ b/contrib/ncurses/test/hanoi.c
@@ -14,7 +14,7 @@
*
* Date: 05.Nov.90
*
- * $Id: hanoi.c,v 1.18 2000/04/01 20:01:08 tom Exp $
+ * $Id: hanoi.c,v 1.19 2000/09/02 18:51:16 tom Exp $
*/
#include <test.priv.h>
@@ -36,22 +36,24 @@
#define OTHER(a,b) (3-((a)+(b)))
struct Peg {
- size_t Length[MAXTILES];
- int Count;
+ size_t Length[MAXTILES];
+ int Count;
};
static struct Peg Pegs[NPEGS];
-static int PegPos[] = { LEFTPEG, MIDPEG, RIGHTPEG };
-static int TileColour[] = {
- COLOR_GREEN, /* Length 3 */
- COLOR_MAGENTA, /* Length 5 */
- COLOR_RED, /* Length 7 */
- COLOR_BLUE, /* Length 9 */
- COLOR_CYAN, /* Length 11 */
- COLOR_YELLOW, /* Length 13 */
- COLOR_GREEN, /* Length 15 */
- COLOR_MAGENTA, /* Length 17 */
- COLOR_RED, /* Length 19 */
+static int PegPos[] =
+{LEFTPEG, MIDPEG, RIGHTPEG};
+static int TileColour[] =
+{
+ COLOR_GREEN, /* Length 3 */
+ COLOR_MAGENTA, /* Length 5 */
+ COLOR_RED, /* Length 7 */
+ COLOR_BLUE, /* Length 9 */
+ COLOR_CYAN, /* Length 11 */
+ COLOR_YELLOW, /* Length 13 */
+ COLOR_GREEN, /* Length 15 */
+ COLOR_MAGENTA, /* Length 17 */
+ COLOR_RED, /* Length 19 */
};
static int NMoves = 0;
@@ -67,232 +69,235 @@ static int InvalidMove(int From, int To);
int
main(int argc, char **argv)
{
-int NTiles, FromCol, ToCol;
-unsigned char AutoFlag = 0;
+ int NTiles, FromCol, ToCol;
+ unsigned char AutoFlag = 0;
- switch(argc) {
- case 1:
- NTiles = DEFAULTTILES;
- break;
- case 2:
- NTiles = atoi(argv[1]);
- if (NTiles > MAXTILES || NTiles < MINTILES) {
- fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
- return EXIT_FAILURE;
- }
- break;
- case 3:
- if (strcmp(argv[2], "a")) {
- Usage();
- return EXIT_FAILURE;
- }
- NTiles = atoi(argv[1]);
- if (NTiles > MAXTILES || NTiles < MINTILES) {
- fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
- return EXIT_FAILURE;
- }
- AutoFlag = TRUE;
- break;
- default:
- Usage();
- return EXIT_FAILURE;
+ switch (argc) {
+ case 1:
+ NTiles = DEFAULTTILES;
+ break;
+ case 2:
+ NTiles = atoi(argv[1]);
+ if (NTiles > MAXTILES || NTiles < MINTILES) {
+ fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
+ return EXIT_FAILURE;
+ }
+ break;
+ case 3:
+ if (strcmp(argv[2], "a")) {
+ Usage();
+ return EXIT_FAILURE;
}
+ NTiles = atoi(argv[1]);
+ if (NTiles > MAXTILES || NTiles < MINTILES) {
+ fprintf(stderr, "Range %d to %d\n", MINTILES, MAXTILES);
+ return EXIT_FAILURE;
+ }
+ AutoFlag = TRUE;
+ break;
+ default:
+ Usage();
+ return EXIT_FAILURE;
+ }
#ifdef TRACE
- trace(TRACE_MAXIMUM);
+ trace(TRACE_MAXIMUM);
#endif
- initscr();
- if (has_colors()) {
- int i;
- int bg = COLOR_BLACK;
- start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
- if (use_default_colors() == OK)
- bg = -1;
+ initscr();
+ if (has_colors()) {
+ int i;
+ int bg = COLOR_BLACK;
+ start_color();
+#if HAVE_USE_DEFAULT_COLORS
+ if (use_default_colors() == OK)
+ bg = -1;
#endif
- for (i = 0; i < 9; i++)
- init_pair(i+1, bg, TileColour[i]);
- }
- cbreak();
- if (LINES < 24) {
- endwin();
- fprintf(stderr, "Min screen length 24 lines\n");
- return EXIT_FAILURE;
- }
- if(AutoFlag) {
- curs_set(0);
- leaveok(stdscr, TRUE); /* Attempt to remove cursor */
- }
- InitTiles(NTiles);
- DisplayTiles();
- if(AutoFlag) {
- do {
- noecho();
- AutoMove(0, 2, NTiles);
- } while(!Solved(NTiles));
- sleep(2);
- } else {
- echo();
- for(;;) {
- if(GetMove(&FromCol, &ToCol))
- break;
- if(InvalidMove(FromCol, ToCol)) {
- mvaddstr(STATUSLINE, 0, "Invalid Move !!");
- refresh();
- beep();
- continue;
- }
- MakeMove(FromCol, ToCol);
- if(Solved(NTiles)) {
- mvprintw(STATUSLINE, 0, "Well Done !! You did it in %d moves", NMoves);
- refresh();
- sleep(5);
- break;
- }
- }
- }
+ for (i = 0; i < 9; i++)
+ init_pair(i + 1, bg, TileColour[i]);
+ }
+ cbreak();
+ if (LINES < 24) {
endwin();
- return EXIT_SUCCESS;
+ fprintf(stderr, "Min screen length 24 lines\n");
+ return EXIT_FAILURE;
+ }
+ if (AutoFlag) {
+ curs_set(0);
+ leaveok(stdscr, TRUE); /* Attempt to remove cursor */
+ }
+ InitTiles(NTiles);
+ DisplayTiles();
+ if (AutoFlag) {
+ do {
+ noecho();
+ AutoMove(0, 2, NTiles);
+ } while (!Solved(NTiles));
+ sleep(2);
+ } else {
+ echo();
+ for (;;) {
+ if (GetMove(&FromCol, &ToCol))
+ break;
+ if (InvalidMove(FromCol, ToCol)) {
+ mvaddstr(STATUSLINE, 0, "Invalid Move !!");
+ refresh();
+ beep();
+ continue;
+ }
+ MakeMove(FromCol, ToCol);
+ if (Solved(NTiles)) {
+ mvprintw(STATUSLINE, 0,
+ "Well Done !! You did it in %d moves", NMoves);
+ refresh();
+ sleep(5);
+ break;
+ }
+ }
+ }
+ endwin();
+ return EXIT_SUCCESS;
}
static int
InvalidMove(int From, int To)
{
- if(From >= NPEGS)
- return TRUE;
- if(From < 0)
- return TRUE;
- if(To >= NPEGS)
- return TRUE;
- if(To < 0)
- return TRUE;
- if(From == To)
- return TRUE;
- if(!Pegs[From].Count)
- return TRUE;
- if(Pegs[To].Count &&
- Pegs[From].Length[Pegs[From].Count-1] >
- Pegs[To].Length[Pegs[To].Count-1])
- return TRUE;
- return FALSE;
+ if (From >= NPEGS)
+ return TRUE;
+ if (From < 0)
+ return TRUE;
+ if (To >= NPEGS)
+ return TRUE;
+ if (To < 0)
+ return TRUE;
+ if (From == To)
+ return TRUE;
+ if (!Pegs[From].Count)
+ return TRUE;
+ if (Pegs[To].Count &&
+ Pegs[From].Length[Pegs[From].Count - 1] >
+ Pegs[To].Length[Pegs[To].Count - 1])
+ return TRUE;
+ return FALSE;
}
static void
InitTiles(int NTiles)
{
- int Size, SlotNo;
+ int Size, SlotNo;
- for(Size=NTiles*2+1, SlotNo=0; Size>=3; Size-=2)
- Pegs[0].Length[SlotNo++] = Size;
+ for (Size = NTiles * 2 + 1, SlotNo = 0; Size >= 3; Size -= 2)
+ Pegs[0].Length[SlotNo++] = Size;
- Pegs[0].Count = NTiles;
- Pegs[1].Count = 0;
- Pegs[2].Count = 0;
+ Pegs[0].Count = NTiles;
+ Pegs[1].Count = 0;
+ Pegs[2].Count = 0;
}
static void
DisplayTiles(void)
{
- int Line, peg, SlotNo;
- char TileBuf[BUFSIZ];
+ int Line, peg, SlotNo;
+ char TileBuf[BUFSIZ];
- erase();
- mvaddstr(1, 24, "T O W E R S O F H A N O I");
- mvaddstr(3, 34, "SJR 1990");
- mvprintw(19, 5, "Moves : %d", NMoves);
- attrset(A_REVERSE);
- mvaddstr(BASELINE, 8, " ");
+ erase();
+ mvaddstr(1, 24, "T O W E R S O F H A N O I");
+ mvaddstr(3, 34, "SJR 1990");
+ mvprintw(19, 5, "Moves : %d", NMoves);
+ attrset(A_REVERSE);
+ mvaddstr(BASELINE, 8,
+ " ");
- for(Line=TOPLINE; Line<BASELINE; Line++) {
- mvaddch(Line, LEFTPEG, ' ');
- mvaddch(Line, MIDPEG, ' ');
- mvaddch(Line, RIGHTPEG, ' ');
- }
- mvaddch(BASELINE, LEFTPEG, '1');
- mvaddch(BASELINE, MIDPEG, '2');
- mvaddch(BASELINE, RIGHTPEG, '3');
- attrset(A_NORMAL);
+ for (Line = TOPLINE; Line < BASELINE; Line++) {
+ mvaddch(Line, LEFTPEG, ' ');
+ mvaddch(Line, MIDPEG, ' ');
+ mvaddch(Line, RIGHTPEG, ' ');
+ }
+ mvaddch(BASELINE, LEFTPEG, '1');
+ mvaddch(BASELINE, MIDPEG, '2');
+ mvaddch(BASELINE, RIGHTPEG, '3');
+ attrset(A_NORMAL);
- /* Draw tiles */
- for(peg=0; peg<NPEGS; peg++) {
- for(SlotNo=0; SlotNo<Pegs[peg].Count; SlotNo++) {
- memset(TileBuf, ' ', Pegs[peg].Length[SlotNo]);
- TileBuf[Pegs[peg].Length[SlotNo]] = '\0';
- if (has_colors())
- attrset(COLOR_PAIR(LENTOIND(Pegs[peg].Length[SlotNo])));
- else
- attrset(A_REVERSE);
- mvaddstr(BASELINE-(SlotNo+1),
- (int)(PegPos[peg] - Pegs[peg].Length[SlotNo]/2),
- TileBuf);
- }
+ /* Draw tiles */
+ for (peg = 0; peg < NPEGS; peg++) {
+ for (SlotNo = 0; SlotNo < Pegs[peg].Count; SlotNo++) {
+ memset(TileBuf, ' ', Pegs[peg].Length[SlotNo]);
+ TileBuf[Pegs[peg].Length[SlotNo]] = '\0';
+ if (has_colors())
+ attrset(COLOR_PAIR(LENTOIND(Pegs[peg].Length[SlotNo])));
+ else
+ attrset(A_REVERSE);
+ mvaddstr(BASELINE - (SlotNo + 1),
+ (int) (PegPos[peg] - Pegs[peg].Length[SlotNo] / 2),
+ TileBuf);
}
- attrset(A_NORMAL);
- refresh();
+ }
+ attrset(A_NORMAL);
+ refresh();
}
static int
GetMove(int *From, int *To)
{
- mvaddstr(STATUSLINE, 0, "Next move ('q' to quit) from ");
- clrtoeol();
- refresh();
- if((*From = getch()) == 'q')
- return TRUE;
- *From -= ('0'+1);
- addstr(" to ");
- clrtoeol();
- refresh();
+ mvaddstr(STATUSLINE, 0, "Next move ('q' to quit) from ");
+ clrtoeol();
+ refresh();
+ if ((*From = getch()) == 'q')
+ return TRUE;
+ *From -= ('0' + 1);
+ addstr(" to ");
+ clrtoeol();
+ refresh();
- if((*To = getch()) == 'q')
- return TRUE;
- *To -= ('0'+1);
- refresh();
- napms(500);
+ if ((*To = getch()) == 'q')
+ return TRUE;
+ *To -= ('0' + 1);
+ refresh();
+ napms(500);
- move(STATUSLINE, 0);
- clrtoeol();
- refresh();
- return FALSE;
+ move(STATUSLINE, 0);
+ clrtoeol();
+ refresh();
+ return FALSE;
}
static void
MakeMove(int From, int To)
{
- Pegs[From].Count--;
- Pegs[To].Length[Pegs[To].Count] = Pegs[From].Length[Pegs[From].Count];
- Pegs[To].Count++;
- NMoves++;
- DisplayTiles();
+ Pegs[From].Count--;
+ Pegs[To].Length[Pegs[To].Count] = Pegs[From].Length[Pegs[From].Count];
+ Pegs[To].Count++;
+ NMoves++;
+ DisplayTiles();
}
static void
AutoMove(int From, int To, int Num)
{
- if(Num == 1) {
- MakeMove(From, To);
- napms(500);
- return;
- }
- AutoMove(From, OTHER(From, To), Num-1);
+ if (Num == 1) {
MakeMove(From, To);
napms(500);
- AutoMove(OTHER(From, To), To, Num-1);
+ return;
+ }
+ AutoMove(From, OTHER(From, To), Num - 1);
+ MakeMove(From, To);
+ napms(500);
+ AutoMove(OTHER(From, To), To, Num - 1);
}
static int
Solved(int NumTiles)
{
- int i;
+ int i;
- for(i = 1; i < NPEGS; i++)
- if (Pegs[i].Count == NumTiles)
- return TRUE;
- return FALSE;
+ for (i = 1; i < NPEGS; i++)
+ if (Pegs[i].Count == NumTiles)
+ return TRUE;
+ return FALSE;
}
static void
Usage()
{
- fprintf(stderr, "Usage: hanoi [<No Of Tiles>] [a]\n");
- fprintf(stderr, "The 'a' option causes the tower to be solved automatically\n");
+ fprintf(stderr, "Usage: hanoi [<No Of Tiles>] [a]\n");
+ fprintf(stderr,
+ "The 'a' option causes the tower to be solved automatically\n");
}
diff --git a/contrib/ncurses/test/hashtest.c b/contrib/ncurses/test/hashtest.c
index 514ac89656ab..52e5c2166224 100644
--- a/contrib/ncurses/test/hashtest.c
+++ b/contrib/ncurses/test/hashtest.c
@@ -3,7 +3,7 @@
*
* Generate timing statistics for vertical-motion optimization.
*
- * $Id: hashtest.c,v 1.14 1998/06/13 22:45:39 tom Exp $
+ * $Id: hashtest.c,v 1.15 2000/09/02 19:23:33 tom Exp $
*/
#ifdef TRACE
@@ -11,6 +11,7 @@
#define USE_TRACE 1
#else
#define Trace(p) /* nothing */
+#define USE_TRACE 0
#endif
#include <test.priv.h>
diff --git a/contrib/ncurses/test/knight.c b/contrib/ncurses/test/knight.c
index ad923b42b1de..0729d494388f 100644
--- a/contrib/ncurses/test/knight.c
+++ b/contrib/ncurses/test/knight.c
@@ -6,7 +6,7 @@
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
* added September 20th 1995.
*
- * $Id: knight.c,v 1.15 1999/11/13 23:39:10 tom Exp $
+ * $Id: knight.c,v 1.17 2000/09/02 18:48:19 tom Exp $
*/
#include <test.priv.h>
@@ -41,24 +41,22 @@
#define CXINV(x) (((x) - 1) / 4)
#define CYINV(y) (((y) - 2) / 2)
-typedef struct
-{
- short x, y;
-}
-cell;
-
-static short board[BDEPTH][BWIDTH]; /* the squares */
-static int rw,col; /* current row and column */
-static int lastrow,lastcol; /* last location visited */
-static cell history[BDEPTH*BWIDTH]; /* choice history */
-static int movecount; /* count of moves so far */
-static WINDOW *boardwin; /* the board window */
-static WINDOW *helpwin; /* the help window */
-static WINDOW *msgwin; /* the message window */
-static chtype trail = '#'; /* trail character */
-static chtype plus = '+'; /* cursor hot-spot character */
-static chtype minus = '-'; /* possible-move character */
-static chtype oldch;
+typedef struct {
+ short x, y;
+} cell;
+
+static short board[BDEPTH][BWIDTH]; /* the squares */
+static int rw, col; /* current row and column */
+static int lastrow, lastcol; /* last location visited */
+static cell history[BDEPTH * BWIDTH]; /* choice history */
+static int movecount; /* count of moves so far */
+static WINDOW *boardwin; /* the board window */
+static WINDOW *helpwin; /* the help window */
+static WINDOW *msgwin; /* the message window */
+static chtype trail = '#'; /* trail character */
+static chtype plus = '+'; /* cursor hot-spot character */
+static chtype minus = '-'; /* possible-move character */
+static chtype oldch;
static void init(void);
static void play(void);
@@ -67,11 +65,10 @@ static void drawmove(char, int, int, int, int);
static bool evalmove(int, int);
static bool chkmoves(void);
static bool chksqr(int, int);
-static int iabs(int);
+static int iabs(int);
-int main(
- int argc GCC_UNUSED,
- char *argv[] GCC_UNUSED)
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
init();
@@ -81,321 +78,324 @@ int main(
return EXIT_SUCCESS;
}
-static void init (void)
+static void
+init(void)
{
- srand ((unsigned)getpid());
- initscr ();
- cbreak (); /* immediate char return */
- noecho (); /* no immediate echo */
+ srand((unsigned) getpid());
+ initscr();
+ cbreak(); /* immediate char return */
+ noecho(); /* no immediate echo */
boardwin = newwin(BDEPTH * 2 + 1, BWIDTH * 4 + 1, BOARDY, BOARDX);
helpwin = newwin(0, 0, INSTRY, INSTRX);
- msgwin = newwin(1, INSTRX-1, NOTIFYY, 0);
+ msgwin = newwin(1, INSTRX - 1, NOTIFYY, 0);
scrollok(msgwin, TRUE);
keypad(boardwin, TRUE);
- if (has_colors())
- {
+ if (has_colors()) {
int bg = COLOR_BLACK;
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
bg = -1;
#endif
- (void) init_pair(TRAIL_COLOR, COLOR_CYAN, bg);
- (void) init_pair(PLUS_COLOR, COLOR_RED, bg);
+ (void) init_pair(TRAIL_COLOR, COLOR_CYAN, bg);
+ (void) init_pair(PLUS_COLOR, COLOR_RED, bg);
(void) init_pair(MINUS_COLOR, COLOR_GREEN, bg);
trail |= COLOR_PAIR(TRAIL_COLOR);
- plus |= COLOR_PAIR(PLUS_COLOR);
+ plus |= COLOR_PAIR(PLUS_COLOR);
minus |= COLOR_PAIR(MINUS_COLOR);
}
-
#ifdef NCURSES_MOUSE_VERSION
- (void) mousemask(BUTTON1_CLICKED, (mmask_t *)NULL);
-#endif /* NCURSES_MOUSE_VERSION*/
+ (void) mousemask(BUTTON1_CLICKED, (mmask_t *) NULL);
+#endif /* NCURSES_MOUSE_VERSION */
oldch = minus;
}
-static void help1(void)
+static void
+help1(void)
/* game explanation -- initial help screen */
{
- (void)waddstr(helpwin, "Knight's move is a solitaire puzzle. Your\n");
- (void)waddstr(helpwin, "objective is to visit each square of the \n");
- (void)waddstr(helpwin, "chessboard exactly once by making knight's\n");
- (void)waddstr(helpwin, "moves (one square right or left followed \n");
- (void)waddstr(helpwin, "by two squares up or down, or two squares \n");
- (void)waddstr(helpwin, "right or left followed by one square up or\n");
- (void)waddstr(helpwin, "down). You may start anywhere.\n\n");
-
- (void)waddstr(helpwin, "Use arrow keys to move the cursor around.\n");
- (void)waddstr(helpwin, "When you want to move your knight to the \n");
- (void)waddstr(helpwin, "cursor location, press <space> or Enter.\n");
- (void)waddstr(helpwin, "Illegal moves will be rejected with an \n");
- (void)waddstr(helpwin, "audible beep.\n\n");
- (void)waddstr(helpwin, "The program will detect if you solve the\n");
- (void)waddstr(helpwin, "puzzle; also inform you when you run out\n");
- (void)waddstr(helpwin, "of legal moves.\n\n");
-
- (void)mvwaddstr(helpwin, NOTIFYY-INSTRY, 0,
- "Press `?' to go to keystroke help.");
+ (void) waddstr(helpwin, "Knight's move is a solitaire puzzle. Your\n");
+ (void) waddstr(helpwin, "objective is to visit each square of the \n");
+ (void) waddstr(helpwin, "chessboard exactly once by making knight's\n");
+ (void) waddstr(helpwin, "moves (one square right or left followed \n");
+ (void) waddstr(helpwin, "by two squares up or down, or two squares \n");
+ (void) waddstr(helpwin, "right or left followed by one square up or\n");
+ (void) waddstr(helpwin, "down). You may start anywhere.\n\n");
+
+ (void) waddstr(helpwin, "Use arrow keys to move the cursor around.\n");
+ (void) waddstr(helpwin, "When you want to move your knight to the \n");
+ (void) waddstr(helpwin, "cursor location, press <space> or Enter.\n");
+ (void) waddstr(helpwin, "Illegal moves will be rejected with an \n");
+ (void) waddstr(helpwin, "audible beep.\n\n");
+ (void) waddstr(helpwin, "The program will detect if you solve the\n");
+ (void) waddstr(helpwin, "puzzle; also inform you when you run out\n");
+ (void) waddstr(helpwin, "of legal moves.\n\n");
+
+ (void) mvwaddstr(helpwin, NOTIFYY - INSTRY, 0,
+ "Press `?' to go to keystroke help.");
}
-static void help2(void)
+static void
+help2(void)
/* keystroke help screen */
{
- (void)waddstr(helpwin, "Possible moves are shown with `-'.\n\n");
-
- (void)waddstr(helpwin, "You can move around with the arrow keys or\n");
- (void)waddstr(helpwin, "with the rogue/hack movement keys. Other\n");
- (void)waddstr(helpwin, "commands allow you to undo moves or redraw.\n");
- (void)waddstr(helpwin, "Your mouse may work; try left-button to\n");
- (void)waddstr(helpwin, "move to the square under the pointer.\n\n");
-
- (void)waddstr(helpwin, "x,q -- exit y k u 7 8 9\n");
- (void)waddstr(helpwin, "r -- redraw screen \\|/ \\|/ \n");
- (void)waddstr(helpwin, "u -- undo move h-+-l 4-+-6\n");
- (void)waddstr(helpwin, " /|\\ /|\\ \n");
- (void)waddstr(helpwin, " b j n 1 2 3\n");
-
- (void)waddstr(helpwin,"\nYou can place your knight on the selected\n");
- (void)waddstr(helpwin, "square with spacebar, Enter, or the keypad\n");
- (void)waddstr(helpwin, "center key. You can quit with `x' or `q'.\n");
-
- (void)mvwaddstr(helpwin, NOTIFYY-INSTRY, 0,
- "Press `?' to go to game explanation");
+ (void) waddstr(helpwin, "Possible moves are shown with `-'.\n\n");
+
+ (void) waddstr(helpwin, "You can move around with the arrow keys or\n");
+ (void) waddstr(helpwin, "with the rogue/hack movement keys. Other\n");
+ (void) waddstr(helpwin, "commands allow you to undo moves or redraw.\n");
+ (void) waddstr(helpwin, "Your mouse may work; try left-button to\n");
+ (void) waddstr(helpwin, "move to the square under the pointer.\n\n");
+
+ (void) waddstr(helpwin, "x,q -- exit y k u 7 8 9\n");
+ (void) waddstr(helpwin, "r -- redraw screen \\|/ \\|/ \n");
+ (void) waddstr(helpwin, "u -- undo move h-+-l 4-+-6\n");
+ (void) waddstr(helpwin, " /|\\ /|\\ \n");
+ (void) waddstr(helpwin, " b j n 1 2 3\n");
+
+ (void) waddstr(helpwin, "\nYou can place your knight on the selected\n");
+ (void) waddstr(helpwin, "square with spacebar, Enter, or the keypad\n");
+ (void) waddstr(helpwin, "center key. You can quit with `x' or `q'.\n");
+
+ (void) mvwaddstr(helpwin, NOTIFYY - INSTRY, 0,
+ "Press `?' to go to game explanation");
}
-static void play (void)
+static void
+play(void)
/* play the game */
{
- bool keyhelp; /* TRUE if keystroke help is up */
- int c, ny = 0, nx = 0;
+ bool keyhelp; /* TRUE if keystroke help is up */
+ int c, ny = 0, nx = 0;
int i, j, count;
do {
- /* clear screen and draw board */
- werase(boardwin);
- werase(helpwin);
- werase(msgwin);
- dosquares();
- help1();
- wnoutrefresh(stdscr);
- wnoutrefresh(helpwin);
- wnoutrefresh(msgwin);
- wnoutrefresh(boardwin);
- doupdate();
-
- for (i = 0; i < BDEPTH; i++)
- for (j = 0; j < BWIDTH; j++)
- {
- board[i][j] = FALSE;
- cellmove(i, j);
- waddch(boardwin, minus);
- }
- memset(history, '\0', sizeof(history));
- history[0].y = history[0].x = -1;
- lastrow = lastcol = -2;
- movecount = 1;
- keyhelp = FALSE;
-
- for (;;)
- {
- if (rw != lastrow || col != lastcol)
- {
- if (lastrow >= 0 && lastcol >= 0)
- {
- cellmove(lastrow, lastcol);
- if (board[lastrow][lastcol])
- waddch(boardwin, trail);
- else
- waddch(boardwin, oldch);
- }
-
- cellmove(rw, col);
- oldch = winch(boardwin);
-
- lastrow = rw;
- lastcol= col;
- }
- cellmove(rw, col);
- waddch(boardwin, plus);
- cellmove(rw, col);
-
- wrefresh(msgwin);
-
- c = wgetch(boardwin);
-
- werase(msgwin);
-
- switch (c)
- {
- case 'k': case '8':
- case KEY_UP:
- ny = rw+BDEPTH-1; nx = col;
- break;
- case 'j': case '2':
- case KEY_DOWN:
- ny = rw+1; nx = col;
- break;
- case 'h': case '4':
- case KEY_LEFT:
- ny = rw; nx = col+BWIDTH-1;
- break;
- case 'l': case '6':
- case KEY_RIGHT:
- ny = rw; nx = col+1;
- break;
- case 'y': case '7':
- case KEY_A1:
- ny = rw+BDEPTH-1; nx = col+BWIDTH-1;
- break;
- case 'b': case '1':
- case KEY_C1:
- ny = rw+1; nx = col+BWIDTH-1;
- break;
- case 'u': case '9':
- case KEY_A3:
- ny = rw+BDEPTH-1; nx = col+1;
- break;
- case 'n': case '3':
- case KEY_C3:
- ny = rw+1; nx = col+1;
- break;
+ /* clear screen and draw board */
+ werase(boardwin);
+ werase(helpwin);
+ werase(msgwin);
+ dosquares();
+ help1();
+ wnoutrefresh(stdscr);
+ wnoutrefresh(helpwin);
+ wnoutrefresh(msgwin);
+ wnoutrefresh(boardwin);
+ doupdate();
+
+ for (i = 0; i < BDEPTH; i++)
+ for (j = 0; j < BWIDTH; j++) {
+ board[i][j] = FALSE;
+ cellmove(i, j);
+ waddch(boardwin, minus);
+ }
+ memset(history, '\0', sizeof(history));
+ history[0].y = history[0].x = -1;
+ lastrow = lastcol = -2;
+ movecount = 1;
+ keyhelp = FALSE;
+
+ for (;;) {
+ if (rw != lastrow || col != lastcol) {
+ if (lastrow >= 0 && lastcol >= 0) {
+ cellmove(lastrow, lastcol);
+ if (board[lastrow][lastcol])
+ waddch(boardwin, trail);
+ else
+ waddch(boardwin, oldch);
+ }
+
+ cellmove(rw, col);
+ oldch = winch(boardwin);
+
+ lastrow = rw;
+ lastcol = col;
+ }
+ cellmove(rw, col);
+ waddch(boardwin, plus);
+ cellmove(rw, col);
+
+ wrefresh(msgwin);
+
+ c = wgetch(boardwin);
+
+ werase(msgwin);
+
+ switch (c) {
+ case 'k':
+ case '8':
+ case KEY_UP:
+ ny = rw + BDEPTH - 1;
+ nx = col;
+ break;
+ case 'j':
+ case '2':
+ case KEY_DOWN:
+ ny = rw + 1;
+ nx = col;
+ break;
+ case 'h':
+ case '4':
+ case KEY_LEFT:
+ ny = rw;
+ nx = col + BWIDTH - 1;
+ break;
+ case 'l':
+ case '6':
+ case KEY_RIGHT:
+ ny = rw;
+ nx = col + 1;
+ break;
+ case 'y':
+ case '7':
+ case KEY_A1:
+ ny = rw + BDEPTH - 1;
+ nx = col + BWIDTH - 1;
+ break;
+ case 'b':
+ case '1':
+ case KEY_C1:
+ ny = rw + 1;
+ nx = col + BWIDTH - 1;
+ break;
+ case 'u':
+ case '9':
+ case KEY_A3:
+ ny = rw + BDEPTH - 1;
+ nx = col + 1;
+ break;
+ case 'n':
+ case '3':
+ case KEY_C3:
+ ny = rw + 1;
+ nx = col + 1;
+ break;
#ifdef NCURSES_MOUSE_VERSION
- case KEY_MOUSE:
- {
- MEVENT myevent;
-
- getmouse(&myevent);
- if (myevent.y >= CY(0) && myevent.y <= CY(BDEPTH)
- && myevent.x >= CX(0) && myevent.x <= CX(BWIDTH))
- {
- nx = CXINV(myevent.x);
- ny = CYINV(myevent.y);
- ungetch('\n');
- break;
- }
- else
- {
- beep();
- continue;
- }
- }
+ case KEY_MOUSE:
+ {
+ MEVENT myevent;
+
+ getmouse(&myevent);
+ if (myevent.y >= CY(0) && myevent.y <= CY(BDEPTH)
+ && myevent.x >= CX(0) && myevent.x <= CX(BWIDTH)) {
+ nx = CXINV(myevent.x);
+ ny = CYINV(myevent.y);
+ ungetch('\n');
+ break;
+ } else {
+ beep();
+ continue;
+ }
+ }
#endif /* NCURSES_MOUSE_VERSION */
- case KEY_B2:
- case '\n':
- case ' ':
- if (evalmove(rw, col))
- {
- drawmove(trail,
- history[movecount-1].y, history[movecount-1].x,
- rw, col);
- history[movecount].y = rw;
- history[movecount].x = col;
- movecount++;
-
- if (!chkmoves())
- goto dropout;
- }
- else
- beep();
- break;
-
- case KEY_REDO:
- case '\f':
- case 'r':
- clearok(curscr, TRUE);
- wnoutrefresh(stdscr);
- wnoutrefresh(boardwin);
- wnoutrefresh(msgwin);
- wnoutrefresh(helpwin);
- doupdate();
- break;
-
- case KEY_UNDO:
- case KEY_BACKSPACE:
- case '\b':
- if (movecount == 1)
- {
- ny = lastrow;
- nx = lastcol;
- waddstr(msgwin, "\nNo previous move.");
- beep();
- }
- else
- {
- int oldy = history[movecount-1].y;
- int oldx = history[movecount-1].x;
-
- board[oldy][oldx] = FALSE;
- --movecount;
- ny = history[movecount-1].y;
- nx = history[movecount-1].x;
- drawmove(' ', oldy, oldx, ny, nx);
-
- /* avoid problems if we just changed the current cell */
- cellmove(lastrow, lastcol);
- oldch = winch(boardwin);
- }
- break;
-
- case 'q':
- case 'x':
- goto dropout;
-
- case '?':
- werase(helpwin);
- if (keyhelp)
- {
- help1();
- keyhelp = FALSE;
- }
- else
- {
- help2();
- keyhelp = TRUE;
- }
- wrefresh(helpwin);
- break;
-
- default:
- beep();
- break;
- }
-
- col = nx % BWIDTH;
- rw = ny % BDEPTH;
- }
-
- dropout:
- count = 0;
- for (i = 0; i < BDEPTH; i++)
- for (j = 0; j < BWIDTH; j++)
- if (board[i][j] != 0)
- count += 1;
- if (count == (BWIDTH * BDEPTH))
- wprintw(msgwin, "\nYou won. Care to try again? ");
- else
- wprintw(msgwin, "\n%d squares filled. Try again? ", count);
- } while
- (tolower(wgetch(msgwin)) == 'y');
+ case KEY_B2:
+ case '\n':
+ case ' ':
+ if (evalmove(rw, col)) {
+ drawmove(trail,
+ history[movecount - 1].y, history[movecount -
+ 1].x,
+ rw, col);
+ history[movecount].y = rw;
+ history[movecount].x = col;
+ movecount++;
+
+ if (!chkmoves())
+ goto dropout;
+ } else
+ beep();
+ break;
+
+ case KEY_REDO:
+ case '\f':
+ case 'r':
+ clearok(curscr, TRUE);
+ wnoutrefresh(stdscr);
+ wnoutrefresh(boardwin);
+ wnoutrefresh(msgwin);
+ wnoutrefresh(helpwin);
+ doupdate();
+ break;
+
+ case KEY_UNDO:
+ case KEY_BACKSPACE:
+ case '\b':
+ if (movecount == 1) {
+ ny = lastrow;
+ nx = lastcol;
+ waddstr(msgwin, "\nNo previous move.");
+ beep();
+ } else {
+ int oldy = history[movecount - 1].y;
+ int oldx = history[movecount - 1].x;
+
+ board[oldy][oldx] = FALSE;
+ --movecount;
+ ny = history[movecount - 1].y;
+ nx = history[movecount - 1].x;
+ drawmove(' ', oldy, oldx, ny, nx);
+
+ /* avoid problems if we just changed the current cell */
+ cellmove(lastrow, lastcol);
+ oldch = winch(boardwin);
+ }
+ break;
+
+ case 'q':
+ case 'x':
+ goto dropout;
+
+ case '?':
+ werase(helpwin);
+ if (keyhelp) {
+ help1();
+ keyhelp = FALSE;
+ } else {
+ help2();
+ keyhelp = TRUE;
+ }
+ wrefresh(helpwin);
+ break;
+
+ default:
+ beep();
+ break;
+ }
+
+ col = nx % BWIDTH;
+ rw = ny % BDEPTH;
+ }
+
+ dropout:
+ count = 0;
+ for (i = 0; i < BDEPTH; i++)
+ for (j = 0; j < BWIDTH; j++)
+ if (board[i][j] != 0)
+ count += 1;
+ if (count == (BWIDTH * BDEPTH))
+ wprintw(msgwin, "\nYou won. Care to try again? ");
+ else
+ wprintw(msgwin, "\n%d squares filled. Try again? ", count);
+ } while
+ (tolower(wgetch(msgwin)) == 'y');
}
-static void dosquares (void)
+static void
+dosquares(void)
{
int i, j;
mvaddstr(0, 20, "KNIGHT'S MOVE -- a logical solitaire");
- move(BOARDY,BOARDX);
+ move(BOARDY, BOARDX);
waddch(boardwin, ACS_ULCORNER);
- for (j = 0; j < 7; j++)
- {
+ for (j = 0; j < 7; j++) {
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
@@ -406,21 +406,18 @@ static void dosquares (void)
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_URCORNER);
- for (i = 1; i < BDEPTH; i++)
- {
+ for (i = 1; i < BDEPTH; i++) {
move(BOARDY + i * 2 - 1, BOARDX);
- waddch(boardwin, ACS_VLINE);
- for (j = 0; j < BWIDTH; j++)
- {
+ waddch(boardwin, ACS_VLINE);
+ for (j = 0; j < BWIDTH; j++) {
waddch(boardwin, ' ');
waddch(boardwin, ' ');
waddch(boardwin, ' ');
waddch(boardwin, ACS_VLINE);
}
move(BOARDY + i * 2, BOARDX);
- waddch(boardwin, ACS_LTEE);
- for (j = 0; j < BWIDTH - 1; j++)
- {
+ waddch(boardwin, ACS_LTEE);
+ for (j = 0; j < BWIDTH - 1; j++) {
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
@@ -434,8 +431,7 @@ static void dosquares (void)
move(BOARDY + i * 2 - 1, BOARDX);
waddch(boardwin, ACS_VLINE);
- for (j = 0; j < BWIDTH; j++)
- {
+ for (j = 0; j < BWIDTH; j++) {
waddch(boardwin, ' ');
waddch(boardwin, ' ');
waddch(boardwin, ' ');
@@ -444,8 +440,7 @@ static void dosquares (void)
move(BOARDY + i * 2, BOARDX);
waddch(boardwin, ACS_LLCORNER);
- for (j = 0; j < BWIDTH - 1; j++)
- {
+ for (j = 0; j < BWIDTH - 1; j++) {
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
waddch(boardwin, ACS_HLINE);
@@ -457,35 +452,57 @@ static void dosquares (void)
waddch(boardwin, ACS_LRCORNER);
}
-static void mark_possibles(int prow, int pcol, chtype mark)
+static void
+mark_possibles(int prow, int pcol, chtype mark)
{
- if (chksqr(prow+2,pcol+1)){cellmove(prow+2,pcol+1);waddch(boardwin,mark);};
- if (chksqr(prow+2,pcol-1)){cellmove(prow+2,pcol-1);waddch(boardwin,mark);};
- if (chksqr(prow-2,pcol+1)){cellmove(prow-2,pcol+1);waddch(boardwin,mark);};
- if (chksqr(prow-2,pcol-1)){cellmove(prow-2,pcol-1);waddch(boardwin,mark);};
- if (chksqr(prow+1,pcol+2)){cellmove(prow+1,pcol+2);waddch(boardwin,mark);};
- if (chksqr(prow+1,pcol-2)){cellmove(prow+1,pcol-2);waddch(boardwin,mark);};
- if (chksqr(prow-1,pcol+2)){cellmove(prow-1,pcol+2);waddch(boardwin,mark);};
- if (chksqr(prow-1,pcol-2)){cellmove(prow-1,pcol-2);waddch(boardwin,mark);};
+ if (chksqr(prow + 2, pcol + 1)) {
+ cellmove(prow + 2, pcol + 1);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow + 2, pcol - 1)) {
+ cellmove(prow + 2, pcol - 1);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow - 2, pcol + 1)) {
+ cellmove(prow - 2, pcol + 1);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow - 2, pcol - 1)) {
+ cellmove(prow - 2, pcol - 1);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow + 1, pcol + 2)) {
+ cellmove(prow + 1, pcol + 2);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow + 1, pcol - 2)) {
+ cellmove(prow + 1, pcol - 2);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow - 1, pcol + 2)) {
+ cellmove(prow - 1, pcol + 2);
+ waddch(boardwin, mark);
+ };
+ if (chksqr(prow - 1, pcol - 2)) {
+ cellmove(prow - 1, pcol - 2);
+ waddch(boardwin, mark);
+ };
}
-static void drawmove(char tchar, int oldy, int oldx, int row, int column)
+static void
+drawmove(char tchar, int oldy, int oldx, int row, int column)
/* place the stars, update board & currents */
{
- if (movecount <= 1)
- {
+ if (movecount <= 1) {
int i, j;
for (i = 0; i < BDEPTH; i++)
- for (j = 0; j < BWIDTH; j++)
- {
+ for (j = 0; j < BWIDTH; j++) {
cellmove(i, j);
if (winch(boardwin) == minus)
waddch(boardwin, movecount ? ' ' : minus);
}
- }
- else
- {
+ } else {
cellmove(oldy, oldx);
waddch(boardwin, '\b');
waddch(boardwin, tchar);
@@ -494,8 +511,7 @@ static void drawmove(char tchar, int oldy, int oldx, int row, int column)
mark_possibles(oldy, oldx, ' ');
}
- if (row != -1 && column != -1)
- {
+ if (row != -1 && column != -1) {
cellmove(row, column);
waddch(boardwin, '\b');
waddch(boardwin, trail);
@@ -508,57 +524,67 @@ static void drawmove(char tchar, int oldy, int oldx, int row, int column)
wprintw(msgwin, "\nMove %d", movecount);
}
-static bool evalmove(int row, int column)
+static bool
+evalmove(int row, int column)
/* evaluate move */
{
if (movecount == 1)
- return(TRUE);
- else if (board[row][column] == TRUE)
- {
+ return (TRUE);
+ else if (board[row][column] == TRUE) {
waddstr(msgwin, "\nYou've already been there.");
- return(FALSE);
- }
- else
- {
- int rdif = iabs(row - history[movecount-1].y);
- int cdif = iabs(column - history[movecount-1].x);
+ return (FALSE);
+ } else {
+ int rdif = iabs(row - history[movecount - 1].y);
+ int cdif = iabs(column - history[movecount - 1].x);
- if (!((rdif == 1) && (cdif == 2)) && !((rdif == 2) && (cdif == 1)))
- {
+ if (!((rdif == 1) && (cdif == 2)) && !((rdif == 2) && (cdif == 1))) {
waddstr(msgwin, "\nThat's not a legal knight's move.");
- return(FALSE);
+ return (FALSE);
}
}
- return(TRUE);
+ return (TRUE);
}
-static bool chkmoves (void)
+static bool
+chkmoves(void)
/* check to see if valid moves are available */
{
- if (chksqr(rw+2,col+1)) return(TRUE);
- if (chksqr(rw+2,col-1)) return(TRUE);
- if (chksqr(rw-2,col+1)) return(TRUE);
- if (chksqr(rw-2,col-1)) return(TRUE);
- if (chksqr(rw+1,col+2)) return(TRUE);
- if (chksqr(rw+1,col-2)) return(TRUE);
- if (chksqr(rw-1,col+2)) return(TRUE);
- if (chksqr(rw-1,col-2)) return(TRUE);
+ if (chksqr(rw + 2, col + 1))
+ return (TRUE);
+ if (chksqr(rw + 2, col - 1))
+ return (TRUE);
+ if (chksqr(rw - 2, col + 1))
+ return (TRUE);
+ if (chksqr(rw - 2, col - 1))
+ return (TRUE);
+ if (chksqr(rw + 1, col + 2))
+ return (TRUE);
+ if (chksqr(rw + 1, col - 2))
+ return (TRUE);
+ if (chksqr(rw - 1, col + 2))
+ return (TRUE);
+ if (chksqr(rw - 1, col - 2))
+ return (TRUE);
return (FALSE);
}
-static int iabs(int num)
+static int
+iabs(int num)
{
- if (num < 0) return (-num);
- else return (num);
+ if (num < 0)
+ return (-num);
+ else
+ return (num);
}
-static bool chksqr (int r1, int c1)
+static bool
+chksqr(int r1, int c1)
{
if ((r1 < 0) || (r1 > BDEPTH - 1))
- return(FALSE);
+ return (FALSE);
if ((c1 < 0) || (c1 > BWIDTH - 1))
- return(FALSE);
+ return (FALSE);
return ((!board[r1][c1]) ? TRUE : FALSE);
}
diff --git a/contrib/ncurses/test/ncurses.c b/contrib/ncurses/test/ncurses.c
index 074ca7065597..ad1aa01c5cef 100644
--- a/contrib/ncurses/test/ncurses.c
+++ b/contrib/ncurses/test/ncurses.c
@@ -39,7 +39,7 @@ DESCRIPTION
AUTHOR
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
-$Id: ncurses.c,v 1.129 2000/06/17 20:02:22 tom Exp $
+$Id: ncurses.c,v 1.138 2000/09/17 01:24:00 tom Exp $
***************************************************************************/
@@ -92,7 +92,7 @@ static int save_trace = TRACE_ORDINARY | TRACE_CALLS;
extern int _nc_tracing;
#endif
-#if !HAVE_NAPMS
+#if !defined(HAVE_NAPMS)
#define HAVE_NAPMS 1
#endif
@@ -198,7 +198,7 @@ mouse_decode(MEVENT const *ep)
static char buf[80];
(void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {",
- ep->id, ep->x, ep->y, ep->z, ep->bstate);
+ ep->id, ep->x, ep->y, ep->z, ep->bstate);
#define SHOW(m, s) if ((ep->bstate & m)==m) {strcat(buf,s); strcat(buf, ", ");}
SHOW(BUTTON1_RELEASED, "release-1");
@@ -347,21 +347,43 @@ getch_test(void)
}
static int
-show_attr(int row, int skip, chtype attr, const char *name, bool once)
+show_attr(int row, int skip, chtype attr, const char *name)
{
+ static const char *string = "abcde fghij klmno pqrst uvwxy z";
int ncv = tigetnum("ncv");
mvprintw(row, 8, "%s mode:", name);
mvprintw(row, 24, "|");
if (skip)
printw("%*s", skip, " ");
- if (once)
- attron(attr);
- else
- attrset(attr);
- addstr("abcde fghij klmno pqrst uvwxy z");
- if (once)
- attroff(attr);
+ attrset(attr);
+ /*
+ * If we're to write a string in the alternate character set, it is not
+ * sufficient to just set A_ALTCHARSET. We have to perform the mapping
+ * that corresponds. This is not needed for vt100-compatible devices
+ * because the acs_map[] is 1:1, but for PC-style devices such as Linux
+ * console, the acs_map[] is scattered about the range.
+ *
+ * The addch/addstr functions do not themselves do this mapping, since it
+ * is possible to turn off the A_ALTCHARSET flag for the characters which
+ * are added, and it would be an unexpected result to have the mapped
+ * characters visible on the screen.
+ *
+ * This example works because the indices into acs_map[] are mostly from
+ * the lowercase characters.
+ */
+ if (attr & A_ALTCHARSET) {
+ const char *s = string;
+ while (*s) {
+ int ch = *s++;
+ if ((ch = acs_map[ch]) == 0)
+ ch = ' ';
+ addch(ch);
+ }
+ } else {
+ addstr(string);
+ }
+ attroff(attr);
if (skip)
printw("%*s", skip, " ");
printw("|");
@@ -398,7 +420,7 @@ show_attr(int row, int skip, chtype attr, const char *name, bool once)
}
static bool
-attr_getc(int *skip, int *fg, int *bg)
+attr_getc(int *skip, int *fg, int *bg, int *ac)
{
int ch = Getchar();
@@ -411,6 +433,12 @@ attr_getc(int *skip, int *fg, int *bg)
return TRUE;
} else if (has_colors()) {
switch (ch) {
+ case 'a':
+ *ac = 0;
+ break;
+ case 'A':
+ *ac = A_ALTCHARSET;
+ break;
case 'f':
*fg = (*fg + 1);
break;
@@ -435,6 +463,18 @@ attr_getc(int *skip, int *fg, int *bg)
if (*bg < 0)
*bg = COLORS - 1;
return TRUE;
+ } else {
+ switch (ch) {
+ case 'a':
+ *ac = 0;
+ break;
+ case 'A':
+ *ac = A_ALTCHARSET;
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
}
return FALSE;
}
@@ -447,6 +487,7 @@ attr_test(void)
int skip = tigetnum("xmc");
int fg = COLOR_BLACK; /* color pair 0 is special */
int bg = COLOR_BLACK;
+ int ac = 0;
bool *pairs = (bool *) calloc(COLOR_PAIRS, sizeof(bool));
pairs[0] = TRUE;
@@ -472,28 +513,31 @@ attr_test(void)
mvaddstr(0, 20, "Character attribute test display");
- row = show_attr(row, n, A_STANDOUT, "STANDOUT", TRUE);
- row = show_attr(row, n, A_REVERSE, "REVERSE", TRUE);
- row = show_attr(row, n, A_BOLD, "BOLD", TRUE);
- row = show_attr(row, n, A_UNDERLINE, "UNDERLINE", TRUE);
- row = show_attr(row, n, A_DIM, "DIM", TRUE);
- row = show_attr(row, n, A_BLINK, "BLINK", TRUE);
- row = show_attr(row, n, A_PROTECT, "PROTECT", TRUE);
- row = show_attr(row, n, A_INVIS, "INVISIBLE", TRUE);
- row = show_attr(row, n, A_NORMAL, "NORMAL", FALSE);
+ row = show_attr(row, n, ac | A_STANDOUT, "STANDOUT");
+ row = show_attr(row, n, ac | A_REVERSE, "REVERSE");
+ row = show_attr(row, n, ac | A_BOLD, "BOLD");
+ row = show_attr(row, n, ac | A_UNDERLINE, "UNDERLINE");
+ row = show_attr(row, n, ac | A_DIM, "DIM");
+ row = show_attr(row, n, ac | A_BLINK, "BLINK");
+ row = show_attr(row, n, ac | A_PROTECT, "PROTECT");
+ row = show_attr(row, n, ac | A_INVIS, "INVISIBLE");
+ row = show_attr(row, n, ac | A_NORMAL, "NORMAL");
mvprintw(row, 8,
- "This terminal does %shave the magic-cookie glitch",
- tigetnum("xmc") > -1 ? "" : "not ");
+ "This terminal does %shave the magic-cookie glitch",
+ tigetnum("xmc") > -1 ? "" : "not ");
mvprintw(row + 1, 8,
- "Enter a digit to set gaps on each side of displayed attributes");
+ "Enter a digit to set gaps on each side of displayed attributes");
mvprintw(row + 2, 8,
- "^L = repaint");
+ "^L = repaint");
if (has_colors())
- printw(". f/F/b/F toggle colors (now %d/%d)", fg, bg);
+ printw(". f/F/b/F toggle colors (now %d/%d), a/A altcharset (%d)",
+ fg, bg, ac != 0);
+ else
+ printw(". a/A altcharset (%d)", ac != 0);
refresh();
- } while (attr_getc(&n, &fg, &bg));
+ } while (attr_getc(&n, &fg, &bg, &ac));
free((char *) pairs);
bkgdset(A_NORMAL | BLANK);
@@ -554,9 +598,9 @@ color_test(void)
top = (COLORS > 8) ? 0 : base * (COLORS + 3);
clrtobot();
(void) mvprintw(top + 1, 0,
- "%dx%d matrix of foreground/background colors, bright *%s*\n",
- COLORS, COLORS,
- base ? "on" : "off");
+ "%dx%d matrix of foreground/background colors, bright *%s*\n",
+ COLORS, COLORS,
+ base ? "on" : "off");
for (i = 0; i < COLORS; i++)
show_color_name(top + 2, (i + 1) * width, i);
for (i = 0; i < COLORS; i++)
@@ -627,9 +671,9 @@ color_edit(void)
for (i = 0; i < max_colors; i++) {
mvprintw(2 + i, 0, "%c %-8s:",
- (i == current ? '>' : ' '),
- (i < (int) SIZEOF(color_names)
- ? color_names[i] : ""));
+ (i == current ? '>' : ' '),
+ (i < (int) SIZEOF(color_names)
+ ? color_names[i] : ""));
attrset(COLOR_PAIR(i));
addstr(" ");
attrset(A_NORMAL);
@@ -666,9 +710,9 @@ color_edit(void)
}
mvaddstr(max_colors + 3, 0,
- "Use up/down to select a color, left/right to change fields.");
+ "Use up/down to select a color, left/right to change fields.");
mvaddstr(max_colors + 4, 0,
- "Modify field by typing nnn=, nnn-, or nnn+. ? for help.");
+ "Modify field by typing nnn=, nnn-, or nnn+. ? for help.");
move(2 + current, 0);
@@ -882,7 +926,7 @@ show_upper_chars(int first)
erase();
attron(A_BOLD);
mvprintw(0, 20, "Display of %s Character Codes %d to %d",
- C1 ? "C1" : "GR", first, last);
+ C1 ? "C1" : "GR", first, last);
attroff(A_BOLD);
refresh();
@@ -983,9 +1027,9 @@ acs_display(void)
break;
}
mvprintw(LINES - 3, 0,
- "Note: ANSI terminals may not display C1 characters.");
+ "Note: ANSI terminals may not display C1 characters.");
mvprintw(LINES - 2, 0,
- "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit");
+ "Select: a=ACS, 0=C1, 1,2,3=GR characters, q=quit");
refresh();
} while ((c = Getchar()) != 'x' && c != 'q');
@@ -1064,7 +1108,7 @@ test_sgr_attributes(void)
bkgdset(normal);
mvprintw(LINES - 2, 1, "%s background. ", pass == 0 ? "Dark" :
- "Light");
+ "Light");
clrtoeol();
Pause();
}
@@ -1146,7 +1190,7 @@ newwin_legend(FRAME * curp)
{
"^R = restore window", 0
},
-#ifdef HAVE_WRESIZE
+#if HAVE_WRESIZE
{
"^X = resize", 0
},
@@ -1196,8 +1240,8 @@ transient(FRAME * curp, NCURSES_CONST char *msg)
move(LINES - 1, 0);
printw("%s characters are echoed, window should %sscroll.",
- HaveKeypad(curp) ? "Non-arrow" : "All other",
- HaveScroll(curp) ? "" : "not ");
+ HaveKeypad(curp) ? "Non-arrow" : "All other",
+ HaveScroll(curp) ? "" : "not ");
clrtoeol();
}
@@ -1477,7 +1521,7 @@ acs_and_scroll(void)
}
break;
-#ifdef HAVE_WRESIZE
+#if HAVE_WRESIZE
case CTRL('X'): /* resize window */
if (current) {
pair *tmp, ul, lr;
@@ -1585,8 +1629,8 @@ acs_and_scroll(void)
wrefresh(usescr);
} while
((c = wGetchar(usescr)) != QUIT
- && !((c == ESCAPE) && (usescr->_use_keypad))
- && (c != ERR));
+ && !((c == ESCAPE) && (usescr->_use_keypad))
+ && (c != ERR));
breakout:
while (current != 0)
@@ -1739,38 +1783,38 @@ demo_panels(void)
PANEL *p5;
p1 = mkpanel(COLOR_RED,
- LINES / 2 - 2,
- COLS / 8 + 1,
- 0,
- 0);
+ LINES / 2 - 2,
+ COLS / 8 + 1,
+ 0,
+ 0);
set_panel_userptr(p1, "p1");
p2 = mkpanel(COLOR_GREEN,
- LINES / 2 + 1,
- COLS / 7,
- LINES / 4,
- COLS / 10);
+ LINES / 2 + 1,
+ COLS / 7,
+ LINES / 4,
+ COLS / 10);
set_panel_userptr(p2, "p2");
p3 = mkpanel(COLOR_YELLOW,
- LINES / 4,
- COLS / 10,
- LINES / 2,
- COLS / 9);
+ LINES / 4,
+ COLS / 10,
+ LINES / 2,
+ COLS / 9);
set_panel_userptr(p3, "p3");
p4 = mkpanel(COLOR_BLUE,
- LINES / 2 - 2,
- COLS / 8,
- LINES / 2 - 2,
- COLS / 3);
+ LINES / 2 - 2,
+ COLS / 8,
+ LINES / 2 - 2,
+ COLS / 3);
set_panel_userptr(p4, "p4");
p5 = mkpanel(COLOR_MAGENTA,
- LINES / 2 - 2,
- COLS / 8,
- LINES / 2,
- COLS / 2 - 2);
+ LINES / 2 - 2,
+ COLS / 8,
+ LINES / 2,
+ COLS / 2 - 2);
set_panel_userptr(p5, "p5");
fill_panel(p1);
@@ -1943,6 +1987,7 @@ demo_panels(void)
#define GRIDSIZE 3
+static bool pending_pan = FALSE;
static bool show_panner_legend = TRUE;
static int
@@ -1950,10 +1995,10 @@ panner_legend(int line)
{
static const char *const legend[] =
{
- "Use arrow keys (or U,D,L,R) to pan, q to quit (?,t,s flags)",
- "Use ! to shell-out. Toggle legend:?, timer:t, scroll mark:s.",
+ "Use arrow keys (or U,D,L,R) to pan, q to quit, ! to shell-out.",
"Use +,- (or j,k) to grow/shrink the panner vertically.",
- "Use <,> (or h,l) to grow/shrink the panner horizontally."
+ "Use <,> (or h,l) to grow/shrink the panner horizontally.",
+ "Number repeats. Toggle legend:?, timer:t, scroll mark:s."
};
int n = (SIZEOF(legend) - (LINES - line));
if (line < LINES && (n >= 0)) {
@@ -1982,8 +2027,8 @@ panner_v_cleanup(int from_y, int from_x, int to_y)
static void
panner(WINDOW *pad,
- int top_x, int top_y, int porty, int portx,
- int (*pgetc) (WINDOW *))
+ int top_x, int top_y, int porty, int portx,
+ int (*pgetc) (WINDOW *))
{
#if HAVE_GETTIMEOFDAY
struct timeval before, after;
@@ -2205,29 +2250,31 @@ panner(WINDOW *pad,
mvaddch(porty - 1, top_x - 1, ACS_LLCORNER);
mvaddch(porty - 1, portx - 1, ACS_LRCORNER);
+ if (!pending_pan) {
#if HAVE_GETTIMEOFDAY
- gettimeofday(&before, 0);
+ gettimeofday(&before, 0);
#endif
- wnoutrefresh(stdscr);
+ wnoutrefresh(stdscr);
- pnoutrefresh(pad,
- basey, basex,
- top_y, top_x,
- porty - (pxmax > portx) - 1,
- portx - (pymax > porty) - 1);
+ pnoutrefresh(pad,
+ basey, basex,
+ top_y, top_x,
+ porty - (pxmax > portx) - 1,
+ portx - (pymax > porty) - 1);
- doupdate();
+ doupdate();
#if HAVE_GETTIMEOFDAY
- if (timing) {
- double elapsed;
- gettimeofday(&after, 0);
- elapsed = (after.tv_sec + after.tv_usec / 1.0e6)
- - (before.tv_sec + before.tv_usec / 1.0e6);
- move(LINES - 1, COLS - 20);
- printw("Secs: %2.03f", elapsed);
- refresh();
- }
+ if (timing) {
+ double elapsed;
+ gettimeofday(&after, 0);
+ elapsed = (after.tv_sec + after.tv_usec / 1.0e6)
+ - (before.tv_sec + before.tv_usec / 1.0e6);
+ move(LINES - 1, COLS - 20);
+ printw("Secs: %2.03f", elapsed);
+ refresh();
+ }
#endif
+ }
} while
((c = pgetc(pad)) != KEY_EXIT);
@@ -2235,44 +2282,73 @@ panner(WINDOW *pad,
scrollok(stdscr, TRUE); /* reset to driver's default */
}
-static
-int
+static int
padgetch(WINDOW *win)
{
+ static int count;
+ static int last;
int c;
- switch (c = wGetchar(win)) {
- case '!':
- ShellOut(FALSE);
- return KEY_REFRESH;
- case CTRL('r'):
- endwin();
- refresh();
- return KEY_REFRESH;
- case CTRL('l'):
- return KEY_REFRESH;
- case 'U':
- return (KEY_UP);
- case 'D':
- return (KEY_DOWN);
- case 'R':
- return (KEY_RIGHT);
- case 'L':
- return (KEY_LEFT);
- case '+':
- return (KEY_IL);
- case '-':
- return (KEY_DL);
- case '>':
- return (KEY_IC);
- case '<':
- return (KEY_DC);
- case ERR: /* FALLTHRU */
- case 'q':
- return (KEY_EXIT);
- default:
- return (c);
+ if ((pending_pan = (count > 0)) != FALSE) {
+ count--;
+ pending_pan = (count != 0);
+ } else {
+ for (;;) {
+ switch (c = wGetchar(win)) {
+ case '!':
+ ShellOut(FALSE);
+ c = KEY_REFRESH;
+ case CTRL('r'):
+ endwin();
+ refresh();
+ c = KEY_REFRESH;
+ break;
+ case CTRL('l'):
+ c = KEY_REFRESH;
+ break;
+ case 'U':
+ c = KEY_UP;
+ break;
+ case 'D':
+ c = KEY_DOWN;
+ break;
+ case 'R':
+ c = KEY_RIGHT;
+ break;
+ case 'L':
+ c = KEY_LEFT;
+ break;
+ case '+':
+ c = KEY_IL;
+ break;
+ case '-':
+ c = KEY_DL;
+ break;
+ case '>':
+ c = KEY_IC;
+ break;
+ case '<':
+ c = KEY_DC;
+ break;
+ case ERR: /* FALLTHRU */
+ case 'q':
+ count = 0;
+ c = KEY_EXIT;
+ break;
+ default:
+ if (c >= '0' && c <= '9') {
+ count = count * 10 + (c - '0');
+ continue;
+ }
+ break;
+ }
+ last = c;
+ break;
+ }
+ if (count > 0)
+ count--;
}
+ return (last);
}
#define PAD_HIGH 200
@@ -2379,7 +2455,7 @@ flushinp_test(WINDOW *win)
mvwaddstr(win, 2, 1, "Type random keys for 5 seconds.");
mvwaddstr(win, 3, 1,
- "These should be discarded (not echoed) after the subwindow goes away.");
+ "These should be discarded (not echoed) after the subwindow goes away.");
wrefresh(win);
for (i = 0; i < 5; i++) {
@@ -2396,11 +2472,11 @@ flushinp_test(WINDOW *win)
napms(1000);
mvwaddstr(win, 2, 1,
- "If you were still typing when the window timer expired,");
+ "If you were still typing when the window timer expired,");
mvwaddstr(win, 3, 1,
- "or else you typed nothing at all while it was running,");
+ "or else you typed nothing at all while it was running,");
mvwaddstr(win, 4, 1,
- "test was invalid. You'll see garbage or nothing at all. ");
+ "test was invalid. You'll see garbage or nothing at all. ");
mvwaddstr(win, 6, 1, "Press a key");
wmove(win, 9, 10);
wrefresh(win);
@@ -2408,7 +2484,7 @@ flushinp_test(WINDOW *win)
wGetchar(win);
flushinp();
mvwaddstr(win, 12, 0,
- "If you see any key other than what you typed, flushinp() is broken.");
+ "If you see any key other than what you typed, flushinp() is broken.");
Continue(win);
wmove(win, 9, 10);
@@ -2417,7 +2493,7 @@ flushinp_test(WINDOW *win)
wmove(win, 12, 0);
clrtoeol();
waddstr(win,
- "What you typed should now have been deleted; if not, wdelch() failed.");
+ "What you typed should now have been deleted; if not, wdelch() failed.");
Continue(win);
cbreak();
@@ -2483,7 +2559,7 @@ menu_test(void)
mvaddstr(2, 0, " Use up and down arrow to move the select bar.");
mvaddstr(3, 0, " 'n' and 'p' act like arrows.");
mvaddstr(4, 0,
- " 'b' and 'f' scroll up/down (page), 'u' and 'd' (line).");
+ " 'b' and 'f' scroll up/down (page), 'u' and 'd' (line).");
mvaddstr(5, 0, " Press return to exit.");
refresh();
@@ -2512,7 +2588,7 @@ menu_test(void)
}
(void) mvprintw(LINES - 2, 0,
- "You chose: %s\n", item_name(current_item(m)));
+ "You chose: %s\n", item_name(current_item(m)));
(void) addstr("Press any key to continue...");
wGetchar(stdscr);
@@ -2548,6 +2624,7 @@ static struct {
T_TBL(TRACE_ICALLS),
T_TBL(TRACE_CCALLS),
T_TBL(TRACE_DATABASE),
+ T_TBL(TRACE_ATTRS),
T_TBL(TRACE_MAXIMUM),
{
(char *) 0, 0
@@ -2677,7 +2754,7 @@ trace_set(void)
_tracef("trace level interactively set to %s", tracetrace(_nc_tracing));
(void) mvprintw(LINES - 2, 0,
- "Trace level is %s\n", tracetrace(_nc_tracing));
+ "Trace level is %s\n", tracetrace(_nc_tracing));
(void) addstr("Press any key to continue...");
wGetchar(stdscr);
@@ -3277,6 +3354,7 @@ usage(void)
,""
,"Options:"
#ifdef NCURSES_VERSION
+ ," -a f,b set default-colors (assumed white-on-black)"
," -d use default-colors if terminal supports them"
#endif
," -e fmt specify format for soft-keys test (e)"
@@ -3344,6 +3422,9 @@ main(int argc, char *argv[])
int command, c;
int my_e_param = 1;
#ifdef NCURSES_VERSION
+ int default_fg = COLOR_WHITE;
+ int default_bg = COLOR_BLACK;
+ bool assumed_colors = FALSE;
bool default_colors = FALSE;
#endif
@@ -3351,9 +3432,13 @@ main(int argc, char *argv[])
setlocale(LC_CTYPE, "");
#endif
- while ((c = getopt(argc, argv, "de:fhs:t:")) != EOF) {
+ while ((c = getopt(argc, argv, "a:de:fhs:t:")) != EOF) {
switch (c) {
#ifdef NCURSES_VERSION
+ case 'a':
+ assumed_colors = TRUE;
+ sscanf(optarg, "%d,%d", &default_fg, &default_bg);
+ break;
case 'd':
default_colors = TRUE;
break;
@@ -3422,6 +3507,8 @@ main(int argc, char *argv[])
#ifdef NCURSES_VERSION
if (default_colors)
use_default_colors();
+ else if (assumed_colors)
+ assume_default_colors(default_fg, default_bg);
#endif
}
set_terminal_modes();
@@ -3437,9 +3524,9 @@ main(int argc, char *argv[])
(void) printf("Welcome to %s. Press ? for help.\n", curses_version());
#elif defined(NCURSES_VERSION_MAJOR) && defined(NCURSES_VERSION_MINOR) && defined(NCURSES_VERSION_PATCH)
(void) printf("Welcome to ncurses %d.%d.%d. Press ? for help.\n",
- NCURSES_VERSION_MAJOR,
- NCURSES_VERSION_MINOR,
- NCURSES_VERSION_PATCH);
+ NCURSES_VERSION_MAJOR,
+ NCURSES_VERSION_MINOR,
+ NCURSES_VERSION_PATCH);
#else
(void) puts("Welcome to ncurses. Press ? for help.");
#endif
diff --git a/contrib/ncurses/test/railroad.c b/contrib/ncurses/test/railroad.c
index d3dc2eae8024..a9aa30674b47 100644
--- a/contrib/ncurses/test/railroad.c
+++ b/contrib/ncurses/test/railroad.c
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 2000
*
- * $Id: railroad.c,v 1.1 2000/01/15 02:41:27 tom Exp $
+ * $Id: railroad.c,v 1.3 2000/09/24 00:20:33 tom Exp $
*
* A simple demo of the termcap interface.
*/
@@ -39,6 +39,11 @@
#include <ctype.h>
#include <signal.h>
+static char *wipeit;
+static char *moveit;
+static int length;
+static int height;
+
static char *finisC;
static char *finisS;
static char *finisU;
@@ -68,7 +73,7 @@ PutChar(int ch)
{
putchar(ch);
fflush(stdout);
- napms(50); /* not really termcap... */
+ napms(moveit ? 10 : 50); /* not really termcap... */
}
static void
@@ -104,33 +109,54 @@ Underline(int flag)
static void
ShowSign(char *string)
{
+ char *base = string;
int ch, first, last;
+ if (moveit != 0) {
+ tputs(tgoto(moveit, 0, height - 1), 1, outc);
+ tputs(wipeit, 1, outc);
+ }
+
while (*string != 0) {
ch = *string;
- last = ch;
- if (isalpha(ch)) {
- first = isupper(ch) ? 'A' : 'a';
- } else if (isdigit(ch)) {
- first = '0';
+ if (moveit != 0) {
+ for (first = length - 1; first > (string - base); first--) {
+ if (first < length - 1) {
+ tputs(tgoto(moveit, first + 1, height - 1), 1, outc);
+ PutChar(' ');
+ }
+ tputs(tgoto(moveit, first, height - 1), 1, outc);
+ PutChar(ch);
+ }
} else {
- first = ch;
- }
- if (first < last) {
- Underline(1);
- while (first < last) {
- PutChar(first);
- Backup();
- first++;
+ last = ch;
+ if (isalpha(ch)) {
+ first = isupper(ch) ? 'A' : 'a';
+ } else if (isdigit(ch)) {
+ first = '0';
+ } else {
+ first = ch;
+ }
+ if (first < last) {
+ Underline(1);
+ while (first < last) {
+ PutChar(first);
+ Backup();
+ first++;
+ }
+ Underline(0);
}
- Underline(0);
}
+ if (moveit != 0)
+ Backup();
StandOut(1);
PutChar(ch);
StandOut(0);
fflush(stdout);
string++;
}
+ if (moveit != 0)
+ tputs(wipeit, 1, outc);
putchar('\n');
}
@@ -153,7 +179,7 @@ onsig(int n GCC_UNUSED)
static void
railroad(char **args)
{
- char *name = getenv("TERM");
+ NCURSES_CONST char *name = getenv("TERM");
char buffer[1024];
char area[1024], *ap = area;
int j;
@@ -161,6 +187,22 @@ railroad(char **args)
if (name == 0)
name = "dumb";
if (tgetent(buffer, name)) {
+
+ wipeit = tgetstr("ce", &ap);
+ height = tgetnum("li");
+ length = tgetnum("co");
+ moveit = tgetstr("cm", &ap);
+
+ if (wipeit == 0
+ || moveit == 0
+ || height <= 0
+ || length <= 0) {
+ wipeit = 0;
+ moveit = 0;
+ height = 0;
+ length = 0;
+ }
+
startS = tgetstr("so", &ap);
finisS = tgetstr("se", &ap);
@@ -186,9 +228,7 @@ railroad(char **args)
}
int
-main(
- int argc,
- char *argv[])
+main(int argc, char *argv[])
{
if (argc > 1) {
railroad(argv + 1);
diff --git a/contrib/ncurses/test/rain.c b/contrib/ncurses/test/rain.c
index 262f87d279b9..a7771b09d3e3 100644
--- a/contrib/ncurses/test/rain.c
+++ b/contrib/ncurses/test/rain.c
@@ -1,5 +1,5 @@
/*
- * $Id: rain.c,v 1.14 1999/11/13 23:39:07 tom Exp $
+ * $Id: rain.c,v 1.15 2000/09/02 18:41:22 tom Exp $
*/
#include <test.priv.h>
@@ -42,7 +42,7 @@ float c;
if (has_colors()) {
int bg = COLOR_BLACK;
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
bg = -1;
#endif
diff --git a/contrib/ncurses/test/tclock.c b/contrib/ncurses/test/tclock.c
index 838f45e70920..9f846554285b 100644
--- a/contrib/ncurses/test/tclock.c
+++ b/contrib/ncurses/test/tclock.c
@@ -128,7 +128,7 @@ main(
if (has_colors()) {
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
my_bg = -1;
#endif
diff --git a/contrib/ncurses/test/test.priv.h b/contrib/ncurses/test/test.priv.h
index affed8d7e76a..58bbd162386f 100644
--- a/contrib/ncurses/test/test.priv.h
+++ b/contrib/ncurses/test/test.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,12 +29,35 @@
/****************************************************************************
* Author: Thomas E. Dickey <dickey@clark.net> 1996 *
****************************************************************************/
-/* $Id: test.priv.h,v 1.16 2000/04/15 17:52:08 tom Exp $ */
+/* $Id: test.priv.h,v 1.19 2000/09/02 19:31:58 tom Exp $ */
+
#if HAVE_CONFIG_H
#include <ncurses_cfg.h>
+#else
+#define HAVE_CURSES_VERSION 0
+#define HAVE_RESIZETERM 0
+#define HAVE_USE_DEFAULT_COLORS 0
+#define HAVE_WRESIZE 0
+#endif
+
+#ifndef HAVE_NC_ALLOC_H
+#define HAVE_NC_ALLOC_H 0
+#endif
+
+#ifndef HAVE_LOCALE_H
+#define HAVE_LOCALE_H 0
+#endif
+
+#ifndef NCURSES_NOMACROS
+#define NCURSES_NOMACROS 0
+#endif
+
+#ifndef NEED_PTEM_H
+#define NEED_PTEM_H 0
#endif
#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#if HAVE_UNISTD_H
@@ -43,7 +66,7 @@
#include <curses.h>
-#ifdef NCURSES_NOMACROS
+#if NCURSES_NOMACROS
#include <nomacros.h>
#endif
diff --git a/contrib/ncurses/test/view.c b/contrib/ncurses/test/view.c
index f4c2f067234d..4c1344cb5d37 100644
--- a/contrib/ncurses/test/view.c
+++ b/contrib/ncurses/test/view.c
@@ -23,7 +23,7 @@
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.29 2000/05/21 01:43:03 tom Exp $
+ * $Id: view.c,v 1.31 2000/09/02 18:14:52 tom Exp $
*/
#include <test.priv.h>
@@ -53,7 +53,7 @@
static RETSIGTYPE finish(int sig) GCC_NORETURN;
static void show_all(void);
-#if defined(SIGWINCH) && defined(TIOCGWINSZ) && defined(HAVE_RESIZETERM)
+#if defined(SIGWINCH) && defined(TIOCGWINSZ) && HAVE_RESIZETERM
#define CAN_RESIZE 1
#else
#define CAN_RESIZE 0
@@ -433,7 +433,7 @@ show_all(void)
scrollok(stdscr, FALSE); /* prevent screen from moving */
for (i = 1; i < LINES; i++) {
move(i, 0);
- printw("%3d:", (lptr + i - lines));
+ printw("%3ld:", (long) (lptr + i - lines));
clrtoeol();
if ((s = lptr[i - 1]) != 0) {
int len = ch_len(s);
diff --git a/contrib/ncurses/test/worm.c b/contrib/ncurses/test/worm.c
index 43a898f84d13..142982aef221 100644
--- a/contrib/ncurses/test/worm.c
+++ b/contrib/ncurses/test/worm.c
@@ -34,7 +34,7 @@ Options:
traces will be dumped. The program stops and waits for one character of
input at the beginning and end of the interval.
- $Id: worm.c,v 1.30 2000/04/15 17:51:56 tom Exp $
+ $Id: worm.c,v 1.31 2000/09/02 18:41:01 tom Exp $
*/
#include <test.priv.h>
@@ -251,7 +251,7 @@ main(int argc, char *argv[])
if (has_colors()) {
int bg = COLOR_BLACK;
start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
+#if HAVE_USE_DEFAULT_COLORS
if (use_default_colors() == OK)
bg = -1;
#endif
diff --git a/contrib/ncurses/test/xmas.c b/contrib/ncurses/test/xmas.c
index 57d42923000c..d99b8219c306 100644
--- a/contrib/ncurses/test/xmas.c
+++ b/contrib/ncurses/test/xmas.c
@@ -92,7 +92,7 @@
/******************************************************************************/
/*
- * $Id: xmas.c,v 1.13 1999/11/13 23:39:01 tom Exp $
+ * $Id: xmas.c,v 1.15 2000/09/02 18:45:53 tom Exp $
*/
#include <test.priv.h>
@@ -103,17 +103,36 @@
static int my_bg = COLOR_BLACK;
static int y_pos, x_pos;
-static WINDOW
- *treescrn, *treescrn2,*treescrn3, *treescrn4,*treescrn5, *treescrn6,
- *treescrn7, *treescrn8,
- *dotdeer0,
- *stardeer0,
- *lildeer0, *lildeer1, *lildeer2, *lildeer3,
- *middeer0, *middeer1, *middeer2, *middeer3,
- *bigdeer0, *bigdeer1, *bigdeer2, *bigdeer3, *bigdeer4,
- *lookdeer0, *lookdeer1, *lookdeer2, *lookdeer3, *lookdeer4,
- *w_holiday,
- *w_del_msg;
+static WINDOW *treescrn;
+static WINDOW *treescrn2;
+static WINDOW *treescrn3;
+static WINDOW *treescrn4;
+static WINDOW *treescrn5;
+static WINDOW *treescrn6;
+static WINDOW *treescrn7;
+static WINDOW *treescrn8;
+static WINDOW *dotdeer0;
+static WINDOW *stardeer0;
+static WINDOW *lildeer0;
+static WINDOW *lildeer1;
+static WINDOW *lildeer2;
+static WINDOW *lildeer3;
+static WINDOW *middeer0;
+static WINDOW *middeer1;
+static WINDOW *middeer2;
+static WINDOW *middeer3;
+static WINDOW *bigdeer0;
+static WINDOW *bigdeer1;
+static WINDOW *bigdeer2;
+static WINDOW *bigdeer3;
+static WINDOW *bigdeer4;
+static WINDOW *lookdeer0;
+static WINDOW *lookdeer1;
+static WINDOW *lookdeer2;
+static WINDOW *lookdeer3;
+static WINDOW *lookdeer4;
+static WINDOW *w_holiday;
+static WINDOW *w_del_msg;
static int boxit(void);
static int seas(void);
@@ -129,923 +148,916 @@ static int strng4(void);
static int strng5(void);
static int reindeer(void);
static int blinkit(void);
-static RETSIGTYPE done(int sig) GCC_NORETURN ;
-static void
-set_color(WINDOW *win, chtype color)
+static RETSIGTYPE
+done(int sig) GCC_NORETURN;
+
+ static void
+ set_color(WINDOW *win, chtype color)
{
- if (has_colors()) {
- static bool *pairs;
- int n = (color + 1);
- if (pairs == 0)
- pairs = (bool *)calloc(COLORS+1, sizeof(bool));
- if (!pairs[n]) {
- init_pair(n, color, my_bg);
- pairs[n] = TRUE;
- }
- wattroff(win, A_COLOR);
- wattron(win, COLOR_PAIR(n));
+ if (has_colors()) {
+ static bool *pairs;
+ int n = (color + 1);
+ if (pairs == 0)
+ pairs = (bool *) calloc(COLORS + 1, sizeof(bool));
+ if (!pairs[n]) {
+ init_pair(n, color, my_bg);
+ pairs[n] = TRUE;
}
+ wattroff(win, A_COLOR);
+ wattron(win, COLOR_PAIR(n));
+ }
}
static void
unset_color(WINDOW *win)
{
- if (has_colors())
- wattrset(win, COLOR_PAIR(0));
+ if (has_colors())
+ wattrset(win, COLOR_PAIR(0));
}
static void
look_out(int msecs)
{
- napms(msecs);
- if (getch() != ERR) {
- beep();
- done(0);
- }
+ napms(msecs);
+ if (getch() != ERR) {
+ beep();
+ done(0);
+ }
}
-int main(
- int argc GCC_UNUSED,
- char **argv GCC_UNUSED)
+int
+main(int argc GCC_UNUSED, char **argv GCC_UNUSED)
{
-int loopy;
-
- initscr();
- noecho();
- nonl();
- refresh();
- signal(SIGINT,done);
- signal(SIGTERM,done);
+ int loopy;
+
+ initscr();
+ noecho();
+ nonl();
+ refresh();
+ signal(SIGINT, done);
+ signal(SIGTERM, done);
#if !defined DOS && !defined OS2
- signal(SIGHUP,done);
- signal(SIGQUIT,done);
+ signal(SIGHUP, done);
+ signal(SIGQUIT, done);
#endif
- if (has_colors()) {
- start_color();
-#ifdef HAVE_USE_DEFAULT_COLORS
- if (use_default_colors() == OK)
- my_bg = -1;
+ if (has_colors()) {
+ start_color();
+#if HAVE_USE_DEFAULT_COLORS
+ if (use_default_colors() == OK)
+ my_bg = -1;
#endif
- }
- curs_set(0);
-
- treescrn = newwin(16,27,3,53);
- treescrn2 = newwin(16,27,3,53);
- treescrn3 = newwin(16,27,3,53);
- treescrn4 = newwin(16,27,3,53);
- treescrn5 = newwin(16,27,3,53);
- treescrn6 = newwin(16,27,3,53);
- treescrn7 = newwin(16,27,3,53);
- treescrn8 = newwin(16,27,3,53);
-
- dotdeer0 = newwin(3,71,0,8);
-
- stardeer0 = newwin(4,56,0,8);
-
- lildeer0 = newwin(7,53,0,8);
- lildeer1 = newwin(2,4,0,0);
- lildeer2 = newwin(2,4,0,0);
- lildeer3 = newwin(2,4,0,0);
-
- middeer0 = newwin(15,42,0,8);
- middeer1 = newwin(3,7,0,0);
- middeer2 = newwin(3,7,0,0);
- middeer3 = newwin(3,7,0,0);
-
- bigdeer0 = newwin(10,23,0,0);
- bigdeer1 = newwin(10,23,0,0);
- bigdeer2 = newwin(10,23,0,0);
- bigdeer3 = newwin(10,23,0,0);
- bigdeer4 = newwin(10,23,0,0);
-
- lookdeer0 = newwin(10,25,0,0);
- lookdeer1 = newwin(10,25,0,0);
- lookdeer2 = newwin(10,25,0,0);
- lookdeer3 = newwin(10,25,0,0);
- lookdeer4 = newwin(10,25,0,0);
-
- w_holiday = newwin(1,26,3,27);
-
- w_del_msg = newwin(1,19,23,60);
-
- mvwaddstr(w_del_msg,0,0,"Hit any key to quit");
-
- mvwaddstr(w_holiday,0,0,"H A P P Y H O L I D A Y S");
-
- /* set up the windows for our various reindeer */
-
- /* lildeer1 */
- mvwaddch(lildeer1,0,0,(chtype)'V');
- mvwaddch(lildeer1,1,0,(chtype)'@');
- mvwaddch(lildeer1,1,1,(chtype)'<');
- mvwaddch(lildeer1,1,2,(chtype)'>');
- mvwaddch(lildeer1,1,3,(chtype)'~');
-
- /* lildeer2 */
- mvwaddch(lildeer2,0,0,(chtype)'V');
- mvwaddch(lildeer2,1,0,(chtype)'@');
- mvwaddch(lildeer2,1,1,(chtype)'|');
- mvwaddch(lildeer2,1,2,(chtype)'|');
- mvwaddch(lildeer2,1,3,(chtype)'~');
-
- /* lildeer3 */
- mvwaddch(lildeer3,0,0,(chtype)'V');
- mvwaddch(lildeer3,1,0,(chtype)'@');
- mvwaddch(lildeer3,1,1,(chtype)'>');
- mvwaddch(lildeer3,1,2,(chtype)'<');
- mvwaddch(lildeer2,1,3,(chtype)'~');
-
-
- /* middeer1 */
- mvwaddch(middeer1,0,2,(chtype)'y');
- mvwaddch(middeer1,0,3,(chtype)'y');
- mvwaddch(middeer1,1,2,(chtype)'0');
- mvwaddch(middeer1,1,3,(chtype)'(');
- mvwaddch(middeer1,1,4,(chtype)'=');
- mvwaddch(middeer1,1,5,(chtype)')');
- mvwaddch(middeer1,1,6,(chtype)'~');
- mvwaddch(middeer1,2,3,(chtype)'\\');
- mvwaddch(middeer1,2,4,(chtype)'/');
-
- /* middeer2 */
- mvwaddch(middeer2,0,2,(chtype)'y');
- mvwaddch(middeer2,0,3,(chtype)'y');
- mvwaddch(middeer2,1,2,(chtype)'0');
- mvwaddch(middeer2,1,3,(chtype)'(');
- mvwaddch(middeer2,1,4,(chtype)'=');
- mvwaddch(middeer2,1,5,(chtype)')');
- mvwaddch(middeer2,1,6,(chtype)'~');
- mvwaddch(middeer2,2,3,(chtype)'|');
- mvwaddch(middeer2,2,5,(chtype)'|');
-
- /* middeer3 */
- mvwaddch(middeer3,0,2,(chtype)'y');
- mvwaddch(middeer3,0,3,(chtype)'y');
- mvwaddch(middeer3,1,2,(chtype)'0');
- mvwaddch(middeer3,1,3,(chtype)'(');
- mvwaddch(middeer3,1,4,(chtype)'=');
- mvwaddch(middeer3,1,5,(chtype)')');
- mvwaddch(middeer3,1,6,(chtype)'~');
- mvwaddch(middeer3,2,2,(chtype)'/');
- mvwaddch(middeer3,2,6,(chtype)'\\');
-
-
- /* bigdeer1 */
- mvwaddch(bigdeer1,0,17,(chtype)'\\');
- mvwaddch(bigdeer1,0,18,(chtype)'/');
- mvwaddch(bigdeer1,0,20,(chtype)'\\');
- mvwaddch(bigdeer1,0,21,(chtype)'/');
- mvwaddch(bigdeer1,1,18,(chtype)'\\');
- mvwaddch(bigdeer1,1,20,(chtype)'/');
- mvwaddch(bigdeer1,2,19,(chtype)'|');
- mvwaddch(bigdeer1,2,20,(chtype)'_');
- mvwaddch(bigdeer1,3,18,(chtype)'/');
- mvwaddch(bigdeer1,3,19,(chtype)'^');
- mvwaddch(bigdeer1,3,20,(chtype)'0');
- mvwaddch(bigdeer1,3,21,(chtype)'\\');
- mvwaddch(bigdeer1,4,17,(chtype)'/');
- mvwaddch(bigdeer1,4,18,(chtype)'/');
- mvwaddch(bigdeer1,4,19,(chtype)'\\');
- mvwaddch(bigdeer1,4,22,(chtype)'\\');
- mvwaddstr(bigdeer1,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer1,6,7,"( \\_____( /");
- mvwaddstr(bigdeer1,7,8,"( ) /");
- mvwaddstr(bigdeer1,8,9,"\\\\ /");
- mvwaddstr(bigdeer1,9,11,"\\>/>");
-
- /* bigdeer2 */
- mvwaddch(bigdeer2,0,17,(chtype)'\\');
- mvwaddch(bigdeer2,0,18,(chtype)'/');
- mvwaddch(bigdeer2,0,20,(chtype)'\\');
- mvwaddch(bigdeer2,0,21,(chtype)'/');
- mvwaddch(bigdeer2,1,18,(chtype)'\\');
- mvwaddch(bigdeer2,1,20,(chtype)'/');
- mvwaddch(bigdeer2,2,19,(chtype)'|');
- mvwaddch(bigdeer2,2,20,(chtype)'_');
- mvwaddch(bigdeer2,3,18,(chtype)'/');
- mvwaddch(bigdeer2,3,19,(chtype)'^');
- mvwaddch(bigdeer2,3,20,(chtype)'0');
- mvwaddch(bigdeer2,3,21,(chtype)'\\');
- mvwaddch(bigdeer2,4,17,(chtype)'/');
- mvwaddch(bigdeer2,4,18,(chtype)'/');
- mvwaddch(bigdeer2,4,19,(chtype)'\\');
- mvwaddch(bigdeer2,4,22,(chtype)'\\');
- mvwaddstr(bigdeer2,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer2,6,7,"(( )____( /");
- mvwaddstr(bigdeer2,7,7,"( / |");
- mvwaddstr(bigdeer2,8,8,"\\/ |");
- mvwaddstr(bigdeer2,9,9,"|> |>");
-
- /* bigdeer3 */
- mvwaddch(bigdeer3,0,17,(chtype)'\\');
- mvwaddch(bigdeer3,0,18,(chtype)'/');
- mvwaddch(bigdeer3,0,20,(chtype)'\\');
- mvwaddch(bigdeer3,0,21,(chtype)'/');
- mvwaddch(bigdeer3,1,18,(chtype)'\\');
- mvwaddch(bigdeer3,1,20,(chtype)'/');
- mvwaddch(bigdeer3,2,19,(chtype)'|');
- mvwaddch(bigdeer3,2,20,(chtype)'_');
- mvwaddch(bigdeer3,3,18,(chtype)'/');
- mvwaddch(bigdeer3,3,19,(chtype)'^');
- mvwaddch(bigdeer3,3,20,(chtype)'0');
- mvwaddch(bigdeer3,3,21,(chtype)'\\');
- mvwaddch(bigdeer3,4,17,(chtype)'/');
- mvwaddch(bigdeer3,4,18,(chtype)'/');
- mvwaddch(bigdeer3,4,19,(chtype)'\\');
- mvwaddch(bigdeer3,4,22,(chtype)'\\');
- mvwaddstr(bigdeer3,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer3,6,6,"( ()_____( /");
- mvwaddstr(bigdeer3,7,6,"/ / /");
- mvwaddstr(bigdeer3,8,5,"|/ \\");
- mvwaddstr(bigdeer3,9,5,"/> \\>");
-
- /* bigdeer4 */
- mvwaddch(bigdeer4,0,17,(chtype)'\\');
- mvwaddch(bigdeer4,0,18,(chtype)'/');
- mvwaddch(bigdeer4,0,20,(chtype)'\\');
- mvwaddch(bigdeer4,0,21,(chtype)'/');
- mvwaddch(bigdeer4,1,18,(chtype)'\\');
- mvwaddch(bigdeer4,1,20,(chtype)'/');
- mvwaddch(bigdeer4,2,19,(chtype)'|');
- mvwaddch(bigdeer4,2,20,(chtype)'_');
- mvwaddch(bigdeer4,3,18,(chtype)'/');
- mvwaddch(bigdeer4,3,19,(chtype)'^');
- mvwaddch(bigdeer4,3,20,(chtype)'0');
- mvwaddch(bigdeer4,3,21,(chtype)'\\');
- mvwaddch(bigdeer4,4,17,(chtype)'/');
- mvwaddch(bigdeer4,4,18,(chtype)'/');
- mvwaddch(bigdeer4,4,19,(chtype)'\\');
- mvwaddch(bigdeer4,4,22,(chtype)'\\');
- mvwaddstr(bigdeer4,5,7,"^~~~~~~~~// ~~U");
- mvwaddstr(bigdeer4,6,6,"( )______( /");
- mvwaddstr(bigdeer4,7,5,"(/ \\");
- mvwaddstr(bigdeer4,8,0,"v___= ----^");
-
-
- /* lookdeer1 */
- mvwaddstr(lookdeer1,0,16,"\\/ \\/");
- mvwaddstr(lookdeer1,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer1,2,19,"\\=/");
- mvwaddstr(lookdeer1,3,17,"^\\o o/^");
- mvwaddstr(lookdeer1,4,17,"//( )");
- mvwaddstr(lookdeer1,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer1,6,7,"( \\_____( /");
- mvwaddstr(lookdeer1,7,8,"( ) /");
- mvwaddstr(lookdeer1,8,9,"\\\\ /");
- mvwaddstr(lookdeer1,9,11,"\\>/>");
-
- /* lookdeer2 */
- mvwaddstr(lookdeer2,0,16,"\\/ \\/");
- mvwaddstr(lookdeer2,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer2,2,19,"\\=/");
- mvwaddstr(lookdeer2,3,17,"^\\o o/^");
- mvwaddstr(lookdeer2,4,17,"//( )");
- mvwaddstr(lookdeer2,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer2,6,7,"(( )____( /");
- mvwaddstr(lookdeer2,7,7,"( / |");
- mvwaddstr(lookdeer2,8,8,"\\/ |");
- mvwaddstr(lookdeer2,9,9,"|> |>");
-
- /* lookdeer3 */
- mvwaddstr(lookdeer3,0,16,"\\/ \\/");
- mvwaddstr(lookdeer3,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer3,2,19,"\\=/");
- mvwaddstr(lookdeer3,3,17,"^\\o o/^");
- mvwaddstr(lookdeer3,4,17,"//( )");
- mvwaddstr(lookdeer3,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer3,6,6,"( ()_____( /");
- mvwaddstr(lookdeer3,7,6,"/ / /");
- mvwaddstr(lookdeer3,8,5,"|/ \\");
- mvwaddstr(lookdeer3,9,5,"/> \\>");
-
- /* lookdeer4 */
- mvwaddstr(lookdeer4,0,16,"\\/ \\/");
- mvwaddstr(lookdeer4,1,17,"\\Y/ \\Y/");
- mvwaddstr(lookdeer4,2,19,"\\=/");
- mvwaddstr(lookdeer4,3,17,"^\\o o/^");
- mvwaddstr(lookdeer4,4,17,"//( )");
- mvwaddstr(lookdeer4,5,7,"^~~~~~~~~// \\O/");
- mvwaddstr(lookdeer4,6,6,"( )______( /");
- mvwaddstr(lookdeer4,7,5,"(/ \\");
- mvwaddstr(lookdeer4,8,0,"v___= ----^");
-
-
+ }
+ curs_set(0);
+
+ treescrn = newwin(16, 27, 3, 53);
+ treescrn2 = newwin(16, 27, 3, 53);
+ treescrn3 = newwin(16, 27, 3, 53);
+ treescrn4 = newwin(16, 27, 3, 53);
+ treescrn5 = newwin(16, 27, 3, 53);
+ treescrn6 = newwin(16, 27, 3, 53);
+ treescrn7 = newwin(16, 27, 3, 53);
+ treescrn8 = newwin(16, 27, 3, 53);
+
+ dotdeer0 = newwin(3, 71, 0, 8);
+
+ stardeer0 = newwin(4, 56, 0, 8);
+
+ lildeer0 = newwin(7, 53, 0, 8);
+ lildeer1 = newwin(2, 4, 0, 0);
+ lildeer2 = newwin(2, 4, 0, 0);
+ lildeer3 = newwin(2, 4, 0, 0);
+
+ middeer0 = newwin(15, 42, 0, 8);
+ middeer1 = newwin(3, 7, 0, 0);
+ middeer2 = newwin(3, 7, 0, 0);
+ middeer3 = newwin(3, 7, 0, 0);
+
+ bigdeer0 = newwin(10, 23, 0, 0);
+ bigdeer1 = newwin(10, 23, 0, 0);
+ bigdeer2 = newwin(10, 23, 0, 0);
+ bigdeer3 = newwin(10, 23, 0, 0);
+ bigdeer4 = newwin(10, 23, 0, 0);
+
+ lookdeer0 = newwin(10, 25, 0, 0);
+ lookdeer1 = newwin(10, 25, 0, 0);
+ lookdeer2 = newwin(10, 25, 0, 0);
+ lookdeer3 = newwin(10, 25, 0, 0);
+ lookdeer4 = newwin(10, 25, 0, 0);
+
+ w_holiday = newwin(1, 26, 3, 27);
+
+ w_del_msg = newwin(1, 19, 23, 60);
+
+ mvwaddstr(w_del_msg, 0, 0, "Hit any key to quit");
+
+ mvwaddstr(w_holiday, 0, 0, "H A P P Y H O L I D A Y S");
+
+ /* set up the windows for our various reindeer */
+
+ /* lildeer1 */
+ mvwaddch(lildeer1, 0, 0, (chtype) 'V');
+ mvwaddch(lildeer1, 1, 0, (chtype) '@');
+ mvwaddch(lildeer1, 1, 1, (chtype) '<');
+ mvwaddch(lildeer1, 1, 2, (chtype) '>');
+ mvwaddch(lildeer1, 1, 3, (chtype) '~');
+
+ /* lildeer2 */
+ mvwaddch(lildeer2, 0, 0, (chtype) 'V');
+ mvwaddch(lildeer2, 1, 0, (chtype) '@');
+ mvwaddch(lildeer2, 1, 1, (chtype) '|');
+ mvwaddch(lildeer2, 1, 2, (chtype) '|');
+ mvwaddch(lildeer2, 1, 3, (chtype) '~');
+
+ /* lildeer3 */
+ mvwaddch(lildeer3, 0, 0, (chtype) 'V');
+ mvwaddch(lildeer3, 1, 0, (chtype) '@');
+ mvwaddch(lildeer3, 1, 1, (chtype) '>');
+ mvwaddch(lildeer3, 1, 2, (chtype) '<');
+ mvwaddch(lildeer2, 1, 3, (chtype) '~');
+
+ /* middeer1 */
+ mvwaddch(middeer1, 0, 2, (chtype) 'y');
+ mvwaddch(middeer1, 0, 3, (chtype) 'y');
+ mvwaddch(middeer1, 1, 2, (chtype) '0');
+ mvwaddch(middeer1, 1, 3, (chtype) '(');
+ mvwaddch(middeer1, 1, 4, (chtype) '=');
+ mvwaddch(middeer1, 1, 5, (chtype) ')');
+ mvwaddch(middeer1, 1, 6, (chtype) '~');
+ mvwaddch(middeer1, 2, 3, (chtype) '\\');
+ mvwaddch(middeer1, 2, 4, (chtype) '/');
+
+ /* middeer2 */
+ mvwaddch(middeer2, 0, 2, (chtype) 'y');
+ mvwaddch(middeer2, 0, 3, (chtype) 'y');
+ mvwaddch(middeer2, 1, 2, (chtype) '0');
+ mvwaddch(middeer2, 1, 3, (chtype) '(');
+ mvwaddch(middeer2, 1, 4, (chtype) '=');
+ mvwaddch(middeer2, 1, 5, (chtype) ')');
+ mvwaddch(middeer2, 1, 6, (chtype) '~');
+ mvwaddch(middeer2, 2, 3, (chtype) '|');
+ mvwaddch(middeer2, 2, 5, (chtype) '|');
+
+ /* middeer3 */
+ mvwaddch(middeer3, 0, 2, (chtype) 'y');
+ mvwaddch(middeer3, 0, 3, (chtype) 'y');
+ mvwaddch(middeer3, 1, 2, (chtype) '0');
+ mvwaddch(middeer3, 1, 3, (chtype) '(');
+ mvwaddch(middeer3, 1, 4, (chtype) '=');
+ mvwaddch(middeer3, 1, 5, (chtype) ')');
+ mvwaddch(middeer3, 1, 6, (chtype) '~');
+ mvwaddch(middeer3, 2, 2, (chtype) '/');
+ mvwaddch(middeer3, 2, 6, (chtype) '\\');
+
+ /* bigdeer1 */
+ mvwaddch(bigdeer1, 0, 17, (chtype) '\\');
+ mvwaddch(bigdeer1, 0, 18, (chtype) '/');
+ mvwaddch(bigdeer1, 0, 20, (chtype) '\\');
+ mvwaddch(bigdeer1, 0, 21, (chtype) '/');
+ mvwaddch(bigdeer1, 1, 18, (chtype) '\\');
+ mvwaddch(bigdeer1, 1, 20, (chtype) '/');
+ mvwaddch(bigdeer1, 2, 19, (chtype) '|');
+ mvwaddch(bigdeer1, 2, 20, (chtype) '_');
+ mvwaddch(bigdeer1, 3, 18, (chtype) '/');
+ mvwaddch(bigdeer1, 3, 19, (chtype) '^');
+ mvwaddch(bigdeer1, 3, 20, (chtype) '0');
+ mvwaddch(bigdeer1, 3, 21, (chtype) '\\');
+ mvwaddch(bigdeer1, 4, 17, (chtype) '/');
+ mvwaddch(bigdeer1, 4, 18, (chtype) '/');
+ mvwaddch(bigdeer1, 4, 19, (chtype) '\\');
+ mvwaddch(bigdeer1, 4, 22, (chtype) '\\');
+ mvwaddstr(bigdeer1, 5, 7, "^~~~~~~~~// ~~U");
+ mvwaddstr(bigdeer1, 6, 7, "( \\_____( /");
+ mvwaddstr(bigdeer1, 7, 8, "( ) /");
+ mvwaddstr(bigdeer1, 8, 9, "\\\\ /");
+ mvwaddstr(bigdeer1, 9, 11, "\\>/>");
+
+ /* bigdeer2 */
+ mvwaddch(bigdeer2, 0, 17, (chtype) '\\');
+ mvwaddch(bigdeer2, 0, 18, (chtype) '/');
+ mvwaddch(bigdeer2, 0, 20, (chtype) '\\');
+ mvwaddch(bigdeer2, 0, 21, (chtype) '/');
+ mvwaddch(bigdeer2, 1, 18, (chtype) '\\');
+ mvwaddch(bigdeer2, 1, 20, (chtype) '/');
+ mvwaddch(bigdeer2, 2, 19, (chtype) '|');
+ mvwaddch(bigdeer2, 2, 20, (chtype) '_');
+ mvwaddch(bigdeer2, 3, 18, (chtype) '/');
+ mvwaddch(bigdeer2, 3, 19, (chtype) '^');
+ mvwaddch(bigdeer2, 3, 20, (chtype) '0');
+ mvwaddch(bigdeer2, 3, 21, (chtype) '\\');
+ mvwaddch(bigdeer2, 4, 17, (chtype) '/');
+ mvwaddch(bigdeer2, 4, 18, (chtype) '/');
+ mvwaddch(bigdeer2, 4, 19, (chtype) '\\');
+ mvwaddch(bigdeer2, 4, 22, (chtype) '\\');
+ mvwaddstr(bigdeer2, 5, 7, "^~~~~~~~~// ~~U");
+ mvwaddstr(bigdeer2, 6, 7, "(( )____( /");
+ mvwaddstr(bigdeer2, 7, 7, "( / |");
+ mvwaddstr(bigdeer2, 8, 8, "\\/ |");
+ mvwaddstr(bigdeer2, 9, 9, "|> |>");
+
+ /* bigdeer3 */
+ mvwaddch(bigdeer3, 0, 17, (chtype) '\\');
+ mvwaddch(bigdeer3, 0, 18, (chtype) '/');
+ mvwaddch(bigdeer3, 0, 20, (chtype) '\\');
+ mvwaddch(bigdeer3, 0, 21, (chtype) '/');
+ mvwaddch(bigdeer3, 1, 18, (chtype) '\\');
+ mvwaddch(bigdeer3, 1, 20, (chtype) '/');
+ mvwaddch(bigdeer3, 2, 19, (chtype) '|');
+ mvwaddch(bigdeer3, 2, 20, (chtype) '_');
+ mvwaddch(bigdeer3, 3, 18, (chtype) '/');
+ mvwaddch(bigdeer3, 3, 19, (chtype) '^');
+ mvwaddch(bigdeer3, 3, 20, (chtype) '0');
+ mvwaddch(bigdeer3, 3, 21, (chtype) '\\');
+ mvwaddch(bigdeer3, 4, 17, (chtype) '/');
+ mvwaddch(bigdeer3, 4, 18, (chtype) '/');
+ mvwaddch(bigdeer3, 4, 19, (chtype) '\\');
+ mvwaddch(bigdeer3, 4, 22, (chtype) '\\');
+ mvwaddstr(bigdeer3, 5, 7, "^~~~~~~~~// ~~U");
+ mvwaddstr(bigdeer3, 6, 6, "( ()_____( /");
+ mvwaddstr(bigdeer3, 7, 6, "/ / /");
+ mvwaddstr(bigdeer3, 8, 5, "|/ \\");
+ mvwaddstr(bigdeer3, 9, 5, "/> \\>");
+
+ /* bigdeer4 */
+ mvwaddch(bigdeer4, 0, 17, (chtype) '\\');
+ mvwaddch(bigdeer4, 0, 18, (chtype) '/');
+ mvwaddch(bigdeer4, 0, 20, (chtype) '\\');
+ mvwaddch(bigdeer4, 0, 21, (chtype) '/');
+ mvwaddch(bigdeer4, 1, 18, (chtype) '\\');
+ mvwaddch(bigdeer4, 1, 20, (chtype) '/');
+ mvwaddch(bigdeer4, 2, 19, (chtype) '|');
+ mvwaddch(bigdeer4, 2, 20, (chtype) '_');
+ mvwaddch(bigdeer4, 3, 18, (chtype) '/');
+ mvwaddch(bigdeer4, 3, 19, (chtype) '^');
+ mvwaddch(bigdeer4, 3, 20, (chtype) '0');
+ mvwaddch(bigdeer4, 3, 21, (chtype) '\\');
+ mvwaddch(bigdeer4, 4, 17, (chtype) '/');
+ mvwaddch(bigdeer4, 4, 18, (chtype) '/');
+ mvwaddch(bigdeer4, 4, 19, (chtype) '\\');
+ mvwaddch(bigdeer4, 4, 22, (chtype) '\\');
+ mvwaddstr(bigdeer4, 5, 7, "^~~~~~~~~// ~~U");
+ mvwaddstr(bigdeer4, 6, 6, "( )______( /");
+ mvwaddstr(bigdeer4, 7, 5, "(/ \\");
+ mvwaddstr(bigdeer4, 8, 0, "v___= ----^");
+
+ /* lookdeer1 */
+ mvwaddstr(lookdeer1, 0, 16, "\\/ \\/");
+ mvwaddstr(lookdeer1, 1, 17, "\\Y/ \\Y/");
+ mvwaddstr(lookdeer1, 2, 19, "\\=/");
+ mvwaddstr(lookdeer1, 3, 17, "^\\o o/^");
+ mvwaddstr(lookdeer1, 4, 17, "//( )");
+ mvwaddstr(lookdeer1, 5, 7, "^~~~~~~~~// \\O/");
+ mvwaddstr(lookdeer1, 6, 7, "( \\_____( /");
+ mvwaddstr(lookdeer1, 7, 8, "( ) /");
+ mvwaddstr(lookdeer1, 8, 9, "\\\\ /");
+ mvwaddstr(lookdeer1, 9, 11, "\\>/>");
+
+ /* lookdeer2 */
+ mvwaddstr(lookdeer2, 0, 16, "\\/ \\/");
+ mvwaddstr(lookdeer2, 1, 17, "\\Y/ \\Y/");
+ mvwaddstr(lookdeer2, 2, 19, "\\=/");
+ mvwaddstr(lookdeer2, 3, 17, "^\\o o/^");
+ mvwaddstr(lookdeer2, 4, 17, "//( )");
+ mvwaddstr(lookdeer2, 5, 7, "^~~~~~~~~// \\O/");
+ mvwaddstr(lookdeer2, 6, 7, "(( )____( /");
+ mvwaddstr(lookdeer2, 7, 7, "( / |");
+ mvwaddstr(lookdeer2, 8, 8, "\\/ |");
+ mvwaddstr(lookdeer2, 9, 9, "|> |>");
+
+ /* lookdeer3 */
+ mvwaddstr(lookdeer3, 0, 16, "\\/ \\/");
+ mvwaddstr(lookdeer3, 1, 17, "\\Y/ \\Y/");
+ mvwaddstr(lookdeer3, 2, 19, "\\=/");
+ mvwaddstr(lookdeer3, 3, 17, "^\\o o/^");
+ mvwaddstr(lookdeer3, 4, 17, "//( )");
+ mvwaddstr(lookdeer3, 5, 7, "^~~~~~~~~// \\O/");
+ mvwaddstr(lookdeer3, 6, 6, "( ()_____( /");
+ mvwaddstr(lookdeer3, 7, 6, "/ / /");
+ mvwaddstr(lookdeer3, 8, 5, "|/ \\");
+ mvwaddstr(lookdeer3, 9, 5, "/> \\>");
+
+ /* lookdeer4 */
+ mvwaddstr(lookdeer4, 0, 16, "\\/ \\/");
+ mvwaddstr(lookdeer4, 1, 17, "\\Y/ \\Y/");
+ mvwaddstr(lookdeer4, 2, 19, "\\=/");
+ mvwaddstr(lookdeer4, 3, 17, "^\\o o/^");
+ mvwaddstr(lookdeer4, 4, 17, "//( )");
+ mvwaddstr(lookdeer4, 5, 7, "^~~~~~~~~// \\O/");
+ mvwaddstr(lookdeer4, 6, 6, "( )______( /");
+ mvwaddstr(lookdeer4, 7, 5, "(/ \\");
+ mvwaddstr(lookdeer4, 8, 0, "v___= ----^");
/***********************************************/
- cbreak();
- nodelay(stdscr,TRUE);
- for (;;) {
- clear();
- werase(treescrn);
- touchwin(w_del_msg);
- touchwin(treescrn);
- werase(treescrn2);
- touchwin(treescrn2);
- werase(treescrn8);
- touchwin(treescrn8);
- refresh();
- look_out(150);
- boxit();
- refresh();
- look_out(150);
- seas();
- refresh();
- look_out(150);
- greet();
- refresh();
- look_out(150);
- fromwho();
- refresh();
- look_out(150);
- tree();
- look_out(150);
- balls();
- look_out(150);
- star();
- look_out(150);
- strng1();
- strng2();
- strng3();
- strng4();
- strng5();
-
+ cbreak();
+ nodelay(stdscr, TRUE);
+ for (;;) {
+ clear();
+ werase(treescrn);
+ touchwin(w_del_msg);
+ touchwin(treescrn);
+ werase(treescrn2);
+ touchwin(treescrn2);
+ werase(treescrn8);
+ touchwin(treescrn8);
+ refresh();
+ look_out(150);
+ boxit();
+ refresh();
+ look_out(150);
+ seas();
+ refresh();
+ look_out(150);
+ greet();
+ refresh();
+ look_out(150);
+ fromwho();
+ refresh();
+ look_out(150);
+ tree();
+ look_out(150);
+ balls();
+ look_out(150);
+ star();
+ look_out(150);
+ strng1();
+ strng2();
+ strng3();
+ strng4();
+ strng5();
/* set up the windows for our blinking trees */
/* **************************************** */
/* treescrn3 */
- overlay(treescrn, treescrn3);
+ overlay(treescrn, treescrn3);
- /*balls*/
- mvwaddch(treescrn3, 4, 18, ' ');
- mvwaddch(treescrn3, 7, 6, ' ');
- mvwaddch(treescrn3, 8, 19, ' ');
- mvwaddch(treescrn3, 11, 22, ' ');
+ /*balls */
+ mvwaddch(treescrn3, 4, 18, ' ');
+ mvwaddch(treescrn3, 7, 6, ' ');
+ mvwaddch(treescrn3, 8, 19, ' ');
+ mvwaddch(treescrn3, 11, 22, ' ');
- /*star*/
- mvwaddch(treescrn3, 0, 12, '*');
+ /*star */
+ mvwaddch(treescrn3, 0, 12, '*');
- /*strng1*/
- mvwaddch(treescrn3, 3, 11, ' ');
+ /*strng1 */
+ mvwaddch(treescrn3, 3, 11, ' ');
- /*strng2*/
- mvwaddch(treescrn3, 5, 13, ' ');
- mvwaddch(treescrn3, 6, 10, ' ');
+ /*strng2 */
+ mvwaddch(treescrn3, 5, 13, ' ');
+ mvwaddch(treescrn3, 6, 10, ' ');
- /*strng3*/
- mvwaddch(treescrn3, 7, 16, ' ');
- mvwaddch(treescrn3, 7, 14, ' ');
+ /*strng3 */
+ mvwaddch(treescrn3, 7, 16, ' ');
+ mvwaddch(treescrn3, 7, 14, ' ');
- /*strng4*/
- mvwaddch(treescrn3, 10, 13, ' ');
- mvwaddch(treescrn3, 10, 10, ' ');
- mvwaddch(treescrn3, 11, 8, ' ');
-
- /*strng5*/
- mvwaddch(treescrn3, 11, 18, ' ');
- mvwaddch(treescrn3, 12, 13, ' ');
+ /*strng4 */
+ mvwaddch(treescrn3, 10, 13, ' ');
+ mvwaddch(treescrn3, 10, 10, ' ');
+ mvwaddch(treescrn3, 11, 8, ' ');
+ /*strng5 */
+ mvwaddch(treescrn3, 11, 18, ' ');
+ mvwaddch(treescrn3, 12, 13, ' ');
/* treescrn4 */
- overlay(treescrn, treescrn4);
-
- /*balls*/
- mvwaddch(treescrn4, 3, 9, ' ');
- mvwaddch(treescrn4, 4, 16, ' ');
- mvwaddch(treescrn4, 7, 6, ' ');
- mvwaddch(treescrn4, 8, 19, ' ');
- mvwaddch(treescrn4, 11, 2, ' ');
- mvwaddch(treescrn4, 12, 23, ' ');
+ overlay(treescrn, treescrn4);
- /*star*/
- wstandout(treescrn4);
- mvwaddch(treescrn4, 0, 12, '*');
- wstandend(treescrn4);
+ /*balls */
+ mvwaddch(treescrn4, 3, 9, ' ');
+ mvwaddch(treescrn4, 4, 16, ' ');
+ mvwaddch(treescrn4, 7, 6, ' ');
+ mvwaddch(treescrn4, 8, 19, ' ');
+ mvwaddch(treescrn4, 11, 2, ' ');
+ mvwaddch(treescrn4, 12, 23, ' ');
- /*strng1*/
- mvwaddch(treescrn4, 3, 13, ' ');
+ /*star */
+ wstandout(treescrn4);
+ mvwaddch(treescrn4, 0, 12, '*');
+ wstandend(treescrn4);
- /*strng2*/
+ /*strng1 */
+ mvwaddch(treescrn4, 3, 13, ' ');
- /*strng3*/
- mvwaddch(treescrn4, 7, 15, ' ');
- mvwaddch(treescrn4, 8, 11, ' ');
+ /*strng2 */
- /*strng4*/
- mvwaddch(treescrn4, 9, 16, ' ');
- mvwaddch(treescrn4, 10, 12, ' ');
- mvwaddch(treescrn4, 11, 8, ' ');
+ /*strng3 */
+ mvwaddch(treescrn4, 7, 15, ' ');
+ mvwaddch(treescrn4, 8, 11, ' ');
- /*strng5*/
- mvwaddch(treescrn4, 11, 18, ' ');
- mvwaddch(treescrn4, 12, 14, ' ');
+ /*strng4 */
+ mvwaddch(treescrn4, 9, 16, ' ');
+ mvwaddch(treescrn4, 10, 12, ' ');
+ mvwaddch(treescrn4, 11, 8, ' ');
+ /*strng5 */
+ mvwaddch(treescrn4, 11, 18, ' ');
+ mvwaddch(treescrn4, 12, 14, ' ');
/* treescrn5 */
- overlay(treescrn, treescrn5);
+ overlay(treescrn, treescrn5);
- /*balls*/
- mvwaddch(treescrn5, 3, 15, ' ');
- mvwaddch(treescrn5, 10, 20, ' ');
- mvwaddch(treescrn5, 12, 1, ' ');
+ /*balls */
+ mvwaddch(treescrn5, 3, 15, ' ');
+ mvwaddch(treescrn5, 10, 20, ' ');
+ mvwaddch(treescrn5, 12, 1, ' ');
- /*star*/
- mvwaddch(treescrn5, 0, 12, '*');
+ /*star */
+ mvwaddch(treescrn5, 0, 12, '*');
- /*strng1*/
- mvwaddch(treescrn5, 3, 11, ' ');
+ /*strng1 */
+ mvwaddch(treescrn5, 3, 11, ' ');
- /*strng2*/
- mvwaddch(treescrn5, 5, 12, ' ');
+ /*strng2 */
+ mvwaddch(treescrn5, 5, 12, ' ');
- /*strng3*/
- mvwaddch(treescrn5, 7, 14, ' ');
- mvwaddch(treescrn5, 8, 10, ' ');
+ /*strng3 */
+ mvwaddch(treescrn5, 7, 14, ' ');
+ mvwaddch(treescrn5, 8, 10, ' ');
- /*strng4*/
- mvwaddch(treescrn5, 9, 15, ' ');
- mvwaddch(treescrn5, 10, 11, ' ');
- mvwaddch(treescrn5, 11, 7, ' ');
+ /*strng4 */
+ mvwaddch(treescrn5, 9, 15, ' ');
+ mvwaddch(treescrn5, 10, 11, ' ');
+ mvwaddch(treescrn5, 11, 7, ' ');
- /*strng5*/
- mvwaddch(treescrn5, 11, 17, ' ');
- mvwaddch(treescrn5, 12, 13, ' ');
+ /*strng5 */
+ mvwaddch(treescrn5, 11, 17, ' ');
+ mvwaddch(treescrn5, 12, 13, ' ');
/* treescrn6 */
- overlay(treescrn, treescrn6);
+ overlay(treescrn, treescrn6);
- /*balls*/
- mvwaddch(treescrn6, 6, 7, ' ');
- mvwaddch(treescrn6, 7, 18, ' ');
- mvwaddch(treescrn6, 10, 4, ' ');
- mvwaddch(treescrn6, 11, 23, ' ');
+ /*balls */
+ mvwaddch(treescrn6, 6, 7, ' ');
+ mvwaddch(treescrn6, 7, 18, ' ');
+ mvwaddch(treescrn6, 10, 4, ' ');
+ mvwaddch(treescrn6, 11, 23, ' ');
- /*star*/
- wstandout(treescrn6);
- mvwaddch(treescrn6, 0, 12, '*');
- wstandend(treescrn6);
+ /*star */
+ wstandout(treescrn6);
+ mvwaddch(treescrn6, 0, 12, '*');
+ wstandend(treescrn6);
- /*strng1*/
+ /*strng1 */
- /*strng2*/
- mvwaddch(treescrn6, 5, 11, ' ');
+ /*strng2 */
+ mvwaddch(treescrn6, 5, 11, ' ');
- /*strng3*/
- mvwaddch(treescrn6, 7, 13, ' ');
- mvwaddch(treescrn6, 8, 9, ' ');
+ /*strng3 */
+ mvwaddch(treescrn6, 7, 13, ' ');
+ mvwaddch(treescrn6, 8, 9, ' ');
- /*strng4*/
- mvwaddch(treescrn6, 9, 14, ' ');
- mvwaddch(treescrn6, 10, 10, ' ');
- mvwaddch(treescrn6, 11, 6, ' ');
+ /*strng4 */
+ mvwaddch(treescrn6, 9, 14, ' ');
+ mvwaddch(treescrn6, 10, 10, ' ');
+ mvwaddch(treescrn6, 11, 6, ' ');
- /*strng5*/
- mvwaddch(treescrn6, 11, 16, ' ');
- mvwaddch(treescrn6, 12, 12, ' ');
+ /*strng5 */
+ mvwaddch(treescrn6, 11, 16, ' ');
+ mvwaddch(treescrn6, 12, 12, ' ');
/* treescrn7 */
- overlay(treescrn, treescrn7);
-
- /*balls*/
- mvwaddch(treescrn7, 3, 15, ' ');
- mvwaddch(treescrn7, 6, 7, ' ');
- mvwaddch(treescrn7, 7, 18, ' ');
- mvwaddch(treescrn7, 10, 4, ' ');
- mvwaddch(treescrn7, 11, 22, ' ');
+ overlay(treescrn, treescrn7);
- /*star*/
- mvwaddch(treescrn7, 0, 12, '*');
+ /*balls */
+ mvwaddch(treescrn7, 3, 15, ' ');
+ mvwaddch(treescrn7, 6, 7, ' ');
+ mvwaddch(treescrn7, 7, 18, ' ');
+ mvwaddch(treescrn7, 10, 4, ' ');
+ mvwaddch(treescrn7, 11, 22, ' ');
- /*strng1*/
- mvwaddch(treescrn7, 3, 12, ' ');
+ /*star */
+ mvwaddch(treescrn7, 0, 12, '*');
- /*strng2*/
- mvwaddch(treescrn7, 5, 13, ' ');
- mvwaddch(treescrn7, 6, 9, ' ');
+ /*strng1 */
+ mvwaddch(treescrn7, 3, 12, ' ');
- /*strng3*/
- mvwaddch(treescrn7, 7, 15, ' ');
- mvwaddch(treescrn7, 8, 11, ' ');
+ /*strng2 */
+ mvwaddch(treescrn7, 5, 13, ' ');
+ mvwaddch(treescrn7, 6, 9, ' ');
- /*strng4*/
- mvwaddch(treescrn7, 9, 16, ' ');
- mvwaddch(treescrn7, 10, 12, ' ');
- mvwaddch(treescrn7, 11, 8, ' ');
+ /*strng3 */
+ mvwaddch(treescrn7, 7, 15, ' ');
+ mvwaddch(treescrn7, 8, 11, ' ');
- /*strng5*/
- mvwaddch(treescrn7, 11, 18, ' ');
- mvwaddch(treescrn7, 12, 14, ' ');
+ /*strng4 */
+ mvwaddch(treescrn7, 9, 16, ' ');
+ mvwaddch(treescrn7, 10, 12, ' ');
+ mvwaddch(treescrn7, 11, 8, ' ');
+ /*strng5 */
+ mvwaddch(treescrn7, 11, 18, ' ');
+ mvwaddch(treescrn7, 12, 14, ' ');
- look_out(150);
- reindeer();
+ look_out(150);
+ reindeer();
- touchwin(w_holiday);
- wrefresh(w_holiday);
- wrefresh(w_del_msg);
+ touchwin(w_holiday);
+ wrefresh(w_holiday);
+ wrefresh(w_del_msg);
- look_out(500);
- for(loopy = 0;loopy < 100;loopy++) {
- blinkit();
- }
+ look_out(500);
+ for (loopy = 0; loopy < 100; loopy++) {
+ blinkit();
+ }
#ifdef NOLOOP
- done(0);
+ done(0);
#endif
- }
- /*NOTREACHED*/
+ }
+ /*NOTREACHED */
}
-static int boxit(void)
+static int
+boxit(void)
{
- int x = 0;
+ int x = 0;
- while(x < 20) {
- mvaddch(x, 7, '|');
- ++x;
- }
+ while (x < 20) {
+ mvaddch(x, 7, '|');
+ ++x;
+ }
- x = 8;
+ x = 8;
- while(x < 80) {
- mvaddch(19, x, '_');
- ++x;
- }
+ while (x < 80) {
+ mvaddch(19, x, '_');
+ ++x;
+ }
- x = 0;
+ x = 0;
- while(x < 80) {
- mvaddch(22, x, '_');
- ++x;
- }
+ while (x < 80) {
+ mvaddch(22, x, '_');
+ ++x;
+ }
- return( 0 );
+ return (0);
}
-static int seas(void)
+static int
+seas(void)
{
- mvaddch(4, 1, 'S');
- mvaddch(6, 1, 'E');
- mvaddch(8, 1, 'A');
- mvaddch(10, 1, 'S');
- mvaddch(12, 1, 'O');
- mvaddch(14, 1, 'N');
- mvaddch(16, 1, '`');
- mvaddch(18, 1, 'S');
-
- return( 0 );
+ mvaddch(4, 1, 'S');
+ mvaddch(6, 1, 'E');
+ mvaddch(8, 1, 'A');
+ mvaddch(10, 1, 'S');
+ mvaddch(12, 1, 'O');
+ mvaddch(14, 1, 'N');
+ mvaddch(16, 1, '`');
+ mvaddch(18, 1, 'S');
+
+ return (0);
}
-
-static int greet(void)
+static int
+greet(void)
{
- mvaddch(3, 5, 'G');
- mvaddch(5, 5, 'R');
- mvaddch(7, 5, 'E');
- mvaddch(9, 5, 'E');
- mvaddch(11, 5, 'T');
- mvaddch(13, 5, 'I');
- mvaddch(15, 5, 'N');
- mvaddch(17, 5, 'G');
- mvaddch(19, 5, 'S');
-
- return( 0 );
+ mvaddch(3, 5, 'G');
+ mvaddch(5, 5, 'R');
+ mvaddch(7, 5, 'E');
+ mvaddch(9, 5, 'E');
+ mvaddch(11, 5, 'T');
+ mvaddch(13, 5, 'I');
+ mvaddch(15, 5, 'N');
+ mvaddch(17, 5, 'G');
+ mvaddch(19, 5, 'S');
+
+ return (0);
}
-
-static int fromwho(void)
+static int
+fromwho(void)
{
- mvaddstr(21, 13, FROMWHO);
- return( 0 );
+ mvaddstr(21, 13, FROMWHO);
+ return (0);
}
-static int tree(void)
+static int
+tree(void)
{
- set_color(treescrn, COLOR_GREEN);
- mvwaddch(treescrn, 1, 11, (chtype)'/');
- mvwaddch(treescrn, 2, 11, (chtype)'/');
- mvwaddch(treescrn, 3, 10, (chtype)'/');
- mvwaddch(treescrn, 4, 9, (chtype)'/');
- mvwaddch(treescrn, 5, 9, (chtype)'/');
- mvwaddch(treescrn, 6, 8, (chtype)'/');
- mvwaddch(treescrn, 7, 7, (chtype)'/');
- mvwaddch(treescrn, 8, 6, (chtype)'/');
- mvwaddch(treescrn, 9, 6, (chtype)'/');
- mvwaddch(treescrn, 10, 5, (chtype)'/');
- mvwaddch(treescrn, 11, 3, (chtype)'/');
- mvwaddch(treescrn, 12, 2, (chtype)'/');
-
- mvwaddch(treescrn, 1, 13, (chtype)'\\');
- mvwaddch(treescrn, 2, 13, (chtype)'\\');
- mvwaddch(treescrn, 3, 14, (chtype)'\\');
- mvwaddch(treescrn, 4, 15, (chtype)'\\');
- mvwaddch(treescrn, 5, 15, (chtype)'\\');
- mvwaddch(treescrn, 6, 16, (chtype)'\\');
- mvwaddch(treescrn, 7, 17, (chtype)'\\');
- mvwaddch(treescrn, 8, 18, (chtype)'\\');
- mvwaddch(treescrn, 9, 18, (chtype)'\\');
- mvwaddch(treescrn, 10, 19, (chtype)'\\');
- mvwaddch(treescrn, 11, 21, (chtype)'\\');
- mvwaddch(treescrn, 12, 22, (chtype)'\\');
-
- mvwaddch(treescrn, 4, 10, (chtype)'_');
- mvwaddch(treescrn, 4, 14, (chtype)'_');
- mvwaddch(treescrn, 8, 7, (chtype)'_');
- mvwaddch(treescrn, 8, 17, (chtype)'_');
-
- mvwaddstr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\");
-
- mvwaddstr(treescrn, 14, 11, "| |");
- mvwaddstr(treescrn, 15, 11, "|_|");
-
- unset_color(treescrn);
- wrefresh(treescrn);
- wrefresh(w_del_msg);
-
- return( 0 );
+ set_color(treescrn, COLOR_GREEN);
+ mvwaddch(treescrn, 1, 11, (chtype) '/');
+ mvwaddch(treescrn, 2, 11, (chtype) '/');
+ mvwaddch(treescrn, 3, 10, (chtype) '/');
+ mvwaddch(treescrn, 4, 9, (chtype) '/');
+ mvwaddch(treescrn, 5, 9, (chtype) '/');
+ mvwaddch(treescrn, 6, 8, (chtype) '/');
+ mvwaddch(treescrn, 7, 7, (chtype) '/');
+ mvwaddch(treescrn, 8, 6, (chtype) '/');
+ mvwaddch(treescrn, 9, 6, (chtype) '/');
+ mvwaddch(treescrn, 10, 5, (chtype) '/');
+ mvwaddch(treescrn, 11, 3, (chtype) '/');
+ mvwaddch(treescrn, 12, 2, (chtype) '/');
+
+ mvwaddch(treescrn, 1, 13, (chtype) '\\');
+ mvwaddch(treescrn, 2, 13, (chtype) '\\');
+ mvwaddch(treescrn, 3, 14, (chtype) '\\');
+ mvwaddch(treescrn, 4, 15, (chtype) '\\');
+ mvwaddch(treescrn, 5, 15, (chtype) '\\');
+ mvwaddch(treescrn, 6, 16, (chtype) '\\');
+ mvwaddch(treescrn, 7, 17, (chtype) '\\');
+ mvwaddch(treescrn, 8, 18, (chtype) '\\');
+ mvwaddch(treescrn, 9, 18, (chtype) '\\');
+ mvwaddch(treescrn, 10, 19, (chtype) '\\');
+ mvwaddch(treescrn, 11, 21, (chtype) '\\');
+ mvwaddch(treescrn, 12, 22, (chtype) '\\');
+
+ mvwaddch(treescrn, 4, 10, (chtype) '_');
+ mvwaddch(treescrn, 4, 14, (chtype) '_');
+ mvwaddch(treescrn, 8, 7, (chtype) '_');
+ mvwaddch(treescrn, 8, 17, (chtype) '_');
+
+ mvwaddstr(treescrn, 13, 0, "//////////// \\\\\\\\\\\\\\\\\\\\\\\\");
+
+ mvwaddstr(treescrn, 14, 11, "| |");
+ mvwaddstr(treescrn, 15, 11, "|_|");
+
+ unset_color(treescrn);
+ wrefresh(treescrn);
+ wrefresh(w_del_msg);
+
+ return (0);
}
-
-static int balls(void)
+static int
+balls(void)
{
- overlay(treescrn, treescrn2);
-
- set_color(treescrn2, COLOR_BLUE);
- mvwaddch(treescrn2, 3, 9, (chtype)'@');
- mvwaddch(treescrn2, 3, 15, (chtype)'@');
- mvwaddch(treescrn2, 4, 8, (chtype)'@');
- mvwaddch(treescrn2, 4, 16, (chtype)'@');
- mvwaddch(treescrn2, 5, 7, (chtype)'@');
- mvwaddch(treescrn2, 5, 17, (chtype)'@');
- mvwaddch(treescrn2, 7, 6, (chtype)'@');
- mvwaddch(treescrn2, 7, 18, (chtype)'@');
- mvwaddch(treescrn2, 8, 5, (chtype)'@');
- mvwaddch(treescrn2, 8, 19, (chtype)'@');
- mvwaddch(treescrn2, 10, 4, (chtype)'@');
- mvwaddch(treescrn2, 10, 20, (chtype)'@');
- mvwaddch(treescrn2, 11, 2, (chtype)'@');
- mvwaddch(treescrn2, 11, 22, (chtype)'@');
- mvwaddch(treescrn2, 12, 1, (chtype)'@');
- mvwaddch(treescrn2, 12, 23, (chtype)'@');
-
- unset_color(treescrn2);
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ overlay(treescrn, treescrn2);
+
+ set_color(treescrn2, COLOR_BLUE);
+ mvwaddch(treescrn2, 3, 9, (chtype) '@');
+ mvwaddch(treescrn2, 3, 15, (chtype) '@');
+ mvwaddch(treescrn2, 4, 8, (chtype) '@');
+ mvwaddch(treescrn2, 4, 16, (chtype) '@');
+ mvwaddch(treescrn2, 5, 7, (chtype) '@');
+ mvwaddch(treescrn2, 5, 17, (chtype) '@');
+ mvwaddch(treescrn2, 7, 6, (chtype) '@');
+ mvwaddch(treescrn2, 7, 18, (chtype) '@');
+ mvwaddch(treescrn2, 8, 5, (chtype) '@');
+ mvwaddch(treescrn2, 8, 19, (chtype) '@');
+ mvwaddch(treescrn2, 10, 4, (chtype) '@');
+ mvwaddch(treescrn2, 10, 20, (chtype) '@');
+ mvwaddch(treescrn2, 11, 2, (chtype) '@');
+ mvwaddch(treescrn2, 11, 22, (chtype) '@');
+ mvwaddch(treescrn2, 12, 1, (chtype) '@');
+ mvwaddch(treescrn2, 12, 23, (chtype) '@');
+
+ unset_color(treescrn2);
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int star(void)
+static int
+star(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_YELLOW);
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_YELLOW);
- mvwaddch(treescrn2, 0, 12, (chtype)'*');
- wstandend(treescrn2);
+ mvwaddch(treescrn2, 0, 12, (chtype) '*');
+ wstandend(treescrn2);
- unset_color(treescrn2);
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ unset_color(treescrn2);
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int strng1(void)
+static int
+strng1(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_WHITE);
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_WHITE);
- mvwaddch(treescrn2, 3, 13, (chtype)'\'');
- mvwaddch(treescrn2, 3, 12, (chtype)':');
- mvwaddch(treescrn2, 3, 11, (chtype)'.');
+ mvwaddch(treescrn2, 3, 13, (chtype) '\'');
+ mvwaddch(treescrn2, 3, 12, (chtype) ':');
+ mvwaddch(treescrn2, 3, 11, (chtype) '.');
- wattroff(treescrn2, A_BOLD | A_BLINK);
- unset_color(treescrn2);
+ wattroff(treescrn2, A_BOLD | A_BLINK);
+ unset_color(treescrn2);
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int strng2(void)
+static int
+strng2(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_WHITE);
-
- mvwaddch(treescrn2, 5, 14, (chtype)'\'');
- mvwaddch(treescrn2, 5, 13, (chtype)':');
- mvwaddch(treescrn2, 5, 12, (chtype)'.');
- mvwaddch(treescrn2, 5, 11, (chtype)',');
- mvwaddch(treescrn2, 6, 10, (chtype)'\'');
- mvwaddch(treescrn2, 6, 9, (chtype)':');
-
- wattroff(treescrn2, A_BOLD | A_BLINK);
- unset_color(treescrn2);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_WHITE);
+
+ mvwaddch(treescrn2, 5, 14, (chtype) '\'');
+ mvwaddch(treescrn2, 5, 13, (chtype) ':');
+ mvwaddch(treescrn2, 5, 12, (chtype) '.');
+ mvwaddch(treescrn2, 5, 11, (chtype) ',');
+ mvwaddch(treescrn2, 6, 10, (chtype) '\'');
+ mvwaddch(treescrn2, 6, 9, (chtype) ':');
+
+ wattroff(treescrn2, A_BOLD | A_BLINK);
+ unset_color(treescrn2);
+
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int strng3(void)
+static int
+strng3(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_WHITE);
-
- mvwaddch(treescrn2, 7, 16, (chtype)'\'');
- mvwaddch(treescrn2, 7, 15, (chtype)':');
- mvwaddch(treescrn2, 7, 14, (chtype)'.');
- mvwaddch(treescrn2, 7, 13, (chtype)',');
- mvwaddch(treescrn2, 8, 12, (chtype)'\'');
- mvwaddch(treescrn2, 8, 11, (chtype)':');
- mvwaddch(treescrn2, 8, 10, (chtype)'.');
- mvwaddch(treescrn2, 8, 9, (chtype)',');
-
- wattroff(treescrn2, A_BOLD | A_BLINK);
- unset_color(treescrn2);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_WHITE);
+
+ mvwaddch(treescrn2, 7, 16, (chtype) '\'');
+ mvwaddch(treescrn2, 7, 15, (chtype) ':');
+ mvwaddch(treescrn2, 7, 14, (chtype) '.');
+ mvwaddch(treescrn2, 7, 13, (chtype) ',');
+ mvwaddch(treescrn2, 8, 12, (chtype) '\'');
+ mvwaddch(treescrn2, 8, 11, (chtype) ':');
+ mvwaddch(treescrn2, 8, 10, (chtype) '.');
+ mvwaddch(treescrn2, 8, 9, (chtype) ',');
+
+ wattroff(treescrn2, A_BOLD | A_BLINK);
+ unset_color(treescrn2);
+
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int strng4(void)
+static int
+strng4(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_WHITE);
-
- mvwaddch(treescrn2, 9, 17, (chtype)'\'');
- mvwaddch(treescrn2, 9, 16, (chtype)':');
- mvwaddch(treescrn2, 9, 15, (chtype)'.');
- mvwaddch(treescrn2, 9, 14, (chtype)',');
- mvwaddch(treescrn2, 10, 13, (chtype)'\'');
- mvwaddch(treescrn2, 10, 12, (chtype)':');
- mvwaddch(treescrn2, 10, 11, (chtype)'.');
- mvwaddch(treescrn2, 10, 10, (chtype)',');
- mvwaddch(treescrn2, 11, 9, (chtype)'\'');
- mvwaddch(treescrn2, 11, 8, (chtype)':');
- mvwaddch(treescrn2, 11, 7, (chtype)'.');
- mvwaddch(treescrn2, 11, 6, (chtype)',');
- mvwaddch(treescrn2, 12, 5, (chtype)'\'');
-
- wattroff(treescrn2, A_BOLD | A_BLINK);
- unset_color(treescrn2);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_WHITE);
+
+ mvwaddch(treescrn2, 9, 17, (chtype) '\'');
+ mvwaddch(treescrn2, 9, 16, (chtype) ':');
+ mvwaddch(treescrn2, 9, 15, (chtype) '.');
+ mvwaddch(treescrn2, 9, 14, (chtype) ',');
+ mvwaddch(treescrn2, 10, 13, (chtype) '\'');
+ mvwaddch(treescrn2, 10, 12, (chtype) ':');
+ mvwaddch(treescrn2, 10, 11, (chtype) '.');
+ mvwaddch(treescrn2, 10, 10, (chtype) ',');
+ mvwaddch(treescrn2, 11, 9, (chtype) '\'');
+ mvwaddch(treescrn2, 11, 8, (chtype) ':');
+ mvwaddch(treescrn2, 11, 7, (chtype) '.');
+ mvwaddch(treescrn2, 11, 6, (chtype) ',');
+ mvwaddch(treescrn2, 12, 5, (chtype) '\'');
+
+ wattroff(treescrn2, A_BOLD | A_BLINK);
+ unset_color(treescrn2);
+
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-static int strng5(void)
+static int
+strng5(void)
{
- wattrset(treescrn2, A_BOLD | A_BLINK);
- set_color(treescrn2, COLOR_WHITE);
-
- mvwaddch(treescrn2, 11, 19, (chtype)'\'');
- mvwaddch(treescrn2, 11, 18, (chtype)':');
- mvwaddch(treescrn2, 11, 17, (chtype)'.');
- mvwaddch(treescrn2, 11, 16, (chtype)',');
- mvwaddch(treescrn2, 12, 15, (chtype)'\'');
- mvwaddch(treescrn2, 12, 14, (chtype)':');
- mvwaddch(treescrn2, 12, 13, (chtype)'.');
- mvwaddch(treescrn2, 12, 12, (chtype)',');
-
- wattroff(treescrn2, A_BOLD | A_BLINK);
- unset_color(treescrn2);
-
- /* save a fully lit tree */
- overlay(treescrn2, treescrn);
-
- wrefresh(treescrn2);
- wrefresh(w_del_msg);
- return( 0 );
+ wattrset(treescrn2, A_BOLD | A_BLINK);
+ set_color(treescrn2, COLOR_WHITE);
+
+ mvwaddch(treescrn2, 11, 19, (chtype) '\'');
+ mvwaddch(treescrn2, 11, 18, (chtype) ':');
+ mvwaddch(treescrn2, 11, 17, (chtype) '.');
+ mvwaddch(treescrn2, 11, 16, (chtype) ',');
+ mvwaddch(treescrn2, 12, 15, (chtype) '\'');
+ mvwaddch(treescrn2, 12, 14, (chtype) ':');
+ mvwaddch(treescrn2, 12, 13, (chtype) '.');
+ mvwaddch(treescrn2, 12, 12, (chtype) ',');
+
+ wattroff(treescrn2, A_BOLD | A_BLINK);
+ unset_color(treescrn2);
+
+ /* save a fully lit tree */
+ overlay(treescrn2, treescrn);
+
+ wrefresh(treescrn2);
+ wrefresh(w_del_msg);
+ return (0);
}
-
-
-static int blinkit(void)
+static int
+blinkit(void)
{
-static int cycle;
+ static int cycle;
- if(cycle > 4) {
- cycle = 0;
- }
+ if (cycle > 4) {
+ cycle = 0;
+ }
+ touchwin(treescrn8);
- touchwin(treescrn8);
-
- switch(cycle) {
- case 0:
- overlay(treescrn3, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
- break;
- case 1:
- overlay(treescrn4, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
- break;
- case 2:
- overlay(treescrn5, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
- break;
- case 3:
- overlay(treescrn6, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
- break;
- case 4:
- overlay(treescrn7, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
- break;
- }
- touchwin(treescrn8);
+ switch (cycle) {
+ case 0:
+ overlay(treescrn3, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
+ break;
+ case 1:
+ overlay(treescrn4, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
+ break;
+ case 2:
+ overlay(treescrn5, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
+ break;
+ case 3:
+ overlay(treescrn6, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
+ break;
+ case 4:
+ overlay(treescrn7, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
+ break;
+ }
+ touchwin(treescrn8);
- /*ALL ON***************************************************/
+ /*ALL ON************************************************** */
- overlay(treescrn, treescrn8);
- wrefresh(treescrn8);
- wrefresh(w_del_msg);
+ overlay(treescrn, treescrn8);
+ wrefresh(treescrn8);
+ wrefresh(w_del_msg);
- ++cycle;
- return( 0 );
+ ++cycle;
+ return (0);
}
static void
deer_step(WINDOW *win, int y, int x)
{
- mvwin(win, y, x);
- wrefresh(win);
- wrefresh(w_del_msg);
- look_out(5);
+ mvwin(win, y, x);
+ wrefresh(win);
+ wrefresh(w_del_msg);
+ look_out(5);
}
-static int reindeer(void)
+static int
+reindeer(void)
{
- int looper;
- y_pos = 0;
-
+ int looper;
+ y_pos = 0;
- for(x_pos = 70; x_pos > 62; x_pos--) {
- if(x_pos < 62) {
+ for (x_pos = 70; x_pos > 62; x_pos--) {
+ if (x_pos < 62) {
y_pos = 1;
- }
- for(looper = 0; looper < 4; looper++) {
- mvwaddch(dotdeer0, y_pos, x_pos, (chtype)'.');
+ }
+ for (looper = 0; looper < 4; looper++) {
+ mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '.');
wrefresh(dotdeer0);
wrefresh(w_del_msg);
werase(dotdeer0);
wrefresh(dotdeer0);
wrefresh(w_del_msg);
look_out(50);
- }
}
+ }
- y_pos = 2;
+ y_pos = 2;
- for(; x_pos > 50; x_pos--) {
- for(looper = 0; looper < 4; looper++) {
+ for (; x_pos > 50; x_pos--) {
+ for (looper = 0; looper < 4; looper++) {
- if(x_pos < 56) {
- y_pos = 3;
+ if (x_pos < 56) {
+ y_pos = 3;
- mvwaddch(stardeer0, y_pos, x_pos, (chtype)'*');
- wrefresh(stardeer0);
- wrefresh(w_del_msg);
- werase(stardeer0);
- wrefresh(stardeer0);
- wrefresh(w_del_msg);
+ mvwaddch(stardeer0, y_pos, x_pos, (chtype) '*');
+ wrefresh(stardeer0);
+ wrefresh(w_del_msg);
+ werase(stardeer0);
+ wrefresh(stardeer0);
+ wrefresh(w_del_msg);
} else {
- mvwaddch(dotdeer0, y_pos, x_pos, (chtype)'*');
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
- werase(dotdeer0);
- wrefresh(dotdeer0);
- wrefresh(w_del_msg);
+ mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '*');
+ wrefresh(dotdeer0);
+ wrefresh(w_del_msg);
+ werase(dotdeer0);
+ wrefresh(dotdeer0);
+ wrefresh(w_del_msg);
}
- }
}
+ }
- x_pos = 58;
+ x_pos = 58;
- for(y_pos = 2; y_pos < 5; y_pos++) {
+ for (y_pos = 2; y_pos < 5; y_pos++) {
- touchwin(lildeer0);
- wrefresh(lildeer0);
- wrefresh(w_del_msg);
+ touchwin(lildeer0);
+ wrefresh(lildeer0);
+ wrefresh(w_del_msg);
- for(looper = 0; looper < 4; looper++) {
+ for (looper = 0; looper < 4; looper++) {
deer_step(lildeer3, y_pos, x_pos);
deer_step(lildeer2, y_pos, x_pos);
deer_step(lildeer1, y_pos, x_pos);
@@ -1057,19 +1069,18 @@ static int reindeer(void)
wrefresh(w_del_msg);
x_pos -= 2;
- }
}
+ }
+ x_pos = 35;
- x_pos = 35;
+ for (y_pos = 5; y_pos < 10; y_pos++) {
- for(y_pos = 5; y_pos < 10; y_pos++) {
-
- touchwin(middeer0);
- wrefresh(middeer0);
- wrefresh(w_del_msg);
+ touchwin(middeer0);
+ wrefresh(middeer0);
+ wrefresh(w_del_msg);
- for(looper = 0; looper < 2; looper++) {
+ for (looper = 0; looper < 2; looper++) {
deer_step(middeer3, y_pos, x_pos);
deer_step(middeer2, y_pos, x_pos);
deer_step(middeer1, y_pos, x_pos);
@@ -1081,40 +1092,40 @@ static int reindeer(void)
wrefresh(w_del_msg);
x_pos -= 3;
- }
}
+ }
- look_out(300);
+ look_out(300);
- y_pos = 1;
+ y_pos = 1;
- for(x_pos = 8; x_pos < 16; x_pos++) {
- deer_step(bigdeer4, y_pos, x_pos);
- deer_step(bigdeer3, y_pos, x_pos);
- deer_step(bigdeer2, y_pos, x_pos);
- deer_step(bigdeer1, y_pos, x_pos);
- deer_step(bigdeer2, y_pos, x_pos);
- deer_step(bigdeer3, y_pos, x_pos);
- deer_step(bigdeer4, y_pos, x_pos);
- deer_step(bigdeer0, y_pos, x_pos);
- }
+ for (x_pos = 8; x_pos < 16; x_pos++) {
+ deer_step(bigdeer4, y_pos, x_pos);
+ deer_step(bigdeer3, y_pos, x_pos);
+ deer_step(bigdeer2, y_pos, x_pos);
+ deer_step(bigdeer1, y_pos, x_pos);
+ deer_step(bigdeer2, y_pos, x_pos);
+ deer_step(bigdeer3, y_pos, x_pos);
+ deer_step(bigdeer4, y_pos, x_pos);
+ deer_step(bigdeer0, y_pos, x_pos);
+ }
- --x_pos;
+ --x_pos;
- for(looper = 0; looper < 6; looper++) {
- deer_step(lookdeer4, y_pos, x_pos);
- deer_step(lookdeer3, y_pos, x_pos);
- deer_step(lookdeer2, y_pos, x_pos);
- deer_step(lookdeer1, y_pos, x_pos);
- deer_step(lookdeer2, y_pos, x_pos);
- deer_step(lookdeer3, y_pos, x_pos);
- deer_step(lookdeer4, y_pos, x_pos);
- }
+ for (looper = 0; looper < 6; looper++) {
+ deer_step(lookdeer4, y_pos, x_pos);
+ deer_step(lookdeer3, y_pos, x_pos);
+ deer_step(lookdeer2, y_pos, x_pos);
+ deer_step(lookdeer1, y_pos, x_pos);
+ deer_step(lookdeer2, y_pos, x_pos);
+ deer_step(lookdeer3, y_pos, x_pos);
+ deer_step(lookdeer4, y_pos, x_pos);
+ }
- deer_step(lookdeer0, y_pos, x_pos);
+ deer_step(lookdeer0, y_pos, x_pos);
- for(; y_pos < 10; y_pos++) {
- for(looper = 0; looper < 2; looper++) {
+ for (; y_pos < 10; y_pos++) {
+ for (looper = 0; looper < 2; looper++) {
deer_step(bigdeer4, y_pos, x_pos);
deer_step(bigdeer3, y_pos, x_pos);
deer_step(bigdeer2, y_pos, x_pos);
@@ -1122,27 +1133,28 @@ static int reindeer(void)
deer_step(bigdeer2, y_pos, x_pos);
deer_step(bigdeer3, y_pos, x_pos);
deer_step(bigdeer4, y_pos, x_pos);
- }
- deer_step(bigdeer0, y_pos, x_pos);
}
+ deer_step(bigdeer0, y_pos, x_pos);
+ }
- --y_pos;
+ --y_pos;
- deer_step(lookdeer3, y_pos, x_pos);
- return( 0 );
+ deer_step(lookdeer3, y_pos, x_pos);
+ return (0);
}
-static RETSIGTYPE done(int sig GCC_UNUSED)
+static RETSIGTYPE
+done(int sig GCC_UNUSED)
{
- signal(SIGINT,done);
- signal(SIGTERM,done);
+ signal(SIGINT, done);
+ signal(SIGTERM, done);
#if !defined DOS && !defined OS2
- signal(SIGHUP,done);
- signal(SIGQUIT,done);
+ signal(SIGHUP, done);
+ signal(SIGQUIT, done);
#endif
- move(LINES-1,0);
- refresh();
- endwin();
- curs_set(1);
- exit(EXIT_SUCCESS);
+ move(LINES - 1, 0);
+ refresh();
+ endwin();
+ curs_set(1);
+ exit(EXIT_SUCCESS);
}