Import the most recent ncurses 5.1 prerelease (20000701).

Mostly this is intended to resolve the trace() badness once and for all.

Obtained from:  ftp://dickey.his.com/ncurses/
This commit is contained in:
Peter Wemm 2000-07-03 09:24:12 +00:00
parent 6b9085fd58
commit 15589c42fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/ncurses/dist/; revision=62449
209 changed files with 24279 additions and 15575 deletions

View File

@ -1,143 +1,127 @@
Announcing ncurses 5.0
Announcing ncurses 5.1
The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format,
supports pads and color and multiple highlights and forms characters
and function-key mapping, and has all the other SYSV-curses
enhancements over BSD curses.
In mid-June 1995, the maintainer of 4.4BSD curses declared that he
considered 4.4BSD curses obsolete, and is encouraging the keepers of
Unix releases such as BSD/OS, freeBSD and netBSD to switch over to
ncurses.
The ncurses code was developed under GNU/Linux. It should port easily
to any ANSI/POSIX-conforming UNIX. It has even been ported to OS/2
Warp!
The distribution includes the library and support utilities, including
a terminfo compiler tic(1), a decompiler infocmp(1), clear(1),
tput(1), tset(1), and a termcap conversion tool captoinfo(1). Full
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://ftp.clark.net/pub/dickey/ncurses.
available at [2]ftp://dickey.his.com/ncurses.
Release Notes
We decided to release ncurses as a new whole number release (5.0)
because it incorporates several interface changes, including some that
would invalidate existing shared libraries. These are the highlights
from the change-log since ncurses 4.2 release.
This release is designed to be upward compatible from ncurses 5.0;
very few applications will require recompilation, depending on the
platform. These are the highlights from the change-log since ncurses
5.0 release.
Interface changes:
* The principal source of changes to the interface comes from the
release of X/Open Curses in 1997. Earlier versions of ncurses (4.0
and before) were based on a draft version of the specification.
The release version adds parameters to some functions to support
the evolving internationalization of curses. These summarize the
impact:
+ modified several prototypes to correspond with 1997 version
of X/Open Curses (affects ABI since developers have used
attr_get).
+ corrected prototypes for slk_* functions, using chtype rather
than attr_t.
+ the slk_attr_{set,off,on} functions need an additional void*
parameter according to XSI.
+ correct macros for wattr_set, wattr_get, separate wattrset
macro from these to preserve behavior that allows attributes
to be combined with color pair numbers.
+ reviewed/updated curses.h, term.h against X/Open Curses Issue
4 Version 2. This includes making some parameters
NCURSES_CONST rather than const, e.g., in termcap.h.
+ reviewed/corrected macros in curses.h as per XSI document.
+ add set_a_attributes and set_pglen_inch to terminfo
structure, as per XSI and Solaris 2.5.
* The newest version of the X/Open Curses is implemented on Solaris
and other vendor's systems. It adds new features to the terminfo
descriptions:
+ implement tparm %l format.
+ implement tparm printf-style width and precision for %s, %d,
%x, %o as per XSI.
* We made additional changes to reduce impact by future interface
changes:
+ rename key_names[] array to _nc_key_names since it is not
part of the curses interface.
+ move macro winch to a function, to hide details of struct
ldat
* modify configure script to embed ABI in shared libraries for HP-UX
10.x (detailed request by Tim Mooney).
* modify configuration of shared libraries on Digital Unix so that
versioning is embedded in the library, rather than implied by
links (patch by Tim Mooney).
* made the extended terminal capabilities
(configure --enable-tcap-names) a standard feature (though the
configure script can disable it, it is built by default).
* removed the trace() function and related trace support from the
production library. This is the only interface change that may
cause problems with existing applications linked to shared
libraries, since not all platforms use the minor version number.
* explicitly initialized to zero several data items which were
implicitly initialized, e.g., cur_term. If not explicitly
initialized, their storage type is C (common), and causes problems
linking on some platforms.
* modified curses.h.in, undef'ing some symbols to avoid conflict
with C++ STL.
New features:
* enable sigwinch handler by default.
* turn on hashmap scrolling code by default
* improved support for termcap applications
+ modify tput to accept termcap names as an alternative to
terminfo names.
+ provide support for termcap PC variable by copying it from
terminfo data and using it as the padding character in tputs.
+ provide support for termcap ospeed variable by copying it
from the internal cur_term member, and using ospeed as the
baudrate reference for the delay_output and tputs functions.
+ change name-comparisons in lib_termcap to compare no more
than 2 characters.
+ add configure option --enable-tcap-names, which essentially
allows users to define new capabilities as in termcap.
* add mouse support to ncurses menus.
* add mouse and dll support for OS/2 EMX
* modify terminfo parsing to accept octal and hexadecimal constants
* add configure option --enable-no-padding, to allow environment
variable $NCURSES_NO_PADDING to eliminate non-mandatory padding,
thereby making terminal emulators (e.g., for vt100) a little more
efficient.
* modify lib_color.c to eliminate dependency on orig_colors and
orig_pair, since SVr4 curses does not require these either, but
uses them when they are available.
* add -f option to infocmp and tic, which formats the terminfo
if/then/else/endif so that they are readable (with newlines and
tabs).
* modify tic to compile into %'char' form in preference to
%{number}, since that is a little more efficient.
* added a new extension, assume_default_colors() to 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
use_default_colors().
* 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
"obsolete" termcap strings to terminfo.src
+ modified tic so that if extended names (i.e.,
configure --enable-tcap-names) are active, then tic -x will
also write "obsolete" capabilities that are present in the
terminfo source.
+ added screen's AX capability (for ECMA SGR 39 and 49) to
applicable terminfo entries, use presence of this as a check
for a small improvement in setting default colors.
+ add -a option to tic and infocmp, which retains commented-out
capabilities during source translation/comparison, e.g.,
captoinfo and infotocap.
* implemented limited support for UTF-8, useful with XFree86 xterm:
+ if the configure --enable-widec option is given, append 'w'
to names of the generated libraries (e.g., libncursesw.so) to
avoid conflict with existing ncurses libraries.
+ add a simple UTF-8 output driver to the experimental
wide-character support. If any of the environment variables
LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this
driver will be used to translate the output to UTF-8.
+ modified view.c to make a rudimentary viewer of UTF-8 text.
* modify raw() and noraw() to clear/restore IEXTEN flag which
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".
* added configure option --with-manpage-symlinks, which provides for
fully indexing manpage entries by making symbolic links for the
aliases.
* changed unctrl() to render C1 characters (128-159) as ~@, ~A, etc.
* add experimental configure option --enable-colorfgbg to check for
$COLORTERM variable as set by rxvt/aterm/Eterm.
* made the infocmp -F option less verbose.
* dropped support for gnat 3.10 (gnat 3.12 is current).
Major bug fixes:
* modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a
problem where ncurses applications which were run via a shell
script would hang when given a ^Z. Also, check if the terminal's
process group is consistent, i.e., a shell has not taken ownership
of it, before deciding to save the current terminal settings in
the SIGTSTP handler.
* suppress sc/rc capabilities from terminal description if they
appear in smcup/rmcup. This affects only scrolling optimization,
to fix a problem reported by several people with xterm's alternate
screen, though the problem is more general.
* modify relative_move and tputs to avoid an interaction with the
BSD-style padding. The relative_move function could produce a
string to replace on the screen which began with a numeric
character, which was then interpreted by tputs as padding.
* modify setupterm so that cancelled strings are treated the same as
absent strings, cancelled and absent booleans false (does not
affect tic, infocmp).
* modify lib_vidattr.c to allow for terminal types (e.g.,
xterm-color) which may reset all attributes in the 'op'
capability, so that colors are set before turning on bold and
other attributes, but still after turning attributes off.
* use 'access()' to check if ncurses library should be permitted to
open or modify files with fopen/open/link/unlink/remove calls, in
case the calling application is running in setuid mode.
* correction to doupdate, for case where terminal does not support
insert/delete character. The logic did not check that there was a
difference in alignment of changes to old/new screens before
repainting the whole non-blank portion of the line. Modified to
fall through into logic that reduces by the portion which does not
differ.
* modified infocmp -e, -E options to ensure that generated
fallback.c type for Booleans agrees with term.h
* documented a special case of incompatiblity between ncurses 4.2
and 5.0, added a section for this in INSTALL.
* corrected tests for file-descriptors in OS/2 EMX mouse support. A
negative value could be used by FD_SET, causing the select() call
to wait indefinitely.
* made 'tput flash' work properly for xterm by flushing output in
delay_output() when using napms(), and modifying xterm's terminfo
to specify no padding character. Otherwise, xterm's reported baud
rate could mislead ncurses into producing too few padding
characters.
* modified lib_addch.c to allow repeated update to the lower-right
corner, rather than displaying only the first character written
until the cursor is moved. Recent versions of SVr4 curses can
update the lower-right corner, and behave this way.
* modified echo() behavior of getch() to match Solaris curses for
carriage return and backspace (reported by Neil Zanella).
* corrected offsets used for subwindows in wresize()
* modified configure script so AC_MSG_ERROR is temporarily defined
to a warning in AC_PROG_CXX to make it recover from a missing C++
compiler without requiring user to add --without-cxx option
* corrected logic in lib_twait.c as used by lib_mouse.c for GPM
mouse support when poll() is used rather than select().
* made several fixes for buffer overflows, unchecked recursion,
improvements in performance, etc. See the NEWS file for details.
Features of Ncurses
The ncurses package is fully compatible with SVr4 (System V Release 4)
curses:
* All 257 of the SVr4 calls have been implemented (and are
@ -157,7 +141,7 @@
* The utilities have options to allow you to filter terminfo entries
for use with less capable curses/terminfo versions such as the
HP/UX and AIX ports.
The ncurses package also has many useful extensions over SVr4:
* The API is 8-bit clean and base-level conformant with the X/OPEN
curses specification, XSI curses (that is, it implements all BASE
@ -239,117 +223,125 @@
* An HTML "Introduction to Programming with NCURSES" document
provides a narrative introduction to the curses programming
interface.
State of the Package
Numerous bugs present in earlier versions have been fixed; the library
is far more reliable than it used to be. Bounds checking in many
`dangerous' entry points has been improved. The code is now type-safe
according to gcc -Wall. The library has been checked for malloc leaks
and arena corruption by the Purify memory-allocation tester.
The ncurses code has been tested with a wide variety of applications
including (versions starting with those noted):
cdk
Curses Development Kit [3]Curses Development Kit
[4]ftp://ftp.clark.net/pub/dickey/cdk.
Curses Development Kit
[3]Curses Development Kit [4]http://dickey.his.com/cdk.
ded
directory-editor [5]ftp://ftp.clark.net/pub/dickey/ded.
directory-editor
[5]http://dickey.his.com/ded.
dialog
the underlying application used in Slackware's setup, and the
basis for similar applications on GNU/Linux.
[6]http://dickey.his.com/dialog.
lynx
the character-screen WWW browser
[7]http://lynx.isc.org/release.
Midnight Commander 4.1
file manager
mutt
mail utility
[8]http://www.mutt.org.
ncftp
file-transfer utility
nvi
New vi versions 1.50 are able to use ncurses versions 1.9.7 and
later.
tin
newsreader, supporting color, MIME
[6]ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff.
[9]http://www.tin.org.
taper
tape archive utility
vh-1.6
Volks-Hypertext browser for the Jargon File
as well as some that use ncurses for the terminfo support alone:
minicom
terminal emulator
vile
vi-like-emacs [7]ftp://ftp.clark.net/pub/dickey/vile.
vi-like-emacs
[10]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 [8]Zeyd Ben-Halim and [9]Eric
S. Raymond. Ongoing work is being done by [10]Thomas Dickey and
[11]Jürgen Pfeifer. [12]Thomas Dickey acts as the maintainer for the
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
Free Software Foundation, which holds the copyright on ncurses.
Contact the current maintainers at [13]bug-ncurses@gnu.org.
Contact the current maintainers at [16]bug-ncurses@gnu.org.
To join the ncurses mailing list, please write email to
bug-ncurses-request@gnu.org containing the line:
subscribe <name>@<host.domain>
This list is open to anyone interested in helping with the development
and testing of this package.
Beta versions of ncurses and patches to the current release are made
available at [14]ftp://ftp.clark.net/pub/dickey/ncurses.
available at [17]ftp://dickey.his.com/ncurses.
Future Plans
* Extended-level XPG4 conformance, with internationalization
support.
* Ports to more systems, including DOS and Windows.
We need people to help with these projects. If you are interested in
working on them, please join the ncurses list.
Other Related Resources
The distribution includes and uses a version of the terminfo-format
terminal description file maintained by Eric Raymond.
[15]http://earthspace.net/~esr/terminfo.
[18]http://earthspace.net/~esr/terminfo.
You can find lots of information on terminal-related topics not
covered in the terminfo file at [16]Richard Shuford's archive.
covered in the terminfo file at [19]Richard Shuford's archive.
References
1. ftp://ftp.gnu.org/pub/gnu/ncurses
2. ftp://ftp.clark.net/pub/dickey/ncurses
2. ftp://dickey.his.com/ncurses
3. http://www.vexus.ca/CDK.html
4. ftp://ftp.clark.net/pub/dickey/cdk
5. ftp://ftp.clark.net/pub/dickey/ded
6. ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff
7. ftp://ftp.clark.net/pub/dickey/vile
8. mailto:zmbenhal@netcom.com
9. http://www.ccil.org/~esr/home.html
10. mailto:dickey@clark.net
11. mailto:juergen.pfeifer@gmx.net
12. mailto:dickey@clark.net
13. mailto:bug-ncurses@gnu.org
14. ftp://ftp.clark.net/pub/dickey/ncurses
15. http://earthspace.net/~esr/terminfo
16. http://www.cs.utk.edu/~shuford/terminal_index.html
4. http://dickey.his.com/cdk/cdk.html
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

View File

@ -1,7 +1,8 @@
-- $Id: INSTALL,v 1.33 1999/09/18 23:04:36 tom Exp $
-- $Id: INSTALL,v 1.36 2000/05/06 17:30:14 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
************************************************************
* READ ALL OF THIS FILE BEFORE YOU TRY TO INSTALL NCURSES. *
************************************************************
@ -40,7 +41,9 @@ If you are using anything but (a) Linux, or (b) one of the 4.4BSD-based
i386 Unixes, go read the Portability section in the TO-DO file before you
do anything else.
REQUIREMENTS:
------------
You will need the following in order to build and install ncurses under UNIX:
@ -52,7 +55,9 @@ You will need the following in order to build and install ncurses under UNIX:
Ncurses has been also built in the OS/2 EMX environment.
INSTALLATION PROCEDURE:
----------------------
1. First, decide whether you want ncurses to replace your existing library (in
which case you'll need super-user privileges) or be installed in parallel
@ -137,7 +142,7 @@ INSTALLATION PROCEDURE:
verify that ncurses functions correctly before doing an install that
may overwrite system files. Read the file test/README for details on
the test programs.
NOTE: You must have installed the terminfo database, or set the
environment variable $TERMINFO to point to a SVr4-compatible terminfo
database before running the test programs. Not all vendors' terminfo
@ -205,7 +210,7 @@ INSTALLATION PROCEDURE:
the configure script to not attempt to determine the type of 'bool'
which may be supported by C++. IF YOU USE THIS OPTION, BE ADVISED THAT
YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
7. If you're running an older Linux, you must either (a) tell Linux that the
console terminal type is `linux' or (b) make a link to or copy of the
linux entry in the appropriate place under your terminfo directory, named
@ -226,7 +231,193 @@ INSTALLATION PROCEDURE:
and you'll have to redo it. There is no need to have entries for all
possible screen sizes, ncurses will figure out the size automatically.
COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
--------------------------------------------
Because ncurses implements the X/Open Curses Specification, its interface
is fairly stable. That does not mean the interface does not change.
Changes are made to the documented interfaces when we find differences
between ncurses and X/Open or implementations which they certify (such as
Solaris). We add extensions to those interfaces to solve problems not
addressed by the original curses design, but those must not conflict with
the X/Open documentation.
Here are some of the major interface changes, and related problems which
you may encounter when building a system with different versions of
ncurses:
5.0
Interface changes:
+ implemented the wcolor_set() and slk_color() functions.
+ move macro winch to a function, to hide details of struct ldat
+ corrected prototypes for slk_* functions, using chtype rather than
attr_t.
+ the slk_attr_{set,off,on} functions need an additional void*
parameter according to XSI.
+ 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:
erase_wchar(), in_wchntr(), mvin_wchntr(). Some developers have used
attr_get().
Added extensions: keybound(), curses_version().
Terminfo database changes:
+ change translation for termcap 'rs' to terminfo 'rs2', which is
the documented equivalent, rather than 'rs1'.
The problems are subtler in recent releases.
a) This release provides users with the ability to define their own
terminal capability extensions, like termcap. To accomplish this,
we redesigned the TERMTYPE struct (in term.h). Very few
applications use this struct. They must be recompiled to work with
the 5.0 library.
a) If you use the extended terminfo names (i.e., you used configure
--enable-tcap-names), the resulting terminfo database can have some
entries which are not readable by older versions of ncurses. This
is a bug in the older versions:
+ the terminfo database stores booleans, numbers and strings in
arrays. The capabilities that are listed in the arrays are
specified by X/Open. ncurses recognizes a number of obsolete and
extended names which are stored past the end of the specified
entries.
+ a change to read_entry.c in 951001 made the library do an lseek()
call incorrectly skipping data which is already read from the
string array. This happens when the number of strings in the
terminfo data file is greater than STRCOUNT, the number of
specified and obsolete or extended strings.
+ as part of alignment with the X/Open final specification, in the
990109 patch we added two new terminfo capabilities:
set_a_attributes and set_pglen_inch). This makes the indices for
the obsolete and extended capabilities shift up by 2.
+ the last two capabilities in the obsolete/extended list are memu
and meml, which are found in most terminfo descriptions for xterm.
When trying to read this terminfo entry, the spurious lseek()
causes the library to attempt to read the final portion of the
terminfo data (the text of the string capabilities) 4 characters
past its starting point, and reads 4 characters too few. The
library rejects the data, and applications are unable to
initialize that terminal type.
FIX: remove memu and meml from the xterm description. They are
obsolete, not used by ncurses. (It appears that the feature was
added to xterm to make it more like hpterm).
This is not a problem if you do not use the -x option of tic to
create a terminfo database with extended names. Note that the
user-defined terminal capabilities are not affected by this bug,
since they are stored in a table after the older terminfo data ends,
and are invisible to the older libraries.
c) Some developers did not wish to use the C++ binding, and used the
configure --without-cxx option. This causes problems if someone
uses the ncurses library from C++ because that configure test
determines the type for C++'s bool and makes ncurses match it, since
both C++ and curses are specified to declare bool. Calling ncurses
functions with the incorrect type for bool will cause execution
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:
+ correct prototype for termattrs() as per XPG4 version 2.
+ add placeholder prototypes for color_set(), erasewchar(),
term_attrs(), wcolor_set() as per XPG4 version 2.
+ add macros getcur[xy] getbeg[xy] getpar[xy], which are defined in
SVr4 headers.
New extensions: keyok() and define_key().
Terminfo database changes:
+ corrected definition in curses.h for ACS_LANTERN, which was 'I'
rather than 'i'.
4.1 (May 15, 1997)
We added these extensions: use_default_colors(). Also added
configure option --enable-const, to support the use of const where
X/Open should have, but did not, specify.
The terminfo database content changed the representation of color for
most entries that use ANSI colors. SVr4 curses treats the setaf/setab
and setf/setb capabilities differently, interchanging the red/blue
colors in the latter.
4.0 (December 24, 1996)
We bumped to version 4.0 because the newly released dynamic loader
(ld.so.1.8.5) on Linux did not load shared libraries whose ABI and REL
versions were inconsistent. At that point, ncurses ABI was 3.4 and the
REL was 1.9.9g, so we made them consistent.
1.9.9g (December 1, 1996)
This fixed most of the problems with 1.9.9e, and made these interface
changes:
+ remove tparam(), which had been provided for compatibility with
some termcap. tparm() is standard, and does not conflict with
application's fallback for missing tparam().
+ turn off hardware echo in initscr(). This changes the sense of the
echo() function, which was initialized to echoing rather than
nonechoing (the latter is specified). There were several other
corrections to the terminal I/O settings which cause applications to
behave differently.
+ implemented several functions (such as attr_on()) which were
available only as macros.
+ corrected several typos in curses.h.in (i.e., the mvXXXX macros).
+ corrected prototypes for delay_output(),
has_color, immedok() and idcok().
+ corrected misspelled getbkgd(). Some applications used the
misspelled name.
+ added _yoffset to WINDOW. The size of WINDOW does not impact
applications, since they use only pointers to WINDOW structs.
These changes were made to the terminfo database:
+ removed boolean 'getm' which was available as an extended name.
We added these extensions: wresize(), resizeterm(), has_key() and
mcprint().
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).
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.
Some applications (such as lxdialog) were "fixed" to work with the
incorrect color scheme.
IF YOU ARE A SYSTEM INTEGRATOR:
------------------------------
Beginning with 1.9.9, the ncurses distribution includes both a tset
utility and /usr/share/tabset directory. If you are installing ncurses,
@ -297,7 +488,10 @@ IF YOU ARE A SYSTEM INTEGRATOR:
to us explaining why you don't want to, so we can work out nomenclature
that will make users' lives easier rather than harder.
RECENT XTERM VERSIONS
RECENT XTERM VERSIONS:
---------------------
The terminfo database file included with this distribution assumes you
are running an XFree86 xterm based on X11R6 (i.e., xterm-r6). The
earlier X11R5 entry (xterm-r5) is provided as well.
@ -311,7 +505,10 @@ RECENT XTERM VERSIONS
applications that assume these capabilities will produce incorrect
output on the older xterm (e.g., highlighting is not cleared).
CONFIGURING FALLBACK ENTRIES
CONFIGURING FALLBACK ENTRIES:
----------------------------
In order to support operation of ncurses programs before the terminfo
tree is accessible (that is, in single-user mode or at OS installation
time) the ncurses library can be compiled to include an array of
@ -348,7 +545,10 @@ CONFIGURING FALLBACK ENTRIES
fallbacks. A good rule of thumb for modern vt100-like entries is that
each one will cost about 2.5K of text space.
BSD CONVERSION NOTES:
--------------------
If you need to support really ancient BSD programs, you probably
want to configure with the --enable-bsdpad option. What this does
is enable code in tputs() that recognizes a numeric prefix on a
@ -441,7 +641,7 @@ USING NCURSES WITH GPM:
but the linker may not cooperate, producing mysterious errors.
A patched version of gpm is available:
ftp.clark.net:/pub/dickey/ncurses/gpm-1.10-970125.tgz
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.
@ -478,8 +678,8 @@ an offset of -11 lines.
BUGS:
Send any feedback to the ncurses mailing list at
bug-ncurses@gnu.org. To subscribe send mail to
bug-ncurses-request@gnu.org with body that reads:
bug-ncurses@gnu.org. To subscribe send mail to
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

View File

@ -4,7 +4,9 @@
./Ada95/TODO
./Ada95/gen/Makefile.in
./Ada95/gen/gen.c
./Ada95/gen/html.m4
./Ada95/gen/normal.m4
./Ada95/gen/table.m4
./Ada95/gen/terminal_interface-curses-aux.ads.m4
./Ada95/gen/terminal_interface-curses-forms-field_types.ads.m4
./Ada95/gen/terminal_interface-curses-forms-field_user_data.ads.m4
@ -17,152 +19,6 @@
./Ada95/gen/terminal_interface-curses-panels-user_data.ads.m4
./Ada95/gen/terminal_interface-curses-panels.ads.m4
./Ada95/gen/terminal_interface-curses.ads.m4
./Ada95/html/ada/files.htm
./Ada95/html/ada/files/T.htm
./Ada95/html/ada/funcs.htm
./Ada95/html/ada/funcs/A.htm
./Ada95/html/ada/funcs/C.htm
./Ada95/html/ada/funcs/E.htm
./Ada95/html/ada/funcs/F.htm
./Ada95/html/ada/funcs/G.htm
./Ada95/html/ada/funcs/I.htm
./Ada95/html/ada/funcs/L.htm
./Ada95/html/ada/funcs/M.htm
./Ada95/html/ada/funcs/N.htm
./Ada95/html/ada/funcs/P.htm
./Ada95/html/ada/funcs/R.htm
./Ada95/html/ada/funcs/S.htm
./Ada95/html/ada/funcs/T.htm
./Ada95/html/ada/funcs/U.htm
./Ada95/html/ada/funcs/V.htm
./Ada95/html/ada/index.htm
./Ada95/html/ada/main.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_types__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm
./Ada95/html/ada/terminal_interface-curses-forms__ads.htm
./Ada95/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm
./Ada95/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm
./Ada95/html/ada/terminal_interface-curses-menus__ads.htm
./Ada95/html/ada/terminal_interface-curses-mouse__ads.htm
./Ada95/html/ada/terminal_interface-curses-panels-user_data__ads.htm
./Ada95/html/ada/terminal_interface-curses-panels__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-float_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm
./Ada95/html/ada/terminal_interface-curses-text_io__ads.htm
./Ada95/html/ada/terminal_interface-curses__ads.htm
./Ada95/html/ada/terminal_interface__ads.htm
./Ada95/html/index.html
./Ada95/html/man/curs_addch.3x.html
./Ada95/html/man/curs_addchstr.3x.html
./Ada95/html/man/curs_addstr.3x.html
./Ada95/html/man/curs_attr.3x.html
./Ada95/html/man/curs_beep.3x.html
./Ada95/html/man/curs_bkgd.3x.html
./Ada95/html/man/curs_border.3x.html
./Ada95/html/man/curs_clear.3x.html
./Ada95/html/man/curs_color.3x.html
./Ada95/html/man/curs_delch.3x.html
./Ada95/html/man/curs_deleteln.3x.html
./Ada95/html/man/curs_getch.3x.html
./Ada95/html/man/curs_getstr.3x.html
./Ada95/html/man/curs_getyx.3x.html
./Ada95/html/man/curs_inch.3x.html
./Ada95/html/man/curs_inchstr.3x.html
./Ada95/html/man/curs_initscr.3x.html
./Ada95/html/man/curs_inopts.3x.html
./Ada95/html/man/curs_insch.3x.html
./Ada95/html/man/curs_insstr.3x.html
./Ada95/html/man/curs_instr.3x.html
./Ada95/html/man/curs_kernel.3x.html
./Ada95/html/man/curs_mouse.3x.html
./Ada95/html/man/curs_move.3x.html
./Ada95/html/man/curs_outopts.3x.html
./Ada95/html/man/curs_overlay.3x.html
./Ada95/html/man/curs_pad.3x.html
./Ada95/html/man/curs_print.3x.html
./Ada95/html/man/curs_printw.3x.html
./Ada95/html/man/curs_refresh.3x.html
./Ada95/html/man/curs_scanw.3x.html
./Ada95/html/man/curs_scr_dmp.3x.html
./Ada95/html/man/curs_scr_dump.3x.html
./Ada95/html/man/curs_scroll.3x.html
./Ada95/html/man/curs_slk.3x.html
./Ada95/html/man/curs_termattrs.3x.html
./Ada95/html/man/curs_termcap.3x.html
./Ada95/html/man/curs_terminfo.3x.html
./Ada95/html/man/curs_touch.3x.html
./Ada95/html/man/curs_util.3x.html
./Ada95/html/man/curs_window.3x.html
./Ada95/html/man/define_key.3x.html
./Ada95/html/man/dft_fgbg.3x.html
./Ada95/html/man/form.3x.html
./Ada95/html/man/form_cursor.3x.html
./Ada95/html/man/form_data.3x.html
./Ada95/html/man/form_driver.3x.html
./Ada95/html/man/form_field.3x.html
./Ada95/html/man/form_field_attributes.3x.html
./Ada95/html/man/form_field_buffer.3x.html
./Ada95/html/man/form_field_info.3x.html
./Ada95/html/man/form_field_just.3x.html
./Ada95/html/man/form_field_new.3x.html
./Ada95/html/man/form_field_opts.3x.html
./Ada95/html/man/form_field_userptr.3x.html
./Ada95/html/man/form_field_validation.3x.html
./Ada95/html/man/form_fieldtype.3x.html
./Ada95/html/man/form_hook.3x.html
./Ada95/html/man/form_new.3x.html
./Ada95/html/man/form_new_page.3x.html
./Ada95/html/man/form_opts.3x.html
./Ada95/html/man/form_page.3x.html
./Ada95/html/man/form_post.3x.html
./Ada95/html/man/form_requestname.3x.html
./Ada95/html/man/form_userptr.3x.html
./Ada95/html/man/form_win.3x.html
./Ada95/html/man/keyok.3x.html
./Ada95/html/man/menu.3x.html
./Ada95/html/man/menu_attribs.3x.html
./Ada95/html/man/menu_cursor.3x.html
./Ada95/html/man/menu_driver.3x.html
./Ada95/html/man/menu_format.3x.html
./Ada95/html/man/menu_hook.3x.html
./Ada95/html/man/menu_items.3x.html
./Ada95/html/man/menu_mark.3x.html
./Ada95/html/man/menu_new.3x.html
./Ada95/html/man/menu_opts.3x.html
./Ada95/html/man/menu_pattern.3x.html
./Ada95/html/man/menu_post.3x.html
./Ada95/html/man/menu_requestname.3x.html
./Ada95/html/man/menu_spacing.3x.html
./Ada95/html/man/menu_userptr.3x.html
./Ada95/html/man/menu_win.3x.html
./Ada95/html/man/mitem_current.3x.html
./Ada95/html/man/mitem_name.3x.html
./Ada95/html/man/mitem_new.3x.html
./Ada95/html/man/mitem_opts.3x.html
./Ada95/html/man/mitem_userptr.3x.html
./Ada95/html/man/mitem_value.3x.html
./Ada95/html/man/mitem_visible.3x.html
./Ada95/html/man/ncurses.3x.html
./Ada95/html/man/panel.3x.html
./Ada95/html/man/resizeterm.3x.html
./Ada95/html/man/wresize.3x.html
./Ada95/html/table.html
./Ada95/samples/Makefile.in
./Ada95/samples/README
./Ada95/samples/explain.txt
@ -270,7 +126,6 @@
./README.glibc
./TO-DO
./aclocal.m4
./announce.html
./announce.html.in
./c++/Makefile.in
./c++/NEWS
@ -302,6 +157,210 @@
./configure.in
./convert_configure.pl
./dist.mk
./doc/hackguide.doc
./doc/html/Ada95.html
./doc/html/ada/files.htm
./doc/html/ada/files/T.htm
./doc/html/ada/funcs.htm
./doc/html/ada/funcs/A.htm
./doc/html/ada/funcs/B.htm
./doc/html/ada/funcs/C.htm
./doc/html/ada/funcs/D.htm
./doc/html/ada/funcs/E.htm
./doc/html/ada/funcs/F.htm
./doc/html/ada/funcs/G.htm
./doc/html/ada/funcs/H.htm
./doc/html/ada/funcs/I.htm
./doc/html/ada/funcs/K.htm
./doc/html/ada/funcs/L.htm
./doc/html/ada/funcs/M.htm
./doc/html/ada/funcs/N.htm
./doc/html/ada/funcs/O.htm
./doc/html/ada/funcs/P.htm
./doc/html/ada/funcs/Q.htm
./doc/html/ada/funcs/R.htm
./doc/html/ada/funcs/S.htm
./doc/html/ada/funcs/T.htm
./doc/html/ada/funcs/U.htm
./doc/html/ada/funcs/V.htm
./doc/html/ada/funcs/W.htm
./doc/html/ada/index.htm
./doc/html/ada/main.htm
./doc/html/ada/table.html
./doc/html/ada/terminal_interface-curses-aux__adb.htm
./doc/html/ada/terminal_interface-curses-aux__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-alpha__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-alpha__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-alphanumeric__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration-ada__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-enumeration__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-intfield__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-intfield__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-ipv4_address__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-numeric__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-numeric__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-regexp__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-regexp__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-user-choice__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-user__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types-user__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_types__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_types__ads.htm
./doc/html/ada/terminal_interface-curses-forms-field_user_data__adb.htm
./doc/html/ada/terminal_interface-curses-forms-field_user_data__ads.htm
./doc/html/ada/terminal_interface-curses-forms-form_user_data__adb.htm
./doc/html/ada/terminal_interface-curses-forms-form_user_data__ads.htm
./doc/html/ada/terminal_interface-curses-forms__adb.htm
./doc/html/ada/terminal_interface-curses-forms__ads.htm
./doc/html/ada/terminal_interface-curses-menus-item_user_data__adb.htm
./doc/html/ada/terminal_interface-curses-menus-item_user_data__ads.htm
./doc/html/ada/terminal_interface-curses-menus-menu_user_data__adb.htm
./doc/html/ada/terminal_interface-curses-menus-menu_user_data__ads.htm
./doc/html/ada/terminal_interface-curses-menus__adb.htm
./doc/html/ada/terminal_interface-curses-menus__ads.htm
./doc/html/ada/terminal_interface-curses-mouse__adb.htm
./doc/html/ada/terminal_interface-curses-mouse__ads.htm
./doc/html/ada/terminal_interface-curses-panels-user_data__adb.htm
./doc/html/ada/terminal_interface-curses-panels-user_data__ads.htm
./doc/html/ada/terminal_interface-curses-panels__adb.htm
./doc/html/ada/terminal_interface-curses-panels__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-aux__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-aux__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-complex_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-complex_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-decimal_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-decimal_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-enumeration_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-enumeration_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-fixed_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-fixed_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-float_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-float_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-integer_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-integer_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io-modular_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io-modular_io__ads.htm
./doc/html/ada/terminal_interface-curses-text_io__adb.htm
./doc/html/ada/terminal_interface-curses-text_io__ads.htm
./doc/html/ada/terminal_interface-curses__adb.htm
./doc/html/ada/terminal_interface-curses__ads.htm
./doc/html/ada/terminal_interface__ads.htm
./doc/html/announce.html
./doc/html/hackguide.html
./doc/html/index.html
./doc/html/man/captoinfo.1m.html
./doc/html/man/clear.1.html
./doc/html/man/curs_addch.3x.html
./doc/html/man/curs_addchstr.3x.html
./doc/html/man/curs_addstr.3x.html
./doc/html/man/curs_attr.3x.html
./doc/html/man/curs_beep.3x.html
./doc/html/man/curs_bkgd.3x.html
./doc/html/man/curs_border.3x.html
./doc/html/man/curs_clear.3x.html
./doc/html/man/curs_color.3x.html
./doc/html/man/curs_delch.3x.html
./doc/html/man/curs_deleteln.3x.html
./doc/html/man/curs_extend.3x.html
./doc/html/man/curs_getch.3x.html
./doc/html/man/curs_getstr.3x.html
./doc/html/man/curs_getyx.3x.html
./doc/html/man/curs_inch.3x.html
./doc/html/man/curs_inchstr.3x.html
./doc/html/man/curs_initscr.3x.html
./doc/html/man/curs_inopts.3x.html
./doc/html/man/curs_insch.3x.html
./doc/html/man/curs_insstr.3x.html
./doc/html/man/curs_instr.3x.html
./doc/html/man/curs_kernel.3x.html
./doc/html/man/curs_mouse.3x.html
./doc/html/man/curs_move.3x.html
./doc/html/man/curs_outopts.3x.html
./doc/html/man/curs_overlay.3x.html
./doc/html/man/curs_pad.3x.html
./doc/html/man/curs_print.3x.html
./doc/html/man/curs_printw.3x.html
./doc/html/man/curs_refresh.3x.html
./doc/html/man/curs_scanw.3x.html
./doc/html/man/curs_scr_dump.3x.html
./doc/html/man/curs_scroll.3x.html
./doc/html/man/curs_slk.3x.html
./doc/html/man/curs_termattrs.3x.html
./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_util.3x.html
./doc/html/man/curs_window.3x.html
./doc/html/man/define_key.3x.html
./doc/html/man/dft_fgbg.3x.html
./doc/html/man/form.3x.html
./doc/html/man/form_cursor.3x.html
./doc/html/man/form_data.3x.html
./doc/html/man/form_driver.3x.html
./doc/html/man/form_field.3x.html
./doc/html/man/form_field_attributes.3x.html
./doc/html/man/form_field_buffer.3x.html
./doc/html/man/form_field_info.3x.html
./doc/html/man/form_field_just.3x.html
./doc/html/man/form_field_new.3x.html
./doc/html/man/form_field_opts.3x.html
./doc/html/man/form_field_userptr.3x.html
./doc/html/man/form_field_validation.3x.html
./doc/html/man/form_fieldtype.3x.html
./doc/html/man/form_hook.3x.html
./doc/html/man/form_new.3x.html
./doc/html/man/form_new_page.3x.html
./doc/html/man/form_opts.3x.html
./doc/html/man/form_page.3x.html
./doc/html/man/form_post.3x.html
./doc/html/man/form_requestname.3x.html
./doc/html/man/form_userptr.3x.html
./doc/html/man/form_win.3x.html
./doc/html/man/infocmp.1m.html
./doc/html/man/infotocap.1m.html
./doc/html/man/keybound.3x.html
./doc/html/man/keyok.3x.html
./doc/html/man/menu.3x.html
./doc/html/man/menu_attribs.3x.html
./doc/html/man/menu_cursor.3x.html
./doc/html/man/menu_driver.3x.html
./doc/html/man/menu_format.3x.html
./doc/html/man/menu_hook.3x.html
./doc/html/man/menu_items.3x.html
./doc/html/man/menu_mark.3x.html
./doc/html/man/menu_new.3x.html
./doc/html/man/menu_opts.3x.html
./doc/html/man/menu_pattern.3x.html
./doc/html/man/menu_post.3x.html
./doc/html/man/menu_requestname.3x.html
./doc/html/man/menu_spacing.3x.html
./doc/html/man/menu_userptr.3x.html
./doc/html/man/menu_win.3x.html
./doc/html/man/mitem_current.3x.html
./doc/html/man/mitem_name.3x.html
./doc/html/man/mitem_new.3x.html
./doc/html/man/mitem_opts.3x.html
./doc/html/man/mitem_userptr.3x.html
./doc/html/man/mitem_value.3x.html
./doc/html/man/mitem_visible.3x.html
./doc/html/man/ncurses.3x.html
./doc/html/man/panel.3x.html
./doc/html/man/resizeterm.3x.html
./doc/html/man/term.5.html
./doc/html/man/term.7.html
./doc/html/man/terminfo.5.html
./doc/html/man/tic.1m.html
./doc/html/man/toe.1m.html
./doc/html/man/tput.1.html
./doc/html/man/tset.1.html
./doc/html/man/wresize.3x.html
./doc/html/ncurses-intro.html
./doc/ncurses-intro.doc
./form/Makefile.in
./form/READ.ME
./form/fld_arg.c
@ -380,6 +439,7 @@
./man/curs_color.3x
./man/curs_delch.3x
./man/curs_deleteln.3x
./man/curs_extend.3x
./man/curs_getch.3x
./man/curs_getstr.3x
./man/curs_getyx.3x
@ -435,10 +495,12 @@
./man/form_userptr.3x
./man/form_win.3x
./man/infocmp.1m
./man/infotocap.1m
./man/keybound.3x
./man/keyok.3x
./man/make_sed.sh
./man/man_db.renames
./man/manlinks.sed
./man/menu.3x
./man/menu_attribs.3x
./man/menu_cursor.3x
@ -516,14 +578,11 @@
./misc/emx.src
./misc/form.def
./misc/form.ref
./misc/hackguide.doc
./misc/hackguide.html
./misc/indent.pro
./misc/makedef.cmd
./misc/makellib
./misc/menu.def
./misc/menu.ref
./misc/ncurses-intro.doc
./misc/ncurses-intro.html
./misc/ncurses.def
./misc/ncurses.ref
./misc/panel.def
@ -733,7 +792,6 @@
./progs/toe.c
./progs/tput.c
./progs/tset.c
./shlib-versions
./sysdeps/unix/sysv/linux/Makefile
./sysdeps/unix/sysv/linux/alpha/configure
./sysdeps/unix/sysv/linux/configure
@ -789,6 +847,7 @@
./test/ncurses.c
./test/ncurses_tst.hin
./test/newdemo.c
./test/railroad.c
./test/rain.c
./test/tclock.c
./test/test.priv.h

View File

@ -1,4 +1,4 @@
-- $Id: NEWS,v 1.504 1999/10/24 00:31:05 tom Exp $
-- $Id: NEWS,v 1.568 2000/07/02 01:16:51 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,510 @@ 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.
20000701 pre-release
+ change minor version to 1, i.e., ncurses 5.1
+ add experimental configure option --enable-colorfgbg to check for
$COLORTERM variable as set by rxvt/aterm/Eterm.
+ add Eterm terminfo entry (Michael Jennings <mej@valinux.com>).
+ modify manlinks.sed to pick aliases from the SYNOPSIS section, and
several manpages so manlinks.sed can find aliases for creating
symbolic links.
+ add explanation to run_tic.sh regarding extended terminal
capabilities.
+ change message format for edit_cfg.sh, since some people interpret
it as a warning.
+ correct unescaped '$' in sysv5uw7*|unix_sv* rule for CF_SHARED_OPTS
configure macro (report by Thanh Ma <Thanh.Ma@casi-rusco.com>).
+ correct logic in lib_twait.c as used by lib_mouse.c for GPM mouse
support when poll() is used rather than select() (prompted by
discussion with David Allen <DAllen24@aol.com>).
20000624 pre-release
+ modify TransformLine() to check for cells with different color pairs
that happen to render the same display colors.
+ apply $NCURSES_NO_PADDING to cost-computation in mvcur().
+ improve cost computation in PutRange() by accounting for the use
of parm_right_cursor in mvcur().
+ correct cost computation in EmitRange(), which was not using the
normalized value for cursor_address.
+ newer config.guess, config.sub (reference version used in TIN 1.5.6).
20000617
+ update config.guess, config.sub (reference version used in PCRE 3.2).
+ resync changes to gnathtml against version 1.22, regenerated html
files under doc/html/ada using this (1.22.1.1).
+ regenerated html files under doc/html/man after correcting top and
bottom margin options for man2html in dist.mk
+ minor fixes to test programs ncurses 'i' and testcurs program to make
the subwindow's background color cover the subwindow.
+ modify configure script so AC_MSG_ERROR is temporarily defined to a
warning in AC_PROG_CXX to make it recover from a missing C++ compiler
without requiring user to add --without-cxx option (from comment by
Akim Demaille <akim@epita.fr> to autoconf mailing list).
+ modify headers.sh to avoid creating temporary files in the build
directory when installing headers (reported by Sergei Pokrovsky
<pok@nbsp.nsk.su>)
20000610
+ regenerated the html files under doc/html/ada/files and
doc/html/ada/funcs with a slightly-improved gnathtml.
+ add kmous capability to linux terminfo entry to allow it to use
xterm-style events provided by gpm patch by Joerg Schoen.
+ make the configure macro CF_SHARED_OPTS a little smarter by testing
if -fPIC is supported by gcc rather than -fpic. The former option
allows larger symbol tables.
+ update config.guess and config.sub (patches by
Kevin Buettner <kev@primenet.com> for elf64_ia64
Bernd Kuemmerlen <bkuemmer@mevis.de> and MacOS X).
+ add warning for 'tic -cv' about use of '^?' in terminfo source, which
is an extension.
20000527
+ modify echo() behavior of getch() to match Solaris curses for
carriage return and backspace (reported by Neil Zanella).
+ change _nc_flush() to a function.
+ modify delscreen() to check if the output stream has been closed, and
if so, free the buffer allocated for setbuf (this provides an
ncurses-specific way to avoid a memory leak when repeatedly calling
newterm reported by Chipp C <at_1@zdnetonebox.com>).
+ correct typo in curs_getch.3x manpage regarding noecho (reported by
David Malone <dwmalone@maths.tcd.ie>).
+ add a "make libs" rule.
+ make the Ada95 interface build with configure --enable-widec.
+ if the configure --enable-widec option is given, append 'w' to names
of the generated libraries (e.g., libncursesw.so) to avoid conflict
with existing ncurses libraries.
20000520
+ modify view.c to make a rudimentary viewer of UTF-8 text if ncurses
is configured with the experimental wide-character support.
+ add a simple UTF-8 output driver to the experimental wide-character
support. If any of the environment variables LC_ALL, LC_CTYPE or
LANG contain the string "UTF-8", this driver will be used to
translate the output to UTF-8. This works with XFree86 xterm.
+ modify configure script to allow building shared libraries on BeOS
(from a patch by by Valeriy E Ushakov).
+ modify lib_addch.c to allow repeated update to the lower-right
corner, rather than displaying only the first character written until
the cursor is moved. Recent versions of SVr4 curses can update the
lower-right corner, and behave this way (reported by Neil Zanella).
+ add a limit-check in _nc_do_color(), to avoid using invalid color
pair value (from bug report by Brendan O'Dea <bod@compusol.com.au>).
20000513
+ the tack program knows how to use smcup and rmcup but the "show caps
that can be tested" feature did not reflect this knowledge. Correct
the display in the menu tack/test/edit/c (patch by Daniel Weaver).
+ xterm-16color does allow bold+colors, removed ncv#32 from that
terminfo entry.
20000506
+ correct assignment to SP->_has_sgr_39_49 in lib_dft_fgbg.c, which
broke check for screen's AX capability (reported by Valeriy E Ushakov
<uwe@ptc.spbu.ru>).
+ change man2html rule in dist.mk to workaround bug in some man-programs
that ignores locale when rendering hyphenation.
+ change web- and ftp-site to dickey.his.com
20000429
+ move _nc_curr_token from parse_entry.c to comp_scan.c, to work around
problem linking tack on MacOS X DP3.
+ include <sys/time.h> in lib_napms.c to compile on MacOS X DP3
(reported by Gerben Wierda <wierda@holmes.nl>).
+ modify lib_vidattr.c to check for ncv fixes when pair-0 is not
default colors.
+ add -d option to ncurses.c, to turn on default-colors for testing.
+ add a check to _nc_makenew() to ensure that newwin() and newpad()
calls do not silently fail by passing too-large limits.
+ add symbol NCURSES_SIZE_T to use rather than explicit 'short' for
internal window and pad sizes. Note that since this is visible in
the WINDOW struct, it would be an ABI change to make this an 'int'
(prompted by a question by Bastian Trompetter
<btrompetter@firemail.de>, who attempted to create a 96000-line pad).
20000422
+ add mgterm terminfo entry from NetBSD, minor adjustments to sun-ss5,
aixterm entries -TD
+ modify tack/ansi.c to make it more tolerant of bad ANSI replies. An
example of an illegal ANSI resonse can be found using Microsoft's
Telnet client. A correct display can be found using a VT-4xx
terminal or XFree86 xterm with:
XTerm*VT100*decTerminalID: 450
(patch by Daniel Weaver).
+ modify gdc.c to recognize 'q' for quit, 's' for single-step and ' '
for resume. Add '-n' option to force gdc's standard input to
/dev/null, to both illustrate the use of newterm() for specifying
alternate inputs as well as for testing signal handling.
+ minor fix for configure option --with-manpage-symlinks, for target
directories that contain a period ('.') (reported by Larry Virden).
20000415
+ minor additions to beterm entry (feedback from Rico Tudor) -TD
+ corrections/updates for some IBM terminfo entries -TD
+ modify _nc_screen_wrap() so that when exiting curses mode with
non-default colors, the last line on the screen will be cleared to
the screen's default colors (request by Alexander Lukyanov).
+ modify ncurses.c 'r' example to set nonl(), allowing control/M to be
read for demonstrating the REQ_NEW_LINE operation (prompted by a
question by Tony L Keith" <tlkeith@keithconsulting.com>).
+ modify ncurses.c 'r' example of field_info() to work on Solaris 2.7,
documented extension of ncurses which allows a zero pointer.
+ modify fmt_complex() to avoid buffer overflow in case of excess
recursion, and to recognize "%e%?" as a synonym for else-if, which
means that it will not recur for that special case.
+ add logic to support $TERMCAP variable in case the USE_GETCAP symbol
is defined (patch by Todd C Miller).
+ modify one of the m4 files used to generate the Ada95 sources,
to avoid using the token "symbols" (patch by Juergen Pfeifer).
20000408
+ add terminfo entries bsdos-pc-m, bsdos-pc-mono (Jeffrey C Honig)
+ correct spelling error in terminfo entry name: bq300-rv was given as
bg300-rv in esr's version.
+ modify redrawwin() macro so its parameter is fully parenthesized
(fixes Debian bug report #61088).
+ correct formatting error in dump_entry() which set incorrect column
value when no newline trimming was needed at the end of an entry,
before appending "use=" clauses (cf: 960406).
20000401
+ add configure option --with-manpage-symlinks
+ change unctrl() to render C1 characters (128-159) as ~@, ~A, etc.
+ change makefiles so trace() function is provided only if TRACE is
defined, e.g., in the debug library. Modify related calls to
_tracechar() to use unctrl() instead.
20000325
+ add screen's AX capability (for ECMA SGR 39 and 49) to applicable
terminfo entries, use presence of this as a check for a small
improvement in setting default colors.
+ improve logic in _nc_do_color() implementing assume_default_colors()
by passing in previous color pair info to eliminate redundant call to
set_original_colors(). (Part of this is from a patch by Alexander
Lukyanov).
+ modify warning in _nc_trans_string() about a possibly too-long string
to do this once only rather than for each character past the
threshold (600). Change interface of _nc_trans_string() to allow
check for buffer overflow.
+ correct use of memset in _nc_read_entry_source() to initialize ENTRY
struct each time before reading new data into it, rather than once
per loop (cf: 990301). This affects multi-entry in-core operations
such as "infocmp -Fa".
20000319
+ remove a spurious pointer increment in _nc_infotocap() changes from
20000311. Add check for '.' in format of number, since that also
is not permitted in termcap.
+ correct typo in rxvt-basic terminfo from temporary change made while
integrating 20000318.
20000318
+ revert part of the vt220 change (request by Todd C Miller).
+ add ansi-* terminfo entries from Eric's version.
+ add -a option to tic and infocmp, which retains commented-out
capabilities during source translation/comparison, e.g., captoinfo
and infotocap.
+ modify cardfile.c to display an empty card if no input data file is
found, fixes a core dump in that case (reported by Bruno Haible).
+ correct bracketing in CF_MATH_LIB configure macro, which gave wrong
result for OS/2 EMX.
+ supply required parameter for _nc_resolve_uses() call in
read_termcap.c, overlooked in 20000311 (reported by Todd C Miller).
> patches by Bruno Haible <haible@ilog.fr>:
+ fix a compiler warning in fty_enum.c
+ correct LIB_PREFIX expression for DEPS_CURSES in progs, tack
makefiles, which resulted in redundant linking (cf: 20000122).
20000311
+ make ifdef's for BROKEN_LINKER consistent (patch by Todd C Miller).
+ improved tack/README (patch by Daniel Weaver).
+ modify tput.c to ensure that unspecified parameters are passed to
tparm() as 0's.
+ add a few checks in infocmp to guard against buffer overflow when
displaying string capabilities.
+ add check for zero-uses in infocmp's file_comparison() function
before calling _nc_align_termtype(). Otherwise one parameter is
indexed past the end of the uses-array.
+ add an option -q to infocmp to specify the less verbose output,
keeping the existing format as the default, though not retaining the
previous behavior that made the -F option compare each entry to
itself.
+ adapted patch by Eric Raymond to make infocmp -F less verbose
(the submitted patch was unusable because it did not compile
properly):
+ modify write_entry.c to ensure that absent or cancelled booleans
are written as FALSE, for consistency with infocmp which now
assumes this. Note that for the small-core configuration, tic
may not produce the same result as before.
+ change some private library interfaces used by infocmp, e.g.,
_nc_resolve_uses().
+ add a check in _nc_infotocap() to ensure that cm-style capabilities
accept only %d codes when converting the format from terminfo to
termcap.
+ modify ENTRY struct to separate the data in 'parent' into the name
and link values (the original idea to merge both into 'parent' was
not good).
+ discard repair_acsc(tterm);
> patch by Juergen Pfeifer:
+ drop support for gnat 3.10
+ move generated documentation and html files under ./doc directory,
adding makefile rules for this to dist.mk
20000304
+ correct conflicting use of tparm() in 20000226 change to tic, which
made it check only one entry at a time.
+ fix errors in ncurses-intro.html and hackguide.html shown by Dave
Raggett's tidy.
+ make the example in ncurses-intro.html do something plausible, and
corrected misleading comment (reported by Neil Zanella).
+ modify pnoutrefresh() to set newscr->_leaveok as wnoutrefresh() does,
to fix a case where the cursor position was not updated as in
Solaris (patch by David Mosberger <davidm@hpl.hp.com>).
+ add a limit-check for wresize() to ensure that a subwindow does not
address out of bounds.
+ correct offsets used for subwindows in wresize() (patch by Michael
Andres <ma@suse.de>).
+ regenerate html'ized manual pages with man2html 3.0.1 (patch by
Juergen Pfeifer). This generated a file with a space in its name,
which I removed.
+ fix a few spelling errors in tack.
+ modify tack/Makefile.in to match linker options of progs/Makefile.in;
otherwise it does not build properly for older HPUX shared library
configurations.
+ add several terminfo entries from esr's "11.0".
20000226
+ make 'tput flash' work properly for xterm by flushing output in
delay_output() when using napms(), and modifying xterm's terminfo to
specify no padding character. Otherwise, xterm's reported baud rate
can mislead ncurses into producing too few padding characters
(Debian #58530).
+ add a check to tic for consistency between sgr and the separate
capabilities such as smso, use this to check/correct several
terminfo entries (Debian #58530).
+ add a check to tic if cvvis is the same as cnorm, adjusted several
terminfo entries to remove the conflict (Debian #58530).
+ correct prototype shown in attr_set()/wattr_set() manpages (fixes
Debian #53962).
+ minor clarification for curs_set() and leaveok() manpages.
+ use mkstemp() for creating temporary file for tic's processing of
$TERMCAP contents (fixes Debian #56465).
+ correct two errors from integrating Alexander's changes: did not
handle the non-bce case properly in can_erase_with() (noted by
Alexander), and left fg/bg uninitialized in the pair-zero case of
_nc_do_color() (reported by Dr Werner Fink <werner@suse.de> and
Ismael Cordeiro <ismael@cordeiro.com>).
20000219
+ store default-color code consistently as C_MASK, even if given as
-1 for convenience (adapted from patches by Alexander Lukyanov).
> patches by Alexander Lukyanov:
+ change can_clear_with() macro to accommodate logic for
assume_default_colors(), making most of the FILL_BCE logic
unnecessary. Made can_clear_with() an inline function to make it
simpler to read.
20000212
+ corrected form of recent copyright dates.
+ minor corrections to xterm-xf86-v333 terminfo entry -TD
> patches by Alexander Lukyanov:
+ reworded dft_fgbg.3x to avoid assuming that the terminal's default
colors are white on black.
+ fix initialization of tstLine so that it is filled with current blank
character in any case. Previously it was possible to have it filled
with old blank. The wrong over-optimization was introduced in 991002
patch. (it is not very critical as the only bad effect is not using
clr_eos for clearing if blank has changed).
20000205
+ minor corrections/updates to several terminfo entries: rxvt-basic,
vt520, vt525, ibm5151, xterm-xf86-v40 -TD
+ modify ifdef's for poll() to allow it to use <sys/poll.h>, thereby
allowing poll() to be used on Linux.
+ add CF_FUNC_POLL macro to check if poll() is able to select from
standard input. If not we will not use it, preferring select()
(adapted from patch by Michael Pakovic <mpakovic@fdn.com>).
+ update CF_SHARED_OPTS macro for SCO Unixware 7.1 to allow building
shared libraries (reported/tested by Thanh <thanhma@mediaone.net>).
+ override $LANGUAGE in build to avoid incorrect ordering of keynames.
+ correct CF_MATH_LIB parameter, must be sin(x), not sqrt(x).
20000122
+ resync CF_CHECK_ERRNO and CF_LIB_PREFIX macros from tin and xterm.
+ modify CF_MATH_LIB configure macro to parameterize the test function
used, for reuse in dialog and similar packages.
+ correct tests for file-descriptors in OS/2 EMX mouse support. A
negative value could be used by FD_SET, causing the select() call
to wait indefinitely.
20000115
+ additional fixes for non-bce terminals (handling of delete_character)
to work when assume_default_colors() is not specified.
+ modify warning message from _nc_parse_entry() regarding extended
capability names to print only if tic/infocmp/toe have the -v flag
set, and not at all in ordinary user applications. Otherwise, this
warning would be shown for screen's extended capabilities in programs
that use the termcap interface (reported by Todd C Miller).
+ modify use of _nc_tracing from programs such as tic so their debug
level is not in the same range as values set by trace() function.
+ small panel header cleanup (patch by Juergen Pfeifer).
+ add 'railroad' demo for termcap interface.
+ modify 'tic' to write its usage message to stderr (patch by Todd C
Miller).
20000108
+ add prototype for erase() to curses.h.in, needed to make test
programs build with c++/g++.
+ add .c.i and .c.h suffix rules to generated makefiles, for debugging.
+ correct install rule for tack.1; it assumed that file was in the
current directory (reported by Mike Castle <dalgoda@ix.netcom.com>).
+ modify terminfo/termcap translation to suppress acsc before trying
sgr if the entry would be too large (patch by Todd C Miller).
+ document a special case of incompatiblity between ncurses 4.2 and
5.0, add a section for this in INSTALL.
+ add TRACE_DATABASE flag for trace().
20000101
+ update mach, add mach-color terminfo entries based on Debian diffs
for ncurses 5.0 -TD
+ add entries for xterm-hp, xterm-vt220, xterm-vt52 and xterm-noapp
terminfo entries -TD
+ change OTrs capabilities to rs2 in terminfo.src -TD
+ add obsolete and extended capabilities to 'screen' terminfo -TD
+ corrected conversion from terminfo rs2 to termcap rs (cf: 980704)
+ make conversion to termcap ug (underline glitch) more consistently
applied.
+ fix out-of-scope use of 'personal[]' buffer in 'toe' (this error
was in the original pre-1.9.7 version, when $HOME/.terminfo was
introduced).
+ modify 'toe' to ignore terminfo directories to which it has no
permissions.
+ modify read_termtype(), fixing 'toe', which could dump core when it
found an incomplete entry such as "dumb" because it did not
initialize its buffer for _nc_read_file_entry().
+ use -fPIC rather than -fpic for shared libraries on Linux, not
needed for i386 but some ports (from Debian diffs for 5.0).
+ use explicit VALID_NUMERIC() checks in a few places that had been
overlooked, and add a check to ensure that init_tabs is nonzero,
to avoid divide-by-zero (reported by Todd C Miller).
+ minor fix for CF_ANSI_CC_CHECK configure macro, for HPUX 10.x (from
tin).
19991218
+ reorder tests during mouse initialization to allow for gpm to run in
xterm, or for xterm to be used under OS/2 EMX. Also drop test for
$DISPLAY in favor of kmous=\E[M or $TERM containing "xterm" (report
by Christian Weisgerber <naddy@mips.rhein-neckar.de>).
+ modify raw() and noraw() to clear/restore IEXTEN flag which affects
stty lnext on systems such as FreeBSD (report by Bruce Evans
<bde@zeta.org.au>, via Jason Evans <jasone@canonware.com>).
+ fix a potential (but unlikely) buffer overflow in failed() function
of tset.c (reported by Todd C Miller).
+ add manual-page for ncurses extensions, documented curses_version(),
use_extended_names().
19991211
+ treat as untranslatable to termcap those terminfo strings which
contain non-decimal formatting, e.g., hexadecimal or octal.
+ correct commented-out capabilities that cannot be translated to
termcap, which did not check if a colon must be escaped.
+ correct termcap translation for "%>" and "%+", which did not check
if a colon must be escaped, for instance.
+ use save_string/save_char for _nc_captoinfo() to eliminate fixed
buffer (originally for _nc_infotocap() in 960301 -TD).
+ correct expression used for terminfo equivalent of termcap %B,
adjust regent100 entry which uses this.
+ some cleanup and commenting of ad hoc cases in _nc_infotocap().
+ eliminate a fixed-buffer in tic, used for translating comments.
+ add manpage for infotocap
19991204
+ add kvt and gnome terminfo entries -TD
+ correct translation of "%%" by infotocap, which was emitted as "%".
+ add "obsolete" termcap strings to terminfo.src
+ modify infocmp to default to showing obsolete capabilities rather
than terminfo only.
+ modify write_entry.c so that if extended names (i.e., configure
--enable-tcap-names) are active, then tic will also write "obsolete"
capabilities that are present in the terminfo source.
+ modify tic so that when running as captoinfo or infotocap, it
initializes the output format as in -C and -I options, respectively.
+ improve infocmp and tic -f option by splitting long strings that do
not have if-then-else construct, but do have parameters, e.g., the
initc for xterm-88color.
+ refine MKtermsort.sh slightly by using bool for the *_from_termcap
arrays.
19991127
+ additional fixes for non-bce terminals (handling of clear_screen,
clr_eol, clr_eos, scrolling) to work when assume_default_colors() is
not specified.
+ several small changes to xterm terminfo entries -TD.
+ move logic for _nc_windows in lib_freeall.c inside check for nonnull
SP, since it is part of that struct.
+ remove obsolete shlib-versions, which was unintentionally re-added
in 970927.
+ modify infocmp -e, -E options to ensure that generated fallback.c
type for Booleans agrees with term.h (reported by Eric Norum
<eric@cls.usask.ca>).
+ correct configure script's use of $LIB_PREFIX, which did not work
for installing the c++ directory if $libdir did not end with "/lib"
(reported by Huy Le <huyle@ugcs.caltech.edu>).
+ modify infocmp so -L and -f options work together.
+ modify the initialization of SP->_color_table[] in start_color() so
that color_content() will return usable values for COLORS greater
than 8.
+ modify ncurses 'd' test in case COLORS is greater than 16, e.g., for
xterm-88color, to limit the displayed/computed colors to 16.
> patch by Juergen Pfeifer:
+ simplify coding of the panel library according to suggestions by
Philippe Blain.
+ improve macro coding for a few macros in curses.priv.h
19991113
+ modify treatment of color pair 0 so that if ncurses is configured
to support default colors, and they are not active, then ncurses
will set that explicitly, not relying on orig_colors or orig_pair.
+ add new extension, assume_default_colors() to provide better control
over the use of default colors.
+ modify test programs to use more-specific ifdef's for existence of
wresize(), resizeterm() and use_default_colors().
+ modify configure script to add specific ifdef's for some functions
that are included when --enable-ext-funcs is in effect, so their
existence can be ifdef'd in the test programs.
+ reorder some configure options, moving those extensions that have
evolved from experimental status into a new section.
+ change configure --enable-tcap-names to enable this by default.
19991106
+ install tack's manpage (reported by Robert Weiner
<robert@progplus.com>)
+ correct worm.c's handling of KEY_RESIZE (patch by Frank Heckenbach).
+ modify curses.h.in, undef'ing some symbols to avoid conflict with C++
STL (reported by Matt Gerassimoff <mgeras@ticon.net>)
19991030
+ modify linux terminfo entry to indicate that dim does not mix with
color (reported by Klaus Weide <kweide@enteract.com>).
+ correct several typos in terminfo entries related to missing '['
in CSI's -TD
+ fix several compiler warnings in c++ binding (reported by Tim
Mooney for alphaev56-dec-osf4.0f
+ rename parameter of _nc_free_entries() to accommodate lint.
+ correct lint rule for tack, used incorrect list of source files.
+ add case to config.guess, config.sub for Rhapsody.
+ improve configure tests for libg++ and libstdc++ by omitting the
math library (which is missing on Rhapsody), and improved test for
the math library itself (adapted from path by Nelson H. F. Beebe).
+ explicitly initialize to zero several data items which were
implicitly initialized, e.g., cur_term. If not explicitly
initialized, their storage type is C (common), and causes problems
linking on Rhapsody 5.5 using gcc 2.7.2.1 (reported by Nelson H. F.
Beebe).
+ modify Ada95 binding to not include the linker option for Ada
bindings in the Ada headers, but in the Makefiles instead (patch by
Juergen Pfeifer).
19991023 5.0 release for upload to ftp.gnu.org
+ effective with release of 5.0, change NCURSES_VERSION_PATCH to
4-digit year.
@ -349,7 +853,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
+ split up an expression in configure script check for ldconfig to
workaround limitation of BSD/OS sh (reported by Jeff Haas
<jmh@mail.msen.com>).
+ correct a typo in man/form_hook.3x (Todd Miller).
+ correct a typo in man/form_hook.3x (Todd C Miller).
990318 pre-release
+ parenthesize and undef 'index' symbol in c++ binding and demo, to
@ -515,7 +1019,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
bsdos-bold to bsdos-pc (patch by Jeffrey C Honig).
+ modify tput to accept termcap names as an alternative to terminfo
names (patch by Jeffrey C Honig).
+ correct a typo in term.7 (Todd Miller).
+ correct a typo in term.7 (Todd C Miller).
+ add configure --with-shlib-version option to allow installing shared
libraries named according to release or ABI versions. This
parameterizes some existing logic in the configure script, and is
@ -737,7 +1241,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
rid of a hardcoded list of candidate directories in the configure
script.
+ add some error-checking to _nc_read_file_entry() to ensure that
strings are properly terminated (Todd Miller).
strings are properly terminated (Todd C Miller).
+ rename manpage file curs_scr_dmp.3x to curs_scr_dump.3x, to
correspond with contents (reported by Neil Zanella
<nzanella@cs.mun.ca>).
@ -767,7 +1271,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
tic, infocmp).
+ modify tic, infocmp to discard redundant i3, r3 strings when output
to termcap format.
> patch by Alexander V Lukyanov:
> patch by Alexander V Lukyanov:
+ improve performance of tparm, now it takes 19% instead of 25% when
profiling worm.
+ rename maxlen/minlen to prec/width for better readability.
@ -792,7 +1296,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
string #define (compile time vs runtime).
+ when setting errno to ENOMEM, set it right before the return, not
before code that could, possibly, set errno to a different value.
> patches by Alexander V Lukyanov:
> patches by Alexander V Lukyanov:
+ use default background in update_cost_from_blank()
+ disable scroll-hints when hashmap is configured.
+ improve integration of hashmap scrolling code, by adding oldhash and
@ -827,12 +1331,12 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
manpage (patch by Rick Ohnemus <rick@ecompcon.com>).
+ add Makefile.os2 and supporting scripts to generate dll's on OS/2 EMX
(from J.J.G.Ripoll, with further integration by TD).
+ correct a typo in icl6404 terminfo entry.
+ add xtermm and xtermc terminfo entries.
+ correct a typo in icl6404 terminfo entry.
+ add xtermm and xtermc terminfo entries.
> from esr's terminfo version:
+ Added Francesco Potorti's tuned Wyse 99 entries.
+ dtterm enacs correction from Alexander V Lukyanov.
+ Add ncsa-ns, ncsa-m-ns and ncsa-m entries from esr version.
+ Added Francesco Potorti's tuned Wyse 99 entries.
+ dtterm enacs correction from Alexander V Lukyanov.
+ Add ncsa-ns, ncsa-m-ns and ncsa-m entries from esr version.
980822
+ document AT&T acs characters in terminfo.5 manpage.
@ -1147,7 +1651,7 @@ Changes since 1.9.9e are recorded by Thomas Dickey.
+ the slk_attr_{set,off,on} functions need an additional void*
parameter according to XSI.
+ fix the C++ and Ada95 binding as well as the man pages to
reflect above enhancements.
reflect above enhancements.
980307
+ use 'stat()' rather than 'access()' in toe.c to check for the

View File

@ -1,4 +1,4 @@
-- $Id: README.emx,v 1.1 1998/11/21 20:13:05 tom Exp $
-- $Id: README.emx,v 1.2 2000/05/06 17:41:56 tom Exp $
-- Author: Thomas Dickey <dickey@clark.net>
-------------------------------------------------------------------------------
@ -16,16 +16,16 @@ the EMX development tools, of course. Get these programs to start:
Apply the autoconf patches from
http://www.clark.net/pub/dickey/autoconf
ftp://ftp.clark.net/pub/dickey/autoconf
http://dickey.his.com/autoconf
ftp://dickey.his.com/autoconf
These are ordered by date:
autoconf-2.12-970309.patch
autoconf-2.12-970429.patch
autoconf-2.12-971222-emx.patch
autoconf-2.12-971222.patch
autoconf-2.12-971230.patch
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
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,

View File

@ -1,5 +1,5 @@
dnl***************************************************************************
dnl Copyright (c) 1998,1999 Free Software Foundation, Inc. *
dnl Copyright (c) 1998-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,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997,1998
dnl
dnl $Id: aclocal.m4,v 1.179 1999/10/23 21:49:25 tom Exp $
dnl $Id: aclocal.m4,v 1.206 2000/07/01 20:37:36 tom Exp $
dnl Macros used in NCURSES auto-configuration script.
dnl
dnl ---------------------------------------------------------------------------
@ -74,7 +74,7 @@ for cf_arg in "-DCC_HAS_PROTOS" \
"" \
-qlanglvl=ansi \
-std1 \
"-Aa -D_HPUX_SOURCE +e" \
-Ae \
"-Aa -D_HPUX_SOURCE" \
-Xc
do
@ -303,7 +303,7 @@ AC_DEFUN([CF_CHECK_ERRNO],
AC_MSG_CHECKING(if external $1 is declared)
AC_CACHE_VAL(cf_cv_dcl_$1,[
AC_TRY_COMPILE([
#if HAVE_STDLIB_H
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdio.h>
@ -311,7 +311,7 @@ AC_CACHE_VAL(cf_cv_dcl_$1,[
#include <errno.h> ],
[long x = (long) $1],
[eval 'cf_cv_dcl_'$1'=yes'],
[eval 'cf_cv_dcl_'$1'=no]')
[eval 'cf_cv_dcl_'$1'=no'])
])
eval 'cf_result=$cf_cv_dcl_'$1
@ -463,6 +463,33 @@ int main() {
fi
])])dnl
dnl ---------------------------------------------------------------------------
dnl See if the poll function really works. Some platforms have poll(), but
dnl it does not work for terminals or files.
AC_DEFUN([CF_FUNC_POLL],[
AC_CACHE_CHECK(if poll really works,cf_cv_working_poll,[
AC_TRY_RUN([
#include <stdio.h>
#ifdef HAVE_POLL_H
#include <poll.h>
#else
#include <sys/poll.h>
#endif
int main() {
struct pollfd myfds;
int ret;
myfds.fd = 0;
myfds.events = POLLIN;
ret = poll(&myfds, 1, 100);
exit(ret != 0);
}],
[cf_cv_working_poll=yes],
[cf_cv_working_poll=no],
[cf_cv_working_poll=unknown])])
test "$cf_cv_working_poll" = "yes" && AC_DEFINE(HAVE_WORKING_POLL)
])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.
@ -619,10 +646,10 @@ changequote(<<, >>)dnl
cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
sed -e 's/[^0-9 \.]//g' | $AWK '{print $<<1>>;}'`
case $cf_cv_gnat_version in
3.[1-9]*|[4-9].*)
3.1[1-9]*|3.[2-9]*|[4-9].*)
cf_cv_prog_gnat_correct=yes
;;
*) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.10 or better. Disabling Ada95 binding.
*) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
cf_cv_prog_gnat_correct=no
;;
esac
@ -655,14 +682,13 @@ esac
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 -lm"
LIBS="$LIBS -l$cf_gpp_libname"
AC_TRY_LINK([
#include <$cf_gpp_libname/builtin.h>
],
[//float foo=abs(1.0);
two_arg_error_handler_t foo2 = lib_error_handler],
[two_arg_error_handler_t foo2 = lib_error_handler],
[cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm"
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
if test "$cf_gpp_libname" = cpp ; then
AC_DEFINE(HAVE_GPP_BUILTIN_H)
else
@ -671,10 +697,9 @@ if test $ac_cv_prog_gxx = yes; then
[AC_TRY_LINK([
#include <builtin.h>
],
[//float foo=abs(1.0);
two_arg_error_handler_t foo2 = lib_error_handler],
[two_arg_error_handler_t foo2 = lib_error_handler],
[cf_cxx_library=yes
CXXLIBS="$CXXLIBS -l$cf_gpp_libname -lm"
CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
AC_DEFINE(HAVE_BUILTIN_H)],
[cf_cxx_library=no])])
LIBS="$cf_save"
@ -729,10 +754,10 @@ dnl $1 = variable to set
AC_DEFUN([CF_LIB_PREFIX],
[
case $cf_cv_system_name in
os2) $1='' ;;
*) $1='lib' ;;
os2) LIB_PREFIX='' ;;
*) LIB_PREFIX='lib' ;;
esac
LIB_PREFIX=[$]$1
ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
@ -807,6 +832,7 @@ do
do
$AWK -f $srcdir/mk-1st.awk \
name=$cf_dir \
traces=$LIB_TRACING \
MODEL=$CF_ITEM \
model=$cf_subdir \
prefix=$cf_prefix \
@ -822,6 +848,7 @@ do
test $cf_dir = ncurses && WITH_OVERWRITE=no
$AWK -f $srcdir/mk-2nd.awk \
name=$cf_dir \
traces=$LIB_TRACING \
MODEL=$CF_ITEM \
model=$cf_subdir \
subset=$cf_subset \
@ -840,6 +867,7 @@ do
if test -f $cf_dir/Makefile ; then
case "$cf_dir" in
Ada95) #(vi
echo 'libs \' >> Makefile
echo 'install.libs \' >> Makefile
echo 'uninstall.libs ::' >> Makefile
echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) [$]@' >> Makefile
@ -859,6 +887,7 @@ if test "$cf_dir" != "c++" ; then
echo 'lint \' >> Makefile
fi
cat >> Makefile <<CF_EOF
libs \\
lintlib \\
install.libs \\
uninstall.libs \\
@ -869,6 +898,7 @@ CF_EOF
elif test -f $srcdir/$cf_dir/headers; then
cat >> Makefile <<CF_EOF
libs \\
install.libs \\
uninstall.libs \\
install.includes \\
@ -921,19 +951,18 @@ SRC=\[$]3
echo installing \$SRC in \$DST
case \$DST in
/*/include/*)
TMP=\${TMPDIR-/tmp}/\`basename \$SRC\`
if test ! -f ../headers.sed ; then
END=\`basename \$DST\`
for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
do
NAME=\`basename \$i\`
echo "s/<\$NAME>/<\$END\/\$NAME>/" >> ../headers.sed
done
fi
rm -f \$TMP
sed -f ../headers.sed \$SRC > \$TMP
eval \$PRG \$TMP \$DST
rm -f \$TMP
TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
END=\`basename \$DST\`
for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
do
NAME=\`basename \$i\`
echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
done
rm -f \$TMPSRC
sed -f \$TMPSED \$SRC > \$TMPSRC
eval \$PRG \$TMPSRC \$DST/\$SRC
rm -f \$TMPSRC \$TMPSED
;;
*)
eval \$PRG \$SRC \$DST
@ -984,9 +1013,10 @@ done
])dnl
dnl ---------------------------------------------------------------------------
dnl Compute the library-suffix from the given model name
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
dnl $2 = variable to set
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
AC_REQUIRE([CF_SUBST_NCURSES_VERSION])
@ -1009,9 +1039,13 @@ AC_DEFUN([CF_LIB_SUFFIX],
*) $2='.so' ;;
esac
esac
test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
])dnl
dnl ---------------------------------------------------------------------------
dnl Compute the string to append to -library from the given model name
dnl $1 = model name
dnl $2 = variable to set
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_TYPE],
[
case $1 in
@ -1020,6 +1054,7 @@ AC_DEFUN([CF_LIB_TYPE],
profile) $2='_p' ;;
shared) $2='' ;;
esac
test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
])dnl
dnl ---------------------------------------------------------------------------
dnl Some systems have a non-ANSI linker that doesn't pull in modules that have
@ -1267,6 +1302,21 @@ fi
AC_MSG_RESULT($cf_manpage_renames)
])dnl
dnl ---------------------------------------------------------------------------
dnl Some people expect each tool to make all aliases for manpages in the
dnl man-directory. This accommodates the older, less-capable implementations
dnl of 'man', and is optional.
AC_DEFUN([CF_MANPAGE_SYMLINKS],
[
AC_MSG_CHECKING(for manpage symlinks)
AC_ARG_WITH(manpage-symlinks,
[ --with-manpage-symlinks specify manpage-symlinks],
[cf_manpage_symlinks=$withval],
[cf_manpage_symlinks=yes])
AC_MSG_RESULT($cf_manpage_symlinks)
])dnl
dnl ---------------------------------------------------------------------------
dnl Try to determine if the man-pages on the system are compressed, and if
dnl so, what format is used. Use this information to construct a script that
dnl will install man-pages.
@ -1275,6 +1325,7 @@ AC_DEFUN([CF_MAN_PAGES],
CF_HELP_MESSAGE(Options to Specify How Manpages are Installed:)
CF_MANPAGE_FORMAT
CF_MANPAGE_RENAMES
CF_MANPAGE_SYMLINKS
if test "$prefix" = "NONE" ; then
cf_prefix="$ac_default_prefix"
@ -1303,6 +1354,7 @@ 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
@ -1312,6 +1364,9 @@ shift
mandir=\{{$}}1
shift
srcdir=\{{$}}1
shift
for i in \{{$}}* ; do
case \$i in #(vi
*.orig|*.rej) ;; #(vi
@ -1322,8 +1377,14 @@ case \$i in #(vi
\$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
@ -1378,20 +1439,75 @@ 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
changequote([,])dnl
chmod 755 man/edit_man.sh
])dnl
dnl ---------------------------------------------------------------------------
dnl Checks for libraries. At least one UNIX system, Apple Macintosh
dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
dnl AC_CHECK_LIB(m,sin), because that fails for C++.
AC_DEFUN([CF_MATH_LIB],
[
AC_CACHE_CHECK(if -lm needed for math functions,
cf_cv_need_libm,[
AC_TRY_LINK([
#include <stdio.h>
#include <math.h>
],
[double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)],
[cf_cv_need_libm=no],
[cf_cv_need_libm=yes])])
if test "$cf_cv_need_libm" = yes
then
ifelse($1,,[
LIBS="$LIBS -lm"
],[$1=-lm])
fi
])
dnl ---------------------------------------------------------------------------
dnl Compute the object-directory name from the given model name
AC_DEFUN([CF_OBJ_SUBDIR],
[
@ -1411,6 +1527,8 @@ AC_DEFUN([CF_PATH_SYNTAX],[
case ".[$]$1" in #(vi
./*) #(vi
;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
.\[$]{*prefix}*) #(vi
eval $1="[$]$1"
case ".[$]$1" in #(vi
@ -1545,11 +1663,28 @@ AC_DEFUN([CF_SHARED_OPTS],
cf_cv_rm_so_locs=no
# Some less-capable ports of gcc support only -fpic
CC_SHARED_OPTS=
if test -n "$GCC"
then
AC_MSG_CHECKING(which $CC option to use)
cf_save_CFLAGS="$CFLAGS"
for CC_SHARED_OPTS in -fPIC -fpic ''
do
CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
done
AC_MSG_RESULT($CC_SHARED_OPTS)
CFLAGS="$cf_save_CFLAGS"
fi
case $cf_cv_system_name in
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
CC_SHARED_OPTS='-fPIC'
LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
else
CC_SHARED_OPTS='+Z'
@ -1564,7 +1699,6 @@ AC_DEFUN([CF_SHARED_OPTS],
hpux*)
# (tested with gcc 2.7.2 -- I don't have c89)
if test -n "$GCC"; then
CC_SHARED_OPTS='-fPIC'
LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
else
CC_SHARED_OPTS='+Z'
@ -1577,9 +1711,7 @@ AC_DEFUN([CF_SHARED_OPTS],
;;
irix*)
# tested with IRIX 5.2 and 'cc'.
if test -n "$GCC"; then
CC_SHARED_OPTS='-fPIC'
else
if test -z "$GCC"; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $[@]` -o $[@]'
@ -1587,7 +1719,6 @@ AC_DEFUN([CF_SHARED_OPTS],
;;
linux*|gnu*)
# tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
CC_SHARED_OPTS='-fpic'
test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
if test $DFT_LWR_MODEL = "shared" ; then
LOCAL_LDFLAGS='-Wl,-rpath,../lib'
@ -1601,16 +1732,16 @@ AC_DEFUN([CF_SHARED_OPTS],
fi
;;
openbsd2*)
CC_SHARED_OPTS='-fpic -DPIC'
CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC'
MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $[@].$(ABI_VERSION)` -o $[@]'
;;
openbsd*|freebsd*)
CC_SHARED_OPTS='-fpic -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
;;
netbsd*)
CC_SHARED_OPTS='-fpic -DPIC'
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'
@ -1626,7 +1757,6 @@ AC_DEFUN([CF_SHARED_OPTS],
# tested with OSF/1 V3.2 and 'cc'
# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
# link with shared libs).
CC_SHARED_OPTS=''
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
@ -1643,9 +1773,7 @@ AC_DEFUN([CF_SHARED_OPTS],
;;
sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
# tested with osr5.0.5
if test $ac_cv_prog_gcc = yes; then
CC_SHARED_OPTS='-fpic'
else
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 [$]@'
@ -1659,9 +1787,7 @@ AC_DEFUN([CF_SHARED_OPTS],
;;
sunos4*)
# tested with SunOS 4.1.1 and gcc 2.7.0
if test $ac_cv_prog_gcc = yes; then
CC_SHARED_OPTS='-fpic'
else
if test $ac_cv_prog_gcc != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -assert pure-text -o $[@]'
@ -1669,9 +1795,7 @@ AC_DEFUN([CF_SHARED_OPTS],
;;
solaris2*)
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
if test $ac_cv_prog_gcc = yes; then
CC_SHARED_OPTS='-fpic'
else
if test $ac_cv_prog_gcc != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -dy -G -h `basename $[@].$(ABI_VERSION)` -o $[@]'
@ -1681,10 +1805,12 @@ AC_DEFUN([CF_SHARED_OPTS],
fi
test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel
;;
unix_sv*)
# tested with UnixWare 1.1.2
CC_SHARED_OPTS='-KPIC'
MK_SHARED_LIB='$(LD) -d y -G -o $[@]'
sysv5uw7*|unix_sv*)
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
if test $ac_cv_prog_gcc != yes; then
CC_SHARED_OPTS='-KPIC'
fi
MK_SHARED_LIB='$(LD) -d y -G -o [$]@'
;;
*)
CC_SHARED_OPTS='unknown'
@ -1833,7 +1959,7 @@ AC_DEFUN([CF_SRC_MODULES],
AC_MSG_CHECKING(for src modules)
# dependencies and linker-arguments for test-programs
TEST_DEPS="${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
# dependencies and linker-arguments for utility-programs
@ -1868,7 +1994,7 @@ do
CF_UPPER(cf_have_include,$cf_dir)
AC_DEFINE_UNQUOTED(HAVE_${cf_have_include}_H)
AC_DEFINE_UNQUOTED(HAVE_LIB${cf_have_include})
TEST_DEPS="${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
fi
fi
@ -1890,7 +2016,7 @@ SRC_SUBDIRS="$SRC_SUBDIRS misc test"
test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
ADA_SUBDIRS=
if test "$cf_cv_prog_gnat_correct" = yes && test -d $srcdir/Ada95; then
if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
ADA_SUBDIRS="gen src samples"
fi
@ -1924,12 +2050,11 @@ os2*) #(vi
esac
AC_CACHE_CHECK(for library $cf_stdcpp_libname,cf_cv_libstdcpp,[
cf_save="$LIBS"
LIBS="$LIBS -l$cf_stdcpp_libname -lm"
LIBS="$LIBS -l$cf_stdcpp_libname"
AC_TRY_LINK([
#include <strstream.h>],[
char buf[80];
strstreambuf foo(buf, sizeof(buf))
//destroy foo
],
[cf_cv_libstdcpp=yes],
[cf_cv_libstdcpp=no])

View File

@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
$Id: announce.html.in,v 1.34 1999/10/23 20:52:29 tom Exp $
$Id: announce.html.in,v 1.37 2000/07/02 01:48:54 tom Exp $
-->
<HTML>
<HEAD>
@ -34,152 +34,132 @@ 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
<A HREF="ftp://ftp.clark.net/pub/dickey/ncurses">ftp://ftp.clark.net/pub/dickey/ncurses</A>.
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H1>Release Notes</H1>
We decided to release ncurses as a new whole number release (5.0) because it
incorporates several interface changes, including some that would invalidate
existing shared libraries. These are the highlights from the change-log
since ncurses 4.2 release.
This release is designed to be upward compatible from ncurses 5.0; very few
applications will require recompilation, depending on the platform.
These are the highlights from the change-log since ncurses 5.0 release.
<p>
Interface changes:
<ul>
<li>The principal source of changes to the interface comes from the
release of X/Open Curses in 1997. Earlier versions of ncurses (4.0
and before) were based on a draft version of the specification. The
release version adds parameters to some functions to support the
evolving internationalization of curses. These summarize the impact:
<ul>
<li>modified several prototypes to correspond with 1997 version of
X/Open Curses (affects ABI since developers have used attr_get).
<li>made the extended terminal capabilities
(<code>configure&nbsp;--enable-tcap-names</code>)
a standard feature (though the configure script can disable it,
it is built by default).
<li>corrected prototypes for slk_* functions, using chtype rather than
attr_t.
<li>removed the <code>trace()</code> function and related trace support
from the production library. This is the only interface change that
may cause problems with existing applications linked to shared
libraries, since not all platforms use the minor version number.
<li>the slk_attr_{set,off,on} functions need an additional void*
parameter according to XSI.
<li>explicitly initialized to zero several data items which were
implicitly initialized, e.g., cur_term. If not explicitly
initialized, their storage type is C (common), and causes problems
linking on some platforms.
<li>correct macros for wattr_set, wattr_get, separate wattrset macro from
these to preserve behavior that allows attributes to be combined with
color pair numbers.
<li>reviewed/updated curses.h, term.h against X/Open Curses Issue 4
Version 2. This includes making some parameters NCURSES_CONST
rather than const, e.g., in termcap.h.
<li>reviewed/corrected macros in curses.h as per XSI document.
<li>add set_a_attributes and set_pglen_inch to terminfo structure, as per
XSI and Solaris 2.5.
</ul>
<li>The newest version of the X/Open Curses is implemented on Solaris
and other vendor's systems. It adds new features to the terminfo
descriptions:
<ul>
<li>implement tparm %l format.
<li>implement tparm printf-style width and precision for %s, %d, %x, %o
as per XSI.
</ul>
<li>We made additional changes to reduce impact by future interface
changes:
<ul>
<li>rename key_names[] array to _nc_key_names since it is not part of
the curses interface.
<li>move macro winch to a function, to hide details of struct ldat
</ul>
<li>modify configure script to embed ABI in shared libraries for HP-UX
10.x (detailed request by Tim Mooney).
<li>modify configuration of shared libraries on Digital Unix so that
versioning is embedded in the library, rather than implied by
links (patch by Tim Mooney).
<li>modified curses.h.in, undef'ing some symbols to avoid conflict with
C++ STL.
</ul>
New features:
<ul>
<li>enable sigwinch handler by default.
<li>added a new extension, <code>assume_default_colors()</code> to
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>.
<li>turn on hashmap scrolling code by default
<li>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 <code>use_extended_names()</code> by
adding "obsolete" termcap strings to terminfo.src
<ul>
<li>modified <code>tic</code> so that if extended names (i.e.,
configure&nbsp;--enable-tcap-names) are active, then <code>tic&nbsp;-x</code>
will also write "obsolete" capabilities that are present in the
terminfo source.
<li>improved support for termcap applications
<ul>
<li>modify tput to accept termcap names as an alternative to terminfo
names.
<li>added screen's AX capability (for ECMA SGR 39 and 49) to applicable
terminfo entries, use presence of this as a check for a small
improvement in setting default colors.
<li>provide support for termcap PC variable by copying it from terminfo
data and using it as the padding character in tputs.
<li>add -a option to tic and infocmp, which retains commented-out
capabilities during source translation/comparison, e.g., captoinfo
and infotocap.
</ul>
<li>provide support for termcap ospeed variable by copying it from the
internal cur_term member, and using ospeed as the baudrate
reference for the delay_output and tputs functions.
<li>implemented limited support for UTF-8, useful with XFree86 xterm:
<ul>
<li>if the <code>configure&nbsp;--enable-widec</code> option is
given, append 'w' to names of the generated libraries (e.g.,
libncursesw.so) to avoid conflict with existing ncurses libraries.
<li>add a simple UTF-8 output driver to the experimental
wide-character support. If any of the environment variables
LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this driver
will be used to translate the output to UTF-8.
<li>modified view.c to make a rudimentary viewer of UTF-8 text.
</ul>
<li>change name-comparisons in lib_termcap to compare no more than 2
characters.
<li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
IEXTEN flag which affects stty lnext on systems such as FreeBSD
<li>add configure option --enable-tcap-names, which essentially
allows users to define new capabilities as in termcap.
</ul>
<li>add mouse support to ncurses menus.
<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>add mouse and dll support for OS/2 EMX
<li>added configure option <code>--with-manpage-symlinks</code>, which
provides for fully indexing manpage entries by making symbolic links
for the aliases.
<li>modify terminfo parsing to accept octal and hexadecimal constants
<li>changed <code>unctrl()</code> to render C1 characters (128-159) as
<code>~@</code>, <code>~A</code>, etc.
<li>add configure option --enable-no-padding, to allow environment
variable $NCURSES_NO_PADDING to eliminate non-mandatory padding,
thereby making terminal emulators (e.g., for vt100) a little more
efficient.
<li>add experimental configure option --enable-colorfgbg to check for
$COLORTERM variable as set by rxvt/aterm/Eterm.
<li>modify lib_color.c to eliminate dependency on orig_colors and
orig_pair, since SVr4 curses does not require these either, but
uses them when they are available.
<li>made the <code>infocmp -F</code> option less verbose.
<li>add -f option to infocmp and tic, which formats the terminfo
if/then/else/endif so that they are readable (with newlines and
tabs).
<li>dropped support for gnat 3.10 (gnat 3.12 is current).
<li>modify tic to compile into %'char' form in preference to %{number},
since that is a little more efficient.
</ul>
Major bug fixes:
<ul>
<li>modify lib_tstp.c to block SIGTTOU when handling SIGTSTP, fixes a
problem where ncurses applications which were run via a shell script
would hang when given a ^Z. Also, check if the terminal's process
group is consistent, i.e., a shell has not taken ownership of it,
before deciding to save the current terminal settings in the SIGTSTP
handler.
<li>modified infocmp -e, -E options to ensure that generated fallback.c
type for Booleans agrees with term.h
<li>suppress sc/rc capabilities from terminal description if they appear
in smcup/rmcup. This affects only scrolling optimization, to fix a
problem reported by several people with xterm's alternate screen,
though the problem is more general.
<li>documented a special case of incompatiblity between ncurses 4.2 and
5.0, added a section for this in INSTALL.
<li>modify relative_move and tputs to avoid an interaction with the
BSD-style padding. The relative_move function could produce a string
to replace on the screen which began with a numeric character, which
was then interpreted by tputs as padding.
<li>corrected tests for file-descriptors in OS/2 EMX mouse support. A
negative value could be used by FD_SET, causing the select() call to
wait indefinitely.
<li>modify setupterm so that cancelled strings are treated the same as
absent strings, cancelled and absent booleans false (does not affect
tic, infocmp).
<li>made 'tput flash' work properly for xterm by flushing output in
delay_output() when using napms(), and modifying xterm's terminfo to
specify no padding character. Otherwise, xterm's reported baud rate
could mislead ncurses into producing too few padding characters.
<li>modify lib_vidattr.c to allow for terminal types (e.g., xterm-color)
which may reset all attributes in the 'op' capability, so that colors
are set before turning on bold and other attributes, but still after
turning attributes off.
<li>modified lib_addch.c to allow repeated update to the lower-right
corner, rather than displaying only the first character written until
the cursor is moved. Recent versions of SVr4 curses can update the
lower-right corner, and behave this way.
<li>use 'access()' to check if ncurses library should be permitted to
open or modify files with fopen/open/link/unlink/remove calls, in
case the calling application is running in setuid mode.
<li>modified echo() behavior of getch() to match Solaris curses for
carriage return and backspace (reported by Neil Zanella).
<li>correction to doupdate, for case where terminal does not support
insert/delete character. The logic did not check that there was a
difference in alignment of changes to old/new screens before
repainting the whole non-blank portion of the line. Modified to fall
through into logic that reduces by the portion which does not differ.
<li>corrected offsets used for subwindows in <code>wresize()</code>
<li>modified configure script so AC_MSG_ERROR is temporarily defined to
a warning in AC_PROG_CXX to make it recover from a missing C++
compiler without requiring user to add --without-cxx option
<li>corrected logic in lib_twait.c as used by lib_mouse.c for GPM mouse
support when poll() is used rather than select().
<li>made several fixes for buffer overflows, unchecked recursion,
improvements in performance, etc. See the NEWS file for details.
</ul>
<H1>Features of Ncurses</H1>
@ -294,27 +274,36 @@ including (versions starting with those noted):
<DL>
<DT> cdk
<DD> Curses Development Kit
<br>
<A HREF="http://www.vexus.ca/CDK.html">Curses Development Kit</a>
<A HREF="ftp://ftp.clark.net/pub/dickey/cdk">ftp://ftp.clark.net/pub/dickey/cdk</A>.
<A HREF="http://dickey.his.com/cdk/cdk.html">http://dickey.his.com/cdk</A>.
<DT> ded
<DD> directory-editor
<A HREF="ftp://ftp.clark.net/pub/dickey/ded">ftp://ftp.clark.net/pub/dickey/ded</A>.
<br>
<A HREF="http://dickey.his.com/ded/ded.html">http://dickey.his.com/ded</A>.
<DT> dialog
<DD> the underlying application used in Slackware's setup, and the basis
for similar applications on GNU/Linux.
<br>
<A HREF="http://dickey.his.com/dialog/dialog.html">http://dickey.his.com/dialog</A>.
<DT> lynx
<DD> the character-screen WWW browser
<br>
<A HREF="http://lynx.isc.org/release/">http://lynx.isc.org/release</A>.
<DT> Midnight Commander 4.1
<DD> file manager
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org">http://www.mutt.org</A>.
<DT> ncftp
<DD> file-transfer utility
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
<DT> tin
<DD> newsreader, supporting color, MIME
<A HREF="ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff">ftp://ftp.akk.uni-karlsruhe.de/pub/news/clients/tin-unoff</A>.
<br>
<A HREF="http://www.tin.org">http://www.tin.org</A>.
<DT> taper
<DD> tape archive utility
<DT> vh-1.6
@ -326,7 +315,8 @@ as well as some that use ncurses for the terminfo support alone:
<DD> terminal emulator
<DT> vile
<DD> vi-like-emacs
<A HREF="ftp://ftp.clark.net/pub/dickey/vile">ftp://ftp.clark.net/pub/dickey/vile</A>.
<br>
<A HREF="http://dickey.his.com/vile/vile.html">http://dickey.his.com/vile</A>.
</DL>
<P>
@ -339,10 +329,10 @@ The original developers of ncurses are <A
HREF="mailto:zmbenhal@netcom.com">Zeyd Ben-Halim</A> and
<A HREF="http://www.ccil.org/~esr/home.html">Eric S. Raymond</A>.
Ongoing work is being done by
<A HREF="mailto:dickey@clark.net">Thomas Dickey</A>
<A HREF="mailto:dickey@herndon4.his.com">Thomas Dickey</A>
and
<A HREF="mailto:juergen.pfeifer@gmx.net">J&uuml;rgen Pfeifer</A>.
<A HREF="mailto:dickey@clark.net">Thomas Dickey</A>
<A HREF="mailto:dickey@herndon4.his.com">Thomas Dickey</A>
acts as the maintainer for the Free Software Foundation, which holds the
copyright on ncurses.
Contact the current maintainers at
@ -359,7 +349,7 @@ This list is open to anyone interested in helping with the development and
testing of this package.<P>
Beta versions of ncurses and patches to the current release are made available at
<A HREF="ftp://ftp.clark.net/pub/dickey/ncurses">ftp://ftp.clark.net/pub/dickey/ncurses</A>.
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H2>Future Plans</H2>
<UL>

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.51 1999/10/23 20:13:02 tom Exp $
# $Id: Makefile.in,v 1.52 2000/05/28 01:44:34 tom Exp $
##############################################################################
# Copyright (c) 1998,1999 Free Software Foundation, Inc. #
# #
@ -76,7 +76,7 @@ ABI_VERSION = @cf_cv_abi_version@
LINK = @LINK_PROGS@ $(CXX) @CXXLDFLAGS@
LIBROOT = ncurses++
LIBROOT = ncurses++@LIB_SUFFIX@
LIBNAME = @LIB_PREFIX@$(LIBROOT).a
LDFLAGS = @EXTRA_LDFLAGS@ -L../lib -L$(libdir) \
@ -94,7 +94,10 @@ LDFLAGS_DEFAULT = $(LDFLAGS_@DFT_UPR_MODEL@)
AUTO_SRC = \
etip.h
all: $(AUTO_SRC) ../lib/$(LIBNAME) demo$x
all \
libs :: $(AUTO_SRC) ../lib/$(LIBNAME)
all :: demo$x
sources : $(AUTO_SRC)

View File

@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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,7 +34,7 @@
#include "cursesapp.h"
#include "internal.h"
MODULE_ID("$Id: cursesapp.cc,v 1.4 1999/05/16 17:31:11 juergen Exp $")
MODULE_ID("$Id: cursesapp.cc,v 1.6 1999/10/30 23:59:37 tom Exp $")
void
NCursesApplication::init(bool bColors) {
@ -85,7 +85,7 @@ int NCursesApplication::rinit(NCursesWindow& w) {
void NCursesApplication::push(Soft_Label_Key_Set& S) {
SLK_Link* L = new SLK_Link;
assert(L);
assert(L != 0);
L->prev = slk_stack;
L->SLKs = &S;
slk_stack = L;
@ -121,7 +121,7 @@ int NCursesApplication::operator()(void) {
Soft_Label_Key_Set::Label_Layout fmt = useSLKs();
if (fmt!=Soft_Label_Key_Set::None) {
S = new Soft_Label_Key_Set(fmt);
assert(S);
assert(S != 0);
init_labels(*S);
}

View File

@ -35,7 +35,7 @@
#include "cursesapp.h"
#include "internal.h"
MODULE_ID("$Id: cursesf.cc,v 1.9 1999/05/16 17:29:36 juergen Exp $")
MODULE_ID("$Id: cursesf.cc,v 1.10 1999/10/30 23:49:28 tom Exp $")
NCursesFormField::~NCursesFormField () {
if (field)
@ -49,7 +49,7 @@ FIELD**
NCursesForm::mapFields(NCursesFormField* nfields[]) {
int fieldCount = 0,lcv;
assert(nfields);
assert(nfields != 0);
for (lcv=0; nfields[lcv]->field; ++lcv)
++fieldCount;
@ -350,18 +350,18 @@ NCursesForm::virtualize(int c) {
//
bool UserDefinedFieldType::fcheck(FIELD *f, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F);
assert(F != 0);
UserDefinedFieldType* udf = (UserDefinedFieldType*)(F->fieldtype());
assert(udf);
assert(udf != 0);
return udf->field_check(*F);
}
bool UserDefinedFieldType::ccheck(int c, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F);
assert(F != 0);
UserDefinedFieldType* udf =
(UserDefinedFieldType*)(F->fieldtype());
assert(udf);
assert(udf != 0);
return udf->char_check(c);
}
@ -379,19 +379,19 @@ FIELDTYPE* UserDefinedFieldType_With_Choice::generic_fieldtype_with_choice =
bool UserDefinedFieldType_With_Choice::next_choice(FIELD *f, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F);
assert(F != 0);
UserDefinedFieldType_With_Choice* udf =
(UserDefinedFieldType_With_Choice*)(F->fieldtype());
assert(udf);
assert(udf != 0);
return udf->next(*F);
}
bool UserDefinedFieldType_With_Choice::prev_choice(FIELD *f, const void *u) {
NCursesFormField* F = (NCursesFormField*)u;
assert(F);
assert(F != 0);
UserDefinedFieldType_With_Choice* udf =
(UserDefinedFieldType_With_Choice*)(F->fieldtype());
assert(udf);
assert(udf != 0);
return udf->previous(*F);
}

View File

@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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,7 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
// $Id: cursesf.h,v 1.10 1999/05/16 17:31:42 juergen Exp $
// $Id: cursesf.h,v 1.11 1999/10/30 23:59:37 tom Exp $
#ifndef _CURSESF_H
#define _CURSESF_H
@ -310,7 +310,7 @@ class NCursesForm : public NCursesPanel {
// Get the backward pointer to the C++ object from a FORM
static inline NCursesForm* getHook(const FORM *f) {
UserHook* hook = (UserHook*)::form_userptr(f);
assert(hook && hook->m_owner==f);
assert(hook != 0 && hook->m_owner==f);
return (NCursesForm*)(hook->m_back);
}
@ -329,13 +329,13 @@ class NCursesForm : public NCursesPanel {
// internal routines
inline void set_user(void *user) {
UserHook* uptr = (UserHook*)::form_userptr (form);
assert (uptr && uptr->m_back==this && uptr->m_owner==form);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
uptr->m_user = user;
}
inline void *get_user() {
UserHook* uptr = (UserHook*)::form_userptr (form);
assert (uptr && uptr->m_back==this && uptr->m_owner==form);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==form);
return uptr->m_user;
}

View File

@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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 *
@ -35,7 +35,7 @@
#include "cursesapp.h"
#include "internal.h"
MODULE_ID("$Id: cursesm.cc,v 1.11 1999/07/31 09:45:23 juergen Exp $")
MODULE_ID("$Id: cursesm.cc,v 1.12 1999/10/30 23:59:37 tom Exp $")
NCursesMenuItem::~NCursesMenuItem() {
if (item)
@ -304,7 +304,7 @@ NCursesMenu::operator()(void) {
if (drvCmnd == CMD_ACTION) {
if (options() & O_ONEVALUE) {
NCursesMenuItem* itm = current_item();
assert(itm);
assert(itm != 0);
if (itm->options() & O_SELECTABLE)
{
b_action = itm->action();

View File

@ -1,6 +1,6 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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,7 @@
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
// $Id: cursesm.h,v 1.12 1999/05/16 17:30:27 juergen Exp $
// $Id: cursesm.h,v 1.13 1999/10/30 23:59:37 tom Exp $
#ifndef _CURSESM_H
#define _CURSESM_H
@ -137,10 +137,10 @@ typedef bool ITEMCALLBACK(NCursesMenuItem&);
// function pointer for items.
class NCursesMenuCallbackItem : public NCursesMenuItem {
private:
const ITEMCALLBACK* p_fct;
ITEMCALLBACK* p_fct;
public:
NCursesMenuCallbackItem(const ITEMCALLBACK* fct = NULL,
NCursesMenuCallbackItem(ITEMCALLBACK* fct = NULL,
const char* p_name = NULL,
const char* p_descript = NULL )
: NCursesMenuItem (p_name, p_descript),
@ -179,7 +179,7 @@ class NCursesMenu : public NCursesPanel {
// Get the backward pointer to the C++ object from a MENU
static inline NCursesMenu* getHook(const MENU *m) {
UserHook* hook = (UserHook*)::menu_userptr(m);
assert(hook && hook->m_owner==m);
assert(hook != 0 && hook->m_owner==m);
return (NCursesMenu*)(hook->m_back);
}
@ -198,13 +198,13 @@ class NCursesMenu : public NCursesPanel {
// internal routines
inline void set_user(void *user) {
UserHook* uptr = (UserHook*)::menu_userptr (menu);
assert (uptr && uptr->m_back==this && uptr->m_owner==menu);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
uptr->m_user = user;
}
inline void *get_user() {
UserHook* uptr = (UserHook*)::menu_userptr (menu);
assert (uptr && uptr->m_back==this && uptr->m_owner==menu);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==menu);
return uptr->m_user;
}

View File

@ -1,6 +1,6 @@
// * this is for making emacs happy: -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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,7 +34,7 @@
#include "cursesp.h"
#include "internal.h"
MODULE_ID("$Id: cursesp.cc,v 1.14 1999/05/16 17:30:51 juergen Exp $")
MODULE_ID("$Id: cursesp.cc,v 1.15 1999/10/30 23:59:37 tom Exp $")
NCursesPanel* NCursesPanel::dummy = (NCursesPanel*)0;
@ -52,7 +52,7 @@ void NCursesPanel::init() {
NCursesPanel::~NCursesPanel() {
UserHook* hook = (UserHook*)::panel_userptr(p);
assert(hook && hook->m_back==this && hook->m_owner==p);
assert(hook != 0 && hook->m_back==this && hook->m_owner==p);
delete hook;
::del_panel(p);
::update_panels();

View File

@ -1,8 +1,40 @@
// * This makes emacs happy -*-Mode: C++;-*-
/****************************************************************************
* Copyright (c) 1998,1999 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: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1997 *
****************************************************************************/
#ifndef _CURSESP_H
#define _CURSESP_H
// $Id: cursesp.h,v 1.11 1999/07/31 09:46:05 juergen Exp $
// $Id: cursesp.h,v 1.12 1999/10/31 00:00:02 tom Exp $
#include <cursesw.h>
@ -29,14 +61,14 @@ class NCursesPanel : public NCursesWindow {
protected:
void set_user(void *user) {
UserHook* uptr = (UserHook*)::panel_userptr (p);
assert (uptr && uptr->m_back==this && uptr->m_owner==p);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p);
uptr->m_user = user;
}
// Set the user pointer of the panel.
void *get_user() {
UserHook* uptr = (UserHook*)::panel_userptr (p);
assert (uptr && uptr->m_back==this && uptr->m_owner==p);
assert (uptr != 0 && uptr->m_back==this && uptr->m_owner==p);
return uptr->m_user;
}

View File

@ -25,7 +25,7 @@
#include "cursesw.h"
#include "internal.h"
MODULE_ID("$Id: cursesw.cc,v 1.15 1999/09/11 23:26:29 tom Exp $")
MODULE_ID("$Id: cursesw.cc,v 1.16 1999/11/13 23:42:17 tom Exp $")
#define COLORS_NEED_INITIALIZATION -1
#define COLORS_NOT_INITIALIZED 0
@ -424,9 +424,11 @@ NCursesWindow::setcolor(short pair)
return OK;
}
#ifdef HAVE_HAS_KEY
extern "C" int _nc_has_mouse(void);
bool NCursesWindow::has_mouse() const {
return ((::has_key(KEY_MOUSE) || ::_nc_has_mouse())
? TRUE : FALSE);
}
#endif

View File

@ -1,7 +1,7 @@
#!/bin/sh
# $Id: edit_cfg.sh,v 1.7 1999/09/12 02:00:14 tom Exp $
# $Id: edit_cfg.sh,v 1.8 2000/07/01 16:07:37 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,6 +36,7 @@
# $1 = ncurses_cfg.h
# $2 = etip.h
#
echo "substituting autoconf'd values from $1 into $2"
for name in \
CPP_HAS_PARAM_INIT \
ETIP_NEEDS_MATH_EXCEPTION \
@ -49,16 +50,18 @@ do
mv $2 $2.bak
if ( grep "[ ]$name[ ]1" $1 2>&1 >/dev/null)
then
sed -e 's/define '$name'.*$/ define '$name' 1/' $2.bak >$2
value=1
sed -e 's/define '$name'.*$/define '$name' 1/' $2.bak >$2
else
sed -e 's/define '$name'.*$/ define '$name' 0/' $2.bak >$2
value=0
sed -e 's/define '$name'.*$/define '$name' 0/' $2.bak >$2
fi
if (cmp -s $2 $2.bak)
then
echo '** same: '$name
echo '... '$name $value
mv $2.bak $2
else
echo '** edit: '$name
echo '... '$name $value
rm -f $2.bak
fi
done

View File

@ -1,7 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
version='2000-06-13'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@ -22,7 +25,7 @@
# the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# The master version of this file is at the FSF in /home/gd/gnu/lib.
# Please send patches to <config-patches@gnu.org>.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@ -35,6 +38,60 @@
# (but try to keep the structure clean).
#
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of this system.
Operation modes:
-h, --help print this help, then exit
-V, --version print version number, then exit"
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case "$1" in
--version | --vers* | -V )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$help"
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
# Use $HOST_CC if defined. $CC may point to a cross-compiler
if test x"$CC_FOR_BUILD" = x; then
if test x"$HOST_CC" != x; then
CC_FOR_BUILD="$HOST_CC"
else
if test x"$CC" != x; then
CC_FOR_BUILD="$CC"
else
CC_FOR_BUILD=cc
fi
fi
fi
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
@ -46,11 +103,49 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
dummy=dummy-$$
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
*:NetBSD:*:*)
# Netbsd (nbsd) targets should (where applicable) match one or
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
# Determine the machine/vendor (is the vendor relevant).
case "${UNAME_MACHINE}" in
amiga) machine=m68k-cbm ;;
arm32) machine=arm-unknown ;;
atari*) machine=m68k-atari ;;
sun3*) machine=m68k-sun ;;
mac68k) machine=m68k-apple ;;
macppc) machine=powerpc-apple ;;
hp3[0-9][05]) machine=m68k-hp ;;
ibmrt|romp-ibm) machine=romp-ibm ;;
*) machine=${UNAME_MACHINE}-unknown ;;
esac
# The Operating System including object format.
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
# The OS release
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@ -59,46 +154,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
cat <<EOF >dummy.s
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
${CC-cc} dummy.s -o dummy 2>/dev/null
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
15)
1-0)
UNAME_MACHINE="alphaev5"
;;
14)
1-1)
UNAME_MACHINE="alphaev56"
;;
10)
1-101)
UNAME_MACHINE="alphapca56"
;;
16)
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
fi
rm -f dummy.s dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
@ -106,9 +217,6 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-cbm-sysv4
exit 0;;
amiga:NetBSD:*:*)
echo m68k-cbm-netbsd${UNAME_RELEASE}
exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@ -133,16 +241,16 @@ EOF
wgrisc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
arm32:NetBSD:*:*)
echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit 0;;
Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*)
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
@ -150,7 +258,7 @@ EOF
echo pyramid-pyramid-bsd
fi
exit 0 ;;
NILE:*:*:dcosx)
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
sun4H:SunOS:5.*:*)
@ -195,21 +303,38 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
atari*:NetBSD:*:*)
echo m68k-atari-netbsd${UNAME_RELEASE}
exit 0 ;;
atari*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
sun3*:NetBSD:*:*)
echo m68k-sun-netbsd${UNAME_RELEASE}
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
exit 0 ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
exit 0 ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
exit 0 ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
sun3*:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:NetBSD:*:*)
echo m68k-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
mac68k:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@ -222,9 +347,6 @@ EOF
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
macppc:NetBSD:*:*)
echo powerpc-apple-netbsd${UNAME_RELEASE}
exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit 0 ;;
@ -238,8 +360,13 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
sed 's/^ //' << EOF >dummy.c
int main (argc, argv) int argc; char **argv; {
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@ -254,10 +381,10 @@ EOF
exit (-1);
}
EOF
${CC-cc} dummy.c -o dummy \
&& ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy \
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
&& rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
@ -275,15 +402,18 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-o ${TARGET_BINARY_INTERFACE}x = x ] ; then
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
then
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
[ ${TARGET_BINARY_INTERFACE}x = x ]
then
echo m88k-dg-dgux${UNAME_RELEASE}
else
else
echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
else echo i586-dg-dgux${UNAME_RELEASE}
fi
exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
@ -307,13 +437,9 @@ EOF
i?86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:MVS:*:* | *:OS390:*:*|*:OS/390:*:*)
# uname -m gives a processor model number /* S/390 -- gil -- 1389 */
echo s390-ibm-os390 # on R1 and R2, uname -s reports OS390
exit 0 ;; # on R3, uname -s reports OS/390
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
sed 's/^ //' << EOF >dummy.c
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
main()
@ -324,8 +450,8 @@ EOF
exit(0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
@ -353,7 +479,7 @@ EOF
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
exit 0 ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
@ -372,8 +498,10 @@ EOF
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[13679] | 9000/892 )
sed 's/^ //' << EOF >dummy.c
9000/[678][0-9][0-9])
sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
@ -404,14 +532,14 @@ EOF
exit (0);
}
EOF
(${CC-cc} dummy.c -o dummy 2>/dev/null ) && HP_ARCH=`./dummy`
rm -f dummy.c dummy
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
rm -f $dummy.c $dummy
esac
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
sed 's/^ //' << EOF >dummy.c
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
main ()
@ -436,8 +564,8 @@ EOF
exit (0);
}
EOF
${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
echo unknown-hitachi-hiuxwe2
exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
@ -446,6 +574,9 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
*9??*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
exit 0 ;;
@ -462,6 +593,9 @@ EOF
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit 0 ;;
hppa*:OpenBSD:*:*)
echo hppa-unknown-openbsd
exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
@ -492,37 +626,40 @@ EOF
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE}
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*T3E:*:*:*)
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
F300:UNIX_System_V:*:*)
FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
F301:UNIX_System_V:*:*)
echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
exit 0 ;;
*:NetBSD:*:*)
echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
@ -532,6 +669,15 @@ EOF
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i386-pc-interix
exit 0 ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
exit 0 ;;
@ -541,16 +687,15 @@ EOF
*:GNU:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
*:Linux:*:*)
# uname on the ARM produces all sorts of strangeness, and we need to
# filter it out.
case "$UNAME_MACHINE" in
arm* | sa110*) UNAME_MACHINE="arm" ;;
esac
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
ld_help_string=`cd /; ld --help 2>&1`
ld_supported_emulations=`echo $ld_help_string \
| sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
@ -558,68 +703,146 @@ EOF
s/ .*//
p'`
case "$ld_supported_emulations" in
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
*ia64)
echo "${UNAME_MACHINE}-unknown-linux"
exit 0
;;
i?86linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit 0
;;
elf_i?86)
echo "${UNAME_MACHINE}-pc-linux"
exit 0
;;
i?86coff)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
exit 0
;;
sparclinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
armlinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32arm*)
echo "${UNAME_MACHINE}-unknown-linux-gnuoldld"
exit 0
;;
armelf_linux*)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
exit 0
;;
m68klinux)
echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
exit 0
;;
elf32ppc | elf32ppclinux)
# Determine Lib Version
cat >$dummy.c <<EOF
#include <features.h>
#if defined(__GLIBC__)
extern char __libc_version[];
extern char __libc_release[];
#endif
main(argc, argv)
int argc;
char *argv[];
{
#if defined(__GLIBC__)
printf("%s %s\n", __libc_version, __libc_release);
#else
printf("unkown\n");
#endif
return 0;
}
EOF
LIBC=""
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./$dummy | grep 1\.99 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f $dummy.c $dummy
echo powerpc-unknown-linux-gnu${LIBC}
exit 0
;;
shelf_linux)
echo "${UNAME_MACHINE}-unknown-linux-gnu"
exit 0
;;
esac
if test "${UNAME_MACHINE}" = "alpha" ; then
sed 's/^ //' <<EOF >dummy.s
.globl main
.ent main
main:
.frame \$30,0,\$26,0
.prologue 0
.long 0x47e03d80 # implver $0
lda \$2,259
.long 0x47e20c21 # amask $2,$1
srl \$1,8,\$2
sll \$2,2,\$2
sll \$0,3,\$0
addl \$1,\$0,\$0
addl \$2,\$0,\$0
ret \$31,(\$26),1
.end main
cat <<EOF >$dummy.s
.data
\$Lformat:
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
.text
.globl main
.align 4
.ent main
main:
.frame \$30,16,\$26,0
ldgp \$29,0(\$27)
.prologue 1
.long 0x47e03d80 # implver \$0
lda \$2,-1
.long 0x47e20c21 # amask \$2,\$1
lda \$16,\$Lformat
mov \$0,\$17
not \$1,\$18
jsr \$26,printf
ldgp \$29,0(\$26)
mov 0,\$16
jsr \$26,exit
.end main
EOF
LIBC=""
${CC-cc} dummy.s -o dummy 2>/dev/null
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
./dummy
case "$?" in
7)
case `./$dummy` in
0-0)
UNAME_MACHINE="alpha"
;;
15)
1-0)
UNAME_MACHINE="alphaev5"
;;
14)
1-1)
UNAME_MACHINE="alphaev56"
;;
10)
1-101)
UNAME_MACHINE="alphapca56"
;;
16)
2-303)
UNAME_MACHINE="alphaev6"
;;
2-307)
UNAME_MACHINE="alphaev67"
;;
esac
objdump --private-headers dummy | \
objdump --private-headers $dummy | \
grep ld.so.1 > /dev/null
if test "$?" = 0 ; then
LIBC="libc1"
fi
fi
rm -f dummy.s dummy
rm -f $dummy.s $dummy
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
elif test "${UNAME_MACHINE}" = "mips" ; then
cat >dummy.c <<EOF
main(argc, argv)
int argc;
char *argv[];
{
cat >$dummy.c <<EOF
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __MIPSEB__
printf ("%s-unknown-linux-gnu\n", argv[1]);
#endif
@ -629,8 +852,10 @@ main(argc, argv)
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
elif test "${UNAME_MACHINE}" = "s390"; then
echo s390-ibm-linux && exit 0
else
# Either a pre-BFD a.out linker (linux-gnuoldld)
# or one that does not give us useful --help.
@ -649,15 +874,17 @@ EOF
;;
esac
# Determine whether the default compiler is a.out or elf
cat >dummy.c <<EOF
cat >$dummy.c <<EOF
#include <features.h>
main(argc, argv)
int argc;
char *argv[];
{
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#ifdef __ELF__
# ifdef __GLIBC__
# if (__GLIBC__ >= 2)
# if __GLIBC__ >= 2
printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
# else
printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
@ -671,8 +898,8 @@ main(argc, argv)
return 0;
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
fi ;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
@ -687,25 +914,21 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
# SysVr5/Unixware7
i?86:*:5*:* | i?86:SYSTEM_V:5*:*)
if uname -a | grep SCO >/dev/null 2>/dev/null ; then
(/bin/uname -s|egrep UnixWare >/dev/null) && UNAME_VER=uw${UNAME_VERSION}
if /bin/uname -X 2>/dev/null >/dev/null ; then
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
fi
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}${UNAME_VER}
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
else
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
exit 0 ;;
i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo ${UNAME_MACHINE}-univel-sysv4.2uw${UNAME_VERSION}
i?86:*:5:7*)
# Fixed at (any) Pentium or better
UNAME_MACHINE=i586
if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
exit 0 ;;
i?86:*:3.2:*)
@ -717,19 +940,20 @@ EOF
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
i?86:UnixWare:*:*)
if /bin/uname -X 2>/dev/null >/dev/null ; then
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
fi
echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION}
i?86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i386.
echo i386-pc-msdosdjgpp
@ -770,7 +994,7 @@ EOF
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
i?86:LynxOS:2.*:*)
i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@ -782,6 +1006,9 @@ EOF
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
exit 0 ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit 0 ;;
@ -812,7 +1039,7 @@ EOF
news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
exit 0 ;;
R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*)
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
@ -828,12 +1055,45 @@ EOF
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit 0 ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit 0 ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
exit 0 ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
*:Darwin:*:*)
echo `uname -p`-apple-darwin${UNAME_RELEASE}
exit 0 ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
if test "${UNAME_MACHINE}" = "x86pc"; then
UNAME_MACHINE=pc
fi
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
exit 0 ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
NSR-W:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit 0 ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
cat >dummy.c <<EOF
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@ -871,7 +1131,10 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
if (version < 4)
printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
else
printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@ -931,8 +1194,8 @@ main ()
}
EOF
${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
rm -f dummy.c dummy
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
rm -f $dummy.c $dummy
# Apollos put the system type in the environment.
@ -964,6 +1227,47 @@ then
esac
fi
#echo '(Unable to guess system type)' 1>&2
cat >&2 <<EOF
$0: unable to guess system type
The $version version of this script cannot recognize your system type.
Please download the most up to date version of the config scripts:
ftp://ftp.gnu.org/pub/gnu/config/
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.
config.guess version = $version
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = ${UNAME_MACHINE}
UNAME_RELEASE = ${UNAME_RELEASE}
UNAME_SYSTEM = ${UNAME_SYSTEM}
UNAME_VERSION = ${UNAME_VERSION}
EOF
exit 1
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "version='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

View File

@ -1,6 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
version='2000-06-13'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@ -25,6 +29,8 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
@ -45,30 +51,61 @@
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
if [ x$1 = x ]
then
echo Configuration name missing. 1>&2
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
echo "or $0 ALIAS" 1>&2
echo where ALIAS is a recognized configuration type. 1>&2
exit 1
fi
me=`echo "$0" | sed -e 's,.*/,,'`
# First pass through any local machine types.
case $1 in
*local*)
echo $1
exit 0
;;
*)
;;
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-V, --version print version number, then exit"
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case "$1" in
--version | --vers* | -V )
echo "$version" ; exit 0 ;;
--help | --h* | -h )
echo "$usage"; exit 0 ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
exec >&2
echo "$me: invalid option $1"
echo "$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit 0;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
linux-gnu*)
nto-qnx* | linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@ -94,15 +131,25 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple)
-apple | -axis)
os=
basic_machine=$1
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=sco3.2v5
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
@ -121,6 +168,9 @@ case $os in
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@ -143,27 +193,41 @@ case $os in
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
| 580 | i960 | h8300 \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w \
| alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
| i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
| mips64 | mipsel | mips64el | mips64orion | mips64orionel \
| mipstx39 | mipstx39el \
| sparc | sparclet | sparclite | sparc64 | v850)
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
| hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v | fr30 | avr)
basic_machine=$basic_machine-unknown
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i[34567]86)
i[234567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@ -172,28 +236,49 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
# FIXME: clean up the formatting here.
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
| xmp-* | ymp-* \
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
| alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
| ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
| hppa2.0n-* | hppa64-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
| alphaev6[78]-* \
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
| clipper-* | orion-* \
| sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
| sparc64-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mipstx39-* | mipstx39el-* \
| f301-*)
| sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
| mips64el-* | mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
| mipstx39-* | mipstx39el-* | mcore-* \
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
| bs2000-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
@ -223,6 +308,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -266,6 +355,9 @@ case $basic_machine in
crds | unos)
basic_machine=m68k-crds
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@ -299,6 +391,10 @@ case $basic_machine in
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
@ -317,6 +413,14 @@ case $basic_machine in
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
@ -332,13 +436,30 @@ case $basic_machine in
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
@ -347,16 +468,16 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
os=-mvs
;;
s390 | s390-ibm*)
# OS/390 support after:
# Linkname: Mortice Kern Systems (MKS) Inc. - OS/390 OpenEdition -- GNU Utilities Downloads
# URL: http://www.mks.com/s390/gnu/download.htm#autoconf
basic_machine=s390-ibm # /* S/390 -- gil -- 1419 */
os=-os390
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i[34567]86v32)
@ -375,6 +496,22 @@ case $basic_machine in
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
i386-go32 | go32)
basic_machine=i386-unknown
os=-go32
;;
i386-mingw32 | mingw32)
basic_machine=i386-unknown
os=-mingw32
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@ -403,6 +540,10 @@ case $basic_machine in
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mipsel*-linux*)
basic_machine=mipsel-unknown
os=-linux-gnu
@ -417,10 +558,34 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
mmix*)
basic_machine=mmix-knuth
os=-mmixware
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
msdos)
basic_machine=i386-unknown
os=-msdos
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@ -433,6 +598,10 @@ case $basic_machine in
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
@ -458,9 +627,28 @@ case $basic_machine in
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
np1)
basic_machine=np1-gould
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@ -478,19 +666,19 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | nexen)
pentium | p5 | k5 | k6 | nexen)
basic_machine=i586-pc
;;
pentiumpro | p6 | k6 | 6x86)
pentiumpro | p6 | 6x86 | athlon)
basic_machine=i686-pc
;;
pentiumii | pentium2)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | nexen-*)
pentium-* | p5-* | k5-* | k6-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | k6-* | 6x86-*)
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-*)
@ -514,12 +702,20 @@ case $basic_machine in
ps2)
basic_machine=i386-ibm
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sequent)
basic_machine=i386-sequent
;;
@ -527,6 +723,10 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sparclite-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
@ -534,6 +734,13 @@ case $basic_machine in
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
sun2)
basic_machine=m68000-sun
;;
@ -574,10 +781,18 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=t3e-cray
os=-unicos
;;
tx39)
basic_machine=mipstx39-unknown
;;
@ -595,6 +810,10 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
@ -618,6 +837,14 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xmp)
basic_machine=xmp-cray
os=-unicos
@ -625,6 +852,10 @@ case $basic_machine in
xps | xps100)
basic_machine=xps100-honeywell
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -632,6 +863,15 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
mips)
if [ x$os = x-linux-gnu ]; then
basic_machine=mips-unknown
@ -654,7 +894,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sparc)
sh3 | sh4)
base_machine=sh-unknown
;;
sparc | sparcv9)
basic_machine=sparc-sun
;;
cydra)
@ -666,6 +909,16 @@ case $basic_machine in
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
c4x*)
basic_machine=c4x-none
os=-coff
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@ -716,16 +969,37 @@ case $os in
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* | -os390* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos*)
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i[34567]86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto*)
os=-nto-qnx
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@ -735,6 +1009,12 @@ case $os in
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
@ -750,12 +1030,18 @@ case $os in
-acis*)
os=-aos
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-ns2 )
os=-nextstep2
;;
-nsk)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
@ -781,9 +1067,18 @@ case $os in
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -*MiNT)
os=-mint
;;
-none)
;;
*)
@ -809,6 +1104,9 @@ case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
@ -830,6 +1128,15 @@ case $basic_machine in
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
@ -839,12 +1146,18 @@ case $basic_machine in
*-be)
os=-beos
;;
s390-ibm)
os=-os390 # /* S/390 -- gil -- 1451 */
;;
*-ibm)
os=-aix
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
@ -908,6 +1221,18 @@ case $basic_machine in
f301-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
@ -929,9 +1254,15 @@ case $basic_machine in
-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
@ -947,7 +1278,7 @@ case $basic_machine in
-genix*)
vendor=ns
;;
-mvs*)
-mvs* | -opened*)
vendor=ibm
;;
-ptx*)
@ -959,9 +1290,26 @@ case $basic_machine in
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -*MiNT)
vendor=atari
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "version='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:

File diff suppressed because it is too large Load Diff

View File

@ -28,10 +28,10 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
dnl
dnl $Id: configure.in,v 1.179 1999/10/24 00:32:42 tom Exp $
dnl $Id: configure.in,v 1.194 2000/07/01 21:31:07 tom Exp $
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.12.971222)
AC_REVISION($Revision: 1.179 $)
AC_PREREQ(2.12.971230)
AC_REVISION($Revision: 1.194 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -115,7 +115,11 @@ if test "X$cf_with_cxx" = Xno ; then
CXX=""
GXX=""
else
pushdef([AC_MSG_ERROR],
[AC_MSG_RESULT([You don't have any C++ compiler, too bad]); dnl
cf_with_cxx=no; CXX=""; GXX="";])dnl
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
@ -190,6 +194,7 @@ CF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:)
### Use "--without-normal --with-shared" to allow the default model to be
### shared, for example.
cf_list_models=""
AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")
AC_MSG_CHECKING(if you want to build shared libraries)
AC_ARG_WITH(shared,
@ -223,6 +228,39 @@ AC_ARG_WITH(profile,
AC_MSG_RESULT($with_profile)
test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
###############################################################################
AC_MSG_CHECKING(for specified models)
test -z "$cf_list_models" && cf_list_models=normal
AC_MSG_RESULT($cf_list_models)
### Use the first model as the default, and save its suffix for use in building
### up test-applications.
AC_MSG_CHECKING(for default model)
DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
AC_MSG_RESULT($DFT_LWR_MODEL)
CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")
AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")
TINFO_NAME=tinfo
AC_SUBST(TINFO_NAME)
LIB_NAME=ncurses
AC_SUBST(LIB_NAME)
LIB_DIR=../lib
CF_LIB_PREFIX(cf_prefix)
LIB_PREFIX=$cf_prefix
AC_SUBST(LIB_PREFIX)
LIB_SUFFIX=
AC_SUBST(LIB_SUFFIX)
###############################################################################
AC_MSG_CHECKING(if you want to build a separate terminfo library)
AC_ARG_WITH(termlib,
[ --with-termlib generate separate terminfo library],
@ -267,42 +305,6 @@ if test $with_gpm = yes ; then
],AC_MSG_WARN(Cannot link with gpm library - read the FAQ))
fi
TINFO_LIST="$SHLIB_LIST"
test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo"
AC_SUBST(EXTRA_LIBS)
AC_SUBST(TINFO_LIST)
AC_SUBST(SHLIB_LIST)
AC_MSG_CHECKING(for specified models)
test -z "$cf_list_models" && cf_list_models=normal
AC_MSG_RESULT($cf_list_models)
### Use the first model as the default, and save its suffix for use in building
### up test-applications.
DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
CF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl
CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
AC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj")
AC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal")
AC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL")
AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
AC_SUBST(cf_list_models)dnl the complete list of models ("normal debug")
TINFO_NAME=tinfo
AC_SUBST(TINFO_NAME)
LIB_NAME=ncurses
AC_SUBST(LIB_NAME)
LIB_DIR=../lib
CF_LIB_PREFIX(cf_prefix)
LIB_PREFIX=$LIB_DIR/$cf_prefix
AC_SUBST(LIB_PREFIX)
dnl Not all ports of gcc support the -g option
if test X"$CC_G_OPT" = X"" ; then
@ -317,6 +319,7 @@ if test X"$CXX_G_OPT" = X"" ; then
fi
AC_SUBST(CXX_G_OPT)
AC_MSG_CHECKING(for default loader flags)
case $DFT_LWR_MODEL in
normal) LD_MODEL='' ;;
debug) LD_MODEL=$CC_G_OPT ;;
@ -324,6 +327,7 @@ profile) LD_MODEL='-pg';;
shared) LD_MODEL='' ;;
esac
AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
AC_MSG_RESULT($LD_MODEL)
AC_MSG_CHECKING(if rpath option should be used)
AC_ARG_ENABLE(rpath,
@ -348,15 +352,9 @@ CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
AC_MSG_CHECKING(if you wish to install ncurses overwriting curses)
AC_ARG_ENABLE(overwrite,
[ --disable-overwrite leave out the link to -lcurses],
[with_overwrite=$enableval
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
includedir='$(prefix)/include/ncurses'
],
[with_overwrite=$enableval],
[with_overwrite=yes])
AC_MSG_RESULT($with_overwrite)
AC_MSG_CHECKING(where we will install curses.h)
AC_MSG_RESULT($includedir)
AC_MSG_CHECKING(if external terminfo-database is used)
AC_ARG_ENABLE(database,
@ -366,14 +364,6 @@ AC_ARG_ENABLE(database,
AC_MSG_RESULT($with_database)
test $with_database != no && AC_DEFINE(USE_DATABASE)
AC_MSG_CHECKING(if you want to build with function extensions)
AC_ARG_ENABLE(ext-funcs,
[ --disable-ext-funcs disable function-extensions],
[with_ext_funcs=$enableval],
[with_ext_funcs=yes])
AC_MSG_RESULT($with_ext_funcs)
test "$with_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS)
AC_MSG_CHECKING(for list of fallback descriptions)
AC_ARG_WITH(fallbacks,
[ --with-fallbacks=XXX specify list of fallback terminal descriptions],
@ -480,6 +470,15 @@ fi
test "$with_links" = yes && AC_DEFINE(USE_LINKS)
test "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS)
### use option --enable-broken-linker to force on use of broken-linker support
AC_MSG_CHECKING(if you want broken-linker support code)
AC_ARG_ENABLE(broken_linker,
[ --enable-broken_linker compile with broken-linker support code],
[with_broken_linker=$enableval],
[with_broken_linker=$BROKEN_LINKER])
AC_MSG_RESULT($with_broken_linker)
test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER)
### use option --enable-bsdpad to have tputs process BSD-style prefix padding
AC_MSG_CHECKING(if tputs should process BSD-style prefix padding)
AC_ARG_ENABLE(bsdpad,
@ -489,6 +488,33 @@ AC_ARG_ENABLE(bsdpad,
AC_MSG_RESULT($with_bsdpad)
test "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS)
### Enable compiling-in rcs id's
AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
AC_ARG_WITH(rcs-ids,
[ --with-rcs-ids compile-in RCS identifiers],
[with_rcs_ids=$withval],
[with_rcs_ids=no])
AC_MSG_RESULT($with_rcs_ids)
test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
###############################################################################
CF_HELP_MESSAGE(Extensions:)
### Note that some functions (such as const) are normally disabled anyway.
AC_MSG_CHECKING(if you want to build with function extensions)
AC_ARG_ENABLE(ext-funcs,
[ --disable-ext-funcs disable function-extensions],
[with_ext_funcs=$enableval],
[with_ext_funcs=yes])
AC_MSG_RESULT($with_ext_funcs)
if test "$with_ext_funcs" = yes ; then
AC_DEFINE(HAVE_HAS_KEY)
AC_DEFINE(HAVE_RESIZETERM)
AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
AC_DEFINE(HAVE_WRESIZE)
AC_DEFINE(NCURSES_EXT_FUNCS)
fi
### use option --enable-const to turn on use of const beyond that in XSI.
AC_MSG_CHECKING(for extended use of const keyword)
AC_ARG_ENABLE(const,
@ -503,14 +529,42 @@ if test "$with_ext_const" = yes ; then
fi
AC_SUBST(NCURSES_CONST)
### Enable compiling-in rcs id's
AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
AC_ARG_WITH(rcs-ids,
[ --with-rcs-ids compile-in RCS identifiers],
[with_rcs_ids=$withval],
[with_rcs_ids=no])
AC_MSG_RESULT($with_rcs_ids)
test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
### 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],
[with_no_padding=$enableval],
[with_no_padding=$with_ext_funcs])
AC_MSG_RESULT($with_no_padding)
test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING)
### use option --enable-sigwinch to turn on use of SIGWINCH logic
AC_MSG_CHECKING(if you want SIGWINCH handler)
AC_ARG_ENABLE(sigwinch,
[ --enable-sigwinch compile with SIGWINCH handler],
[with_sigwinch=$enableval],
[with_sigwinch=$with_ext_funcs])
AC_MSG_RESULT($with_sigwinch)
test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
### use option --enable-tcap-names to allow user to define new capabilities
AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap)
AC_ARG_ENABLE(tcap-names,
[ --enable-tcap-names compile with user-definable terminal capabilities],
[with_tcap_names=$enableval],
[with_tcap_names=$with_ext_funcs])
AC_MSG_RESULT($with_tcap_names)
NCURSES_XNAMES=0
test "$with_tcap_names" = yes && NCURSES_XNAMES=1
AC_SUBST(NCURSES_XNAMES)
###############################################################################
CF_HELP_MESSAGE(Experimental Code:)
@ -521,14 +575,14 @@ AC_ARG_WITH(develop,
[with_develop=no])
AC_MSG_RESULT($with_develop)
### use option --enable-broken-linker to force on use of broken-linker support
AC_MSG_CHECKING(if you want broken-linker support code)
AC_ARG_ENABLE(broken_linker,
[ --enable-broken_linker compile with broken-linker support code],
[with_broken_linker=$enableval],
[with_broken_linker=$BROKEN_LINKER])
AC_MSG_RESULT($with_broken_linker)
test "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER)
### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
AC_MSG_CHECKING(if you want experimental colorfgbg code)
AC_ARG_ENABLE(hard-tabs,
[ --enable-colorfgbg compile with experimental \$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)
@ -539,23 +593,6 @@ AC_ARG_ENABLE(hard-tabs,
AC_MSG_RESULT($with_hardtabs)
test "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS)
### use option --enable-hashmap to turn on use of hashmap scrolling logic
AC_MSG_CHECKING(if you want experimental hashmap code)
AC_ARG_ENABLE(hashmap,
[ --enable-hashmap compile with experimental hashmap 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 experimental no-padding code)
AC_ARG_ENABLE(no-padding,
[ --enable-no-padding compile with experimental no-padding code],
[with_no_padding=$enableval],
[with_no_padding=yes])
AC_MSG_RESULT($with_no_padding)
test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING)
AC_MSG_CHECKING(if you want experimental safe-sprintf code)
AC_ARG_ENABLE(safe-sprintf,
[ --enable-safe-sprintf compile with experimental safe-sprintf code],
@ -565,35 +602,16 @@ AC_MSG_RESULT($with_safe_sprintf)
test "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF)
### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
# when hashmap is used scroll hints are useless
if test "$with_hashmap" = no ; then
AC_MSG_CHECKING(if you want to experiment without scrolling-hints code)
AC_ARG_ENABLE(scroll-hints,
[ --disable-scroll-hints compile hashmap without scroll-hints code],
[ --disable-scroll-hints compile without scroll-hints code],
[with_scroll_hints=$enableval],
[with_scroll_hints=yes;
# when hashmap is used scroll hints are useless
test $with_hashmap = yes && with_scroll_hints=no])
[with_scroll_hints=yes])
AC_MSG_RESULT($with_scroll_hints)
test "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS)
### use option --enable-tcap-names to allow user to define new capabilities
AC_MSG_CHECKING(if you want experimental definable names like termcap)
AC_ARG_ENABLE(tcap-names,
[ --enable-tcap-names compile with experimental definable-name code],
[with_tcap_names=$enableval],
[with_tcap_names=$with_develop])
AC_MSG_RESULT($with_tcap_names)
NCURSES_XNAMES=0
test "$with_tcap_names" = yes && NCURSES_XNAMES=1
AC_SUBST(NCURSES_XNAMES)
### use option --enable-sigwinch to turn on use of SIGWINCH logic
AC_MSG_CHECKING(if you want experimental SIGWINCH handler)
AC_ARG_ENABLE(sigwinch,
[ --enable-sigwinch compile with experimental SIGWINCH handler],
[with_sigwinch=$enableval],
[with_sigwinch=yes])
AC_MSG_RESULT($with_sigwinch)
test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
fi
### use option --enable-widec to turn on use of wide-character support
AC_MSG_CHECKING(if you want experimental wide-character code)
@ -602,7 +620,10 @@ AC_ARG_ENABLE(widec,
[with_widec=$enableval],
[with_widec=no])
AC_MSG_RESULT($with_widec)
test "$with_widec" = yes && AC_DEFINE(USE_WIDEC_SUPPORT)
if test "$with_widec" = yes ; then
LIB_SUFFIX="w${LIB_SUFFIX}"
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)
@ -678,9 +699,7 @@ AC_CHECK_LIB(bsd, gettimeofday,
AC_DEFINE(HAVE_GETTIMEOFDAY)
LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
MATH_LIB=""
AC_CHECK_FUNC(sin,,
AC_CHECK_LIB(m, sin,[MATH_LIB="-lm"]))
CF_MATH_LIB(MATH_LIB,sin(x))
AC_SUBST(MATH_LIB)
### Checks for header files.
@ -695,19 +714,18 @@ getopt.h \
libc.h \
limits.h \
locale.h \
poll.h \
sys/bsdtypes.h \
sys/ioctl.h \
sys/param.h \
poll.h \
sys/poll.h \
sys/select.h \
sys/stropts.h \
sys/time.h \
sys/times.h \
termio.h \
termios.h \
ttyent.h \
unistd.h \
values.h \
)
# check for ISC (this may also define _POSIX_SOURCE)
@ -735,9 +753,11 @@ CF_LINK_DATAONLY
CF_SPEED_TYPE
### Checks for library functions.
AC_CHECK_FUNCS( getcwd \
AC_CHECK_FUNCS( \
getcwd \
getttynam \
memccpy \
mkstemp \
nanosleep \
poll \
remove \
@ -756,8 +776,6 @@ vfscanf \
vsnprintf \
vsscanf \
)
if test "$with_getcap" = "yes" ; then
CF_CGETENT
fi
@ -776,6 +794,7 @@ AC_TYPE_SIGNAL
CF_TYPE_SIGACTION
CF_SIZECHANGE
CF_FUNC_MEMMOVE
CF_FUNC_POLL
dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
if test -z "$cf_user_CFLAGS" ; then
@ -882,21 +901,22 @@ if test "$cf_cv_prog_gnat_correct" = yes; then
CF_WITH_PATH(ada-include,
[ --with-ada-include=DIR Ada includes are in DIR],
ADA_INCLUDE,
PREFIX/lib/gnu-Ada/adainclude,
[$]prefix/lib/gnu-Ada/adainclude)
PREFIX/lib/ada/adainclude,
[$]prefix/lib/ada/adainclude)
AC_SUBST(ADA_INCLUDE)
CF_WITH_PATH(ada-objects,
[ --with-ada-objects=DIR Ada objects are in DIR],
ADA_OBJECTS,
PREFIX/lib/gnu-Ada/adalib,
[$]prefix/lib/gnu-Ada/adalib)
PREFIX/lib/ada/adalib,
[$]prefix/lib/ada/adalib)
AC_SUBST(ADA_OBJECTS)
if test $with_shared = no
then
AC_MSG_WARN(Ada95 applications will not link properly with static libraries)
fi
# 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
@ -930,14 +950,50 @@ LIB_SUBSETS="${LIB_SUBSETS}base"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
AC_MSG_RESULT($LIB_SUBSETS)
LIB_TRACING=DEBUG
case "$CFLAGS" in
*-DTRACE*)
LIB_TRACING=all
;;
esac
### Construct the list of include-directories to be generated
CF_INCLUDE_DIRS
CF_ADA_INCLUDE_DIRS
### Build up pieces for makefile rules
AC_MSG_CHECKING(default library suffix)
CF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl
AC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("")
AC_MSG_RESULT($DFT_ARG_SUFFIX)
AC_MSG_CHECKING(default library-dependency suffix)
CF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl
AC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a")
AC_MSG_RESULT($DFT_DEP_SUFFIX)
AC_MSG_CHECKING(default object directory)
CF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl
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}"
AC_MSG_CHECKING(where we will install curses.h)
test "$with_overwrite" = no && \
test "x$includedir" = 'x${prefix}/include' && \
includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
AC_MSG_RESULT($includedir)
AC_SUBST(EXTRA_LIBS)
AC_SUBST(TINFO_LIST)
AC_SUBST(SHLIB_LIST)
### Set up low-level terminfo dependencies for makefiles. Note that we
### could override this.
if test "$with_termlib" = yes ; then
TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
fi
PROG_DEPS="$TEST_DEPS"
@ -970,7 +1026,9 @@ CF_LIST_MODELS="$cf_list_models"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
LDCONFIG="$LDCONFIG"
LIB_NAME="$LIB_NAME"
LIB_SUFFIX="$LIB_SUFFIX"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_TRACING="$LIB_TRACING"
SRC_SUBDIRS="$SRC_SUBDIRS"
TINFO_NAME="$TINFO_NAME"
WITH_ECHO="$with_echo"

View File

@ -1,4 +1,4 @@
# $Id: dist.mk,v 1.172 1999/10/23 12:29:39 tom Exp $
# $Id: dist.mk,v 1.207 2000/06/29 23:08:38 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -9,8 +9,8 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 0
NCURSES_PATCH = 19991023
NCURSES_MINOR = 1
NCURSES_PATCH = 20000701
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@ -18,7 +18,16 @@ VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
DUMP = lynx -dump
DUMP2 = $(DUMP) -nolist
ALL = ANNOUNCE announce.html misc/ncurses-intro.doc misc/hackguide.doc
GNATHTML= `type -p gnathtml || type -p gnathtml.pl`
# man2html 3.0.1 is a Perl script which assumes that pages are fixed size.
# Not all man programs agree with this assumption; some use half-spacing, which
# has the effect of lengthening the text portion of the page -- so man2html
# would remove some text. The man program on Redhat 6.1 appears to work with
# man2html if we set the top/bottom margins to 6 (the default is 7).
MAN2HTML= man2html -botm=6 -topm=6 -cgiurl '$$title.$$section$$subsection.html'
ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml
all : $(ALL)
@ -26,19 +35,66 @@ dist: $(ALL)
(cd ..; tar cvf ncurses-$(VERSION).tar `sed <ncurses-$(VERSION)/MANIFEST 's/^./ncurses-$(VERSION)/'`; gzip ncurses-$(VERSION).tar)
distclean:
rm -f $(ALL)
rm -f $(ALL) subst.tmp subst.sed MANIFEST.tmp
# Don't mess with announce.html.in unless you have lynx available!
announce.html: announce.html.in
sed 's,@VERSION@,$(VERSION),' <announce.html.in >announce.html
doc/html/announce.html: announce.html.in
sed 's,@VERSION@,$(VERSION),' <announce.html.in > $@
ANNOUNCE : announce.html
$(DUMP) announce.html >ANNOUNCE
ANNOUNCE : doc/html/announce.html
$(DUMP) doc/html/announce.html > $@
misc/ncurses-intro.doc: misc/ncurses-intro.html
$(DUMP2) misc/ncurses-intro.html > misc/ncurses-intro.doc
misc/hackguide.doc: misc/hackguide.html
$(DUMP2) misc/hackguide.html > misc/hackguide.doc
doc/ncurses-intro.doc: doc/html/ncurses-intro.html
$(DUMP2) doc/html/ncurses-intro.html > $@
doc/hackguide.doc: doc/html/hackguide.html
$(DUMP2) doc/html/hackguide.html > $@
# Note that this rule assumes the manpages were installed - it does not use
# the copies in the build tree except to get the list of names.
manhtml: MANIFEST
@rm -f doc/html/man/*.html
@mkdir -p doc/html/man
@rm -f subst.tmp ;
@for f in man/*.[0-9]*; do \
m=`basename $$f` ;\
x=`echo $$m | awk -F. '{print $$2;}'` ;\
xu=`echo $$x | dd conv=ucase 2>/dev/null` ;\
if [ "$${x}" != "$${xu}" ]; then \
echo "s/$${xu}/$${x}/g" >> subst.tmp ;\
fi ;\
done
@sort < subst.tmp | uniq > subst.sed
@rm -f subst.tmp
@for f in man/*.[0-9]* ; do \
m=`basename $$f` ;\
g=$${m}.html ;\
if [ -f doc/html/$$g ]; then chmod +w doc/html/$$g; fi;\
echo "Converting $$m to HTML" ;\
man $$f | tr '\255' '-' | $(MAN2HTML) | \
sed -f subst.sed |\
sed -e 's/"curses.3x.html"/"ncurses.3x.html"/g' \
> doc/html/man/$$g ;\
done
@rm -f subst.sed
@sed -e "\%./doc/html/man/%d" < MANIFEST > MANIFEST.tmp
@find ./doc/html/man -type f -print >> MANIFEST.tmp
@chmod u+w MANIFEST
@sort -u < MANIFEST.tmp > MANIFEST
@rm -f MANIFEST.tmp
#
# Please note that this target can only be properly built if the build of the
# Ada95 subdir has been done. The reason is, that the gnathtml tool uses the
# .ali files generated by the Ada95 compiler during the build process. These
# .ali files contain cross referencing information required by gnathtml.
adahtml: MANIFEST
if [ ! -z "$(GNATHTML)" ]; then \
(cd ./Ada95/gen ; make html) ;\
sed -e "\%./doc/html/ada/%d" < MANIFEST > MANIFEST.tmp ;\
find ./doc/html/ada -type f -print >> MANIFEST.tmp ;\
sort -u < MANIFEST.tmp > MANIFEST ;\
rm -f MANIFEST.tmp ;\
fi
# Prepare distribution for version control
vcprepare:

View File

@ -0,0 +1,381 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
$Id: announce.html,v 1.37 2000/07/02 01:50:20 tom Exp $
-->
<HTML>
<HEAD>
<TITLE>Announcing ncurses 5.1</TITLE>
<link rev=made href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
<H1>Announcing ncurses 5.1</H1>
The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format,
supports pads and color
and multiple highlights and forms characters and function-key mapping,
and has all the other SYSV-curses enhancements over BSD curses.<P>
In mid-June 1995, the maintainer of 4.4BSD curses declared that he
considered 4.4BSD curses obsolete, and is encouraging the keepers of
Unix releases such as BSD/OS, freeBSD and netBSD to switch over to
ncurses.<P>
The ncurses code was developed under GNU/Linux. It should port easily to
any ANSI/POSIX-conforming UNIX. It has even been ported to OS/2 Warp!<P>
The distribution includes the library and support utilities, including a
terminfo compiler tic(1), a decompiler infocmp(1), clear(1), tput(1), tset(1),
and a termcap conversion tool captoinfo(1). Full manual pages are provided for
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
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H1>Release Notes</H1>
This release is designed to be upward compatible from ncurses 5.0; very few
applications will require recompilation, depending on the platform.
These are the highlights from the change-log since ncurses 5.0 release.
<p>
Interface changes:
<ul>
<li>made the extended terminal capabilities
(<code>configure&nbsp;--enable-tcap-names</code>)
a standard feature (though the configure script can disable it,
it is built by default).
<li>removed the <code>trace()</code> function and related trace support
from the production library. This is the only interface change that
may cause problems with existing applications linked to shared
libraries, since not all platforms use the minor version number.
<li>explicitly initialized to zero several data items which were
implicitly initialized, e.g., cur_term. If not explicitly
initialized, their storage type is C (common), and causes problems
linking on some platforms.
<li>modified curses.h.in, undef'ing some symbols to avoid conflict with
C++ STL.
</ul>
New features:
<ul>
<li>added a new extension, <code>assume_default_colors()</code> to
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>.
<li>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 <code>use_extended_names()</code> by
adding "obsolete" termcap strings to terminfo.src
<ul>
<li>modified <code>tic</code> so that if extended names (i.e.,
configure&nbsp;--enable-tcap-names) are active, then <code>tic&nbsp;-x</code>
will also write "obsolete" capabilities that are present in the
terminfo source.
<li>added screen's AX capability (for ECMA SGR 39 and 49) to applicable
terminfo entries, use presence of this as a check for a small
improvement in setting default colors.
<li>add -a option to tic and infocmp, which retains commented-out
capabilities during source translation/comparison, e.g., captoinfo
and infotocap.
</ul>
<li>implemented limited support for UTF-8, useful with XFree86 xterm:
<ul>
<li>if the <code>configure&nbsp;--enable-widec</code> option is
given, append 'w' to names of the generated libraries (e.g.,
libncursesw.so) to avoid conflict with existing ncurses libraries.
<li>add a simple UTF-8 output driver to the experimental
wide-character support. If any of the environment variables
LC_ALL, LC_CTYPE or LANG contain the string "UTF-8", this driver
will be used to translate the output to UTF-8.
<li>modified view.c to make a rudimentary viewer of UTF-8 text.
</ul>
<li>modify <code>raw()</code> and <code>noraw()</code> to clear/restore
IEXTEN flag which affects stty lnext 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>added configure option <code>--with-manpage-symlinks</code>, which
provides for fully indexing manpage entries by making symbolic links
for the aliases.
<li>changed <code>unctrl()</code> to render C1 characters (128-159) as
<code>~@</code>, <code>~A</code>, etc.
<li>add experimental configure option --enable-colorfgbg to check for
$COLORTERM variable as set by rxvt/aterm/Eterm.
<li>made the <code>infocmp -F</code> option less verbose.
<li>dropped support for gnat 3.10 (gnat 3.12 is current).
</ul>
Major bug fixes:
<ul>
<li>modified infocmp -e, -E options to ensure that generated fallback.c
type for Booleans agrees with term.h
<li>documented a special case of incompatiblity between ncurses 4.2 and
5.0, added a section for this in INSTALL.
<li>corrected tests for file-descriptors in OS/2 EMX mouse support. A
negative value could be used by FD_SET, causing the select() call to
wait indefinitely.
<li>made 'tput flash' work properly for xterm by flushing output in
delay_output() when using napms(), and modifying xterm's terminfo to
specify no padding character. Otherwise, xterm's reported baud rate
could mislead ncurses into producing too few padding characters.
<li>modified lib_addch.c to allow repeated update to the lower-right
corner, rather than displaying only the first character written until
the cursor is moved. Recent versions of SVr4 curses can update the
lower-right corner, and behave this way.
<li>modified echo() behavior of getch() to match Solaris curses for
carriage return and backspace (reported by Neil Zanella).
<li>corrected offsets used for subwindows in <code>wresize()</code>
<li>modified configure script so AC_MSG_ERROR is temporarily defined to
a warning in AC_PROG_CXX to make it recover from a missing C++
compiler without requiring user to add --without-cxx option
<li>corrected logic in lib_twait.c as used by lib_mouse.c for GPM mouse
support when poll() is used rather than select().
<li>made several fixes for buffer overflows, unchecked recursion,
improvements in performance, etc. See the NEWS file for details.
</ul>
<H1>Features of Ncurses</H1>
The ncurses package is fully compatible with SVr4 (System V Release 4) curses:
<UL>
<LI>All 257 of the SVr4 calls have been implemented (and are documented).
<LI>Full support for SVr4 curses features including keyboard mapping, color,
forms-drawing with ACS characters, and automatic recognition of keypad
and function keys.
<LI>An emulation of the SVr4 panels library, supporting
a stack of windows with backing store, is included.
<LI>An emulation of the SVr4 menus library, supporting
a uniform but flexible interface for menu programming, is included.
<LI>An emulation of the SVr4 form library, supporting
data collection through on-screen forms, is included.
<LI>Binary terminfo entries generated by the ncurses tic(1) implementation
are bit-for-bit-compatible with the entry format SVr4 curses uses.
<LI>The utilities have options to allow you to filter terminfo
entries for use with less capable <STRONG>curses</STRONG>/<STRONG>terminfo</STRONG>
versions such as the HP/UX and AIX ports.</UL>
The ncurses package also has many useful extensions over SVr4:
<UL>
<LI>The API is 8-bit clean and base-level conformant with the X/OPEN curses
specification, XSI curses (that is, it implements all BASE level features,
but not all EXTENDED features). Most EXTENDED-level features not directly
concerned with wide-character support are implemented, including many
function calls not supported under SVr4 curses (but portability of all
calls is documented so you can use the SVr4 subset only).
<LI>Unlike SVr3 curses, ncurses can write to the rightmost-bottommost corner
of the screen if your terminal has an insert-character capability.
<LI>Ada95 and C++ bindings.
<LI>Support for mouse event reporting with X Window xterm and OS/2 console windows.
<LI>Extended mouse support via Alessandro Rubini's gpm package.
<LI>The function <CODE>wresize()</CODE> allows you to resize windows, preserving
their data.
<LI>The function <CODE>use_default_colors()</CODE> allows you to
use the terminal's default colors for the default color pair,
achieving the effect of transparent colors.
<LI>The functions <CODE>keyok()</CODE>
and <CODE>define_key()</CODE> allow
you to better control the use of function keys,
e.g., disabling the ncurses KEY_MOUSE,
or by defining more than one control sequence to map to a given key code.
<LI>Support for 16-color terminals, such as aixterm and XFree86 xterm.
<LI>Better cursor-movement optimization. The package now features a
cursor-local-movement computation more efficient than either BSD's
or System V's.
<LI>Super hardware scrolling support. The screen-update code incorporates
a novel, simple, and cheap algorithm that enables it to make optimal
use of hardware scrolling, line-insertion, and line-deletion
for screen-line movements. This algorithm is more powerful than
the 4.4BSD curses quickch() routine.
<LI>Real support for terminals with the magic-cookie glitch. The
screen-update code will refrain from drawing a highlight if the magic-
cookie unattributed spaces required just before the beginning and
after the end would step on a non-space character. It will
automatically shift highlight boundaries when doing so would make it
possible to draw the highlight without changing the visual appearance
of the screen.
<LI>It is possible to generate the library with a list of pre-loaded
fallback entries linked to it so that it can serve those terminal types even
when no terminfo tree or termcap file is accessible (this may be useful
for support of screen-oriented programs that must run in single-user mode).
<LI>The tic(1)/captoinfo utility provided with ncurses has the
ability to translate many termcaps from the XENIX, IBM and
AT&amp;T extension sets.
<LI>A BSD-like tset(1) utility is provided.
<LI>The ncurses library and utilities will automatically read terminfo
entries from $HOME/.terminfo if it exists, and compile to that directory
if it exists and the user has no write access to the system directory.
This feature makes it easier for users to have personal terminfo entries
without giving up access to the system terminfo directory.
<LI>You may specify a path of directories to search for compiled
descriptions with the environment variable TERMINFO_DIRS (this
generalizes the feature provided by TERMINFO under stock System V.)
<LI>In terminfo source files, use capabilities may refer not just to
other entries in the same source file (as in System V) but also to
compiled entries in either the system terminfo directory or the user's
$HOME/.terminfo directory.
<LI>A script (<STRONG>capconvert</STRONG>) is provided to help BSD users
transition from termcap to terminfo. It gathers the information in a
TERMCAP environment variable and/or a ~/.termcap local entries file
and converts it to an equivalent local terminfo tree under $HOME/.terminfo.
<LI>Automatic fallback to the /etc/termcap file can be compiled in
when it is not possible to build a terminfo tree. This feature is neither
fast nor cheap, you don't want to use it unless you have to,
but it's there.
<LI>The table-of-entries utility <STRONG>toe</STRONG> makes it easy for users to
see exactly what terminal types are available on the system.
<LI>The library meets the XSI requirement that every macro entry
point have a corresponding function which may be linked (and will be
prototype-checked) if the macro definition is disabled with
<CODE>#undef</CODE>.
<LI>An HTML "Introduction to Programming with NCURSES" document provides
a narrative introduction to the curses programming interface.
</UL>
<H1>State of the Package</H1>
Numerous bugs present in earlier versions have been fixed; the
library is far more reliable than it used to be. Bounds checking in many
`dangerous' entry points has been improved. The code is now type-safe
according to gcc -Wall. The library has been checked for malloc leaks and
arena corruption by the Purify memory-allocation tester.<P>
The ncurses code has been tested with a wide variety of applications
including (versions starting with those noted):
<DL>
<DT> cdk
<DD> Curses Development Kit
<br>
<A HREF="http://www.vexus.ca/CDK.html">Curses Development Kit</a>
<A HREF="http://dickey.his.com/cdk/cdk.html">http://dickey.his.com/cdk</A>.
<DT> ded
<DD> directory-editor
<br>
<A HREF="http://dickey.his.com/ded/ded.html">http://dickey.his.com/ded</A>.
<DT> dialog
<DD> the underlying application used in Slackware's setup, and the basis
for similar applications on GNU/Linux.
<br>
<A HREF="http://dickey.his.com/dialog/dialog.html">http://dickey.his.com/dialog</A>.
<DT> lynx
<DD> the character-screen WWW browser
<br>
<A HREF="http://lynx.isc.org/release/">http://lynx.isc.org/release</A>.
<DT> Midnight Commander 4.1
<DD> file manager
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org">http://www.mutt.org</A>.
<DT> ncftp
<DD> file-transfer utility
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
<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
<DT> vh-1.6
<DD> Volks-Hypertext browser for the Jargon File
</DL>
as well as some that use ncurses for the terminfo support alone:
<DL>
<DT> minicom
<DD> terminal emulator
<DT> vile
<DD> vi-like-emacs
<br>
<A HREF="http://dickey.his.com/vile/vile.html">http://dickey.his.com/vile</A>.
</DL>
<P>
The ncurses distribution includes a selection of test programs (including
a few games).
<H2>Who's Who and What's What</H2>
The original developers of ncurses are <A
HREF="mailto:zmbenhal@netcom.com">Zeyd Ben-Halim</A> and
<A HREF="http://www.ccil.org/~esr/home.html">Eric S. Raymond</A>.
Ongoing work is being done by
<A HREF="mailto:dickey@herndon4.his.com">Thomas Dickey</A>
and
<A HREF="mailto:juergen.pfeifer@gmx.net">J&uuml;rgen Pfeifer</A>.
<A HREF="mailto:dickey@herndon4.his.com">Thomas Dickey</A>
acts as the maintainer for the Free Software Foundation, which holds the
copyright on ncurses.
Contact the current maintainers at
<A HREF="mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</A>.
<P>
To join the ncurses mailing list, please write email to
<CODE>bug-ncurses-request@gnu.org</CODE> containing the line:
<PRE>
subscribe &lt;name&gt;@&lt;host.domain&gt;
</PRE>
This list is open to anyone interested in helping with the development and
testing of this package.<P>
Beta versions of ncurses and patches to the current release are made available at
<A HREF="ftp://dickey.his.com/ncurses">ftp://dickey.his.com/ncurses</A>.
<H2>Future Plans</H2>
<UL>
<LI>Extended-level XPG4 conformance, with internationalization support.
<LI>Ports to more systems, including DOS and Windows.
</UL>
We need people to help with these projects. If you are interested in working
on them, please join the ncurses list.
<H2>Other Related Resources</H2>
The distribution includes and uses a version of the terminfo-format
terminal description file maintained by Eric Raymond.
<A HREF="http://earthspace.net/~esr/terminfo">http://earthspace.net/~esr/terminfo</A>.<P>
You can find lots of information on terminal-related topics
not covered in the terminfo file at
<A HREF="http://www.cs.utk.edu/~shuford/terminal_index.html">Richard Shuford's
archive</A>.
</BODY>
</HTML>
<!--
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:html
# case-fold-search:nil
# fill-column:70
# End:
-->

View File

@ -0,0 +1,890 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!--
$Id: hackguide.html,v 1.25 2000/03/25 18:45:21 tom Exp $
-->
<HTML>
<HEAD>
<TITLE>A Hacker's Guide to Ncurses Internals</TITLE>
<link rev="made" href="mailto:bugs-ncurses@gnu.org">
<!--
This document is self-contained, *except* that there is one relative link to
the ncurses-intro.html document, expected to be in the same directory with
this one.
-->
</HEAD>
<BODY>
<H1>A Hacker's Guide to NCURSES</H1>
<H1>Contents</H1>
<UL>
<LI><A HREF="#abstract">Abstract</A>
<LI><A HREF="#objective">Objective of the Package</A>
<UL>
<LI><A HREF="#whysvr4">Why System V Curses?</A>
<LI><A HREF="#extensions">How to Design Extensions</A>
</UL>
<LI><A HREF="#portability">Portability and Configuration</A>
<LI><A HREF="#documentation">Documentation Conventions</A>
<LI><A HREF="#bugtrack">How to Report Bugs</A>
<LI><A HREF="#ncurslib">A Tour of the Ncurses Library</A>
<UL>
<LI><A HREF="#loverview">Library Overview</A>
<LI><A HREF="#engine">The Engine Room</A>
<LI><A HREF="#input">Keyboard Input</A>
<LI><A HREF="#mouse">Mouse Events</A>
<LI><A HREF="#output">Output and Screen Updating</A>
</UL>
<LI><A HREF="#fmnote">The Forms and Menu Libraries</A>
<LI><A HREF="#tic">A Tour of the Terminfo Compiler</A>
<UL>
<LI><A HREF="#nonuse">Translation of Non-<STRONG>use</STRONG> Capabilities</A>
<LI><A HREF="#uses">Use Capability Resolution</A>
<LI><A HREF="#translation">Source-Form Translation</A>
</UL>
<LI><A HREF="#utils">Other Utilities</A>
<LI><A HREF="#style">Style Tips for Developers</A>
<LI><A HREF="#port">Porting Hints</A>
</UL>
<H1><A NAME="abstract">Abstract</A></H1>
This document is a hacker's tour of the <STRONG>ncurses</STRONG> library and utilities.
It discusses design philosophy, implementation methods, and the
conventions used for coding and documentation. It is recommended
reading for anyone who is interested in porting, extending or improving the
package.
<H1><A NAME="objective">Objective of the Package</A></H1>
The objective of the <STRONG>ncurses</STRONG> package is to provide a free software API for
character-cell terminals and terminal emulators with the following
characteristics:
<UL>
<LI>Source-compatible with historical curses implementations (including
the original BSD curses and System V curses.
<LI>Conformant with the XSI Curses standard issued as part of XPG4 by
X/Open.
<LI>High-quality -- stable and reliable code, wide portability, good
packaging, superior documentation.
<LI>Featureful -- should eliminate as much of the drudgery of C interface
programming as possible, freeing programmers to think at a higher
level of design.
</UL>
These objectives are in priority order. So, for example, source
compatibility with older version must trump featurefulness -- we cannot
add features if it means breaking the portion of the API corresponding
to historical curses versions.
<H2><A NAME="whysvr4">Why System V Curses?</A></H2>
We used System V curses as a model, reverse-engineering their API, in
order to fulfill the first two objectives. <P>
System V curses implementations can support BSD curses programs with
just a recompilation, so by capturing the System V API we also
capture BSD's. <P>
More importantly for the future, the XSI Curses standard issued by X/Open
is explicitly and closely modeled on System V. So conformance with
System V took us most of the way to base-level XSI conformance.
<H2><A NAME="extensions">How to Design Extensions</A></H2>
The third objective (standards conformance) requires that it be easy to
condition source code using <STRONG>ncurses</STRONG> so that the absence of nonstandard
extensions does not break the code. <P>
Accordingly, we have a policy of associating with each nonstandard extension
a feature macro, so that ncurses client code can use this macro to condition
in or out the code that requires the <STRONG>ncurses</STRONG> extension. <P>
For example, there is a macro <CODE>NCURSES_MOUSE_VERSION</CODE> which XSI Curses
does not define, but which is defined in the <STRONG>ncurses</STRONG> library header.
You can use this to condition the calls to the mouse API calls.
<H1><A NAME="portability">Portability and Configuration</A></H1>
Code written for <STRONG>ncurses</STRONG> may assume an ANSI-standard C compiler and
POSIX-compatible OS interface. It may also assume the presence of a
System-V-compatible <EM>select(2)</EM> call. <P>
We encourage (but do not require) developers to make the code friendly
to less-capable UNIX environments wherever possible. <P>
We encourage developers to support OS-specific optimizations and methods
not available under POSIX/ANSI, provided only that:
<UL>
<LI>All such code is properly conditioned so the build process does not
attempt to compile it under a plain ANSI/POSIX environment.
<LI>Adding such implementation methods does not introduce incompatibilities
in the <STRONG>ncurses</STRONG> API between platforms.
</UL>
We use GNU <CODE>autoconf(1)</CODE> as a tool to deal with portability issues.
The right way to leverage an OS-specific feature is to modify the autoconf
specification files (configure.in and aclocal.m4) to set up a new feature
macro, which you then use to condition your code.
<H1><A NAME="documentation">Documentation Conventions</A></H1>
There are three kinds of documentation associated with this package. Each
has a different preferred format:
<UL>
<LI>Package-internal files (README, INSTALL, TO-DO etc.)
<LI>Manual pages.
<LI>Everything else (i.e., narrative documentation).
</UL>
Our conventions are simple:
<OL>
<LI><STRONG>Maintain package-internal files in plain text.</STRONG>
The expected viewer for them <EM>more(1)</EM> or an editor window; there's
no point in elaborate mark-up.
<LI><STRONG>Mark up manual pages in the man macros.</STRONG> These have to be viewable
through traditional <EM>man(1)</EM> programs.
<LI><STRONG>Write everything else in HTML.</STRONG>
</OL>
When in doubt, HTMLize a master and use <EM>lynx(1)</EM> to generate
plain ASCII (as we do for the announcement document). <P>
The reason for choosing HTML is that it's (a) well-adapted for on-line
browsing through viewers that are everywhere; (b) more easily readable
as plain text than most other mark-ups, if you don't have a viewer; and (c)
carries enough information that you can generate a nice-looking printed
version from it. Also, of course, it make exporting things like the
announcement document to WWW pretty trivial.
<H1><A NAME="bugtrack">How to Report Bugs</A></H1>
The <A NAME="bugreport">reporting address for bugs</A> is
<A HREF="mailto:bug-ncurses@gnu.org">bug-ncurses@gnu.org</A>.
This is a majordomo list; to join, write
to <CODE>bug-ncurses-request@gnu.org</CODE> with a message containing the line:
<PRE>
subscribe &lt;name&gt;@&lt;host.domain&gt;
</PRE>
The <CODE>ncurses</CODE> code is maintained by a small group of
volunteers. While we try our best to fix bugs promptly, we simply
don't have a lot of hours to spend on elementary hand-holding. We rely
on intelligent cooperation from our users. If you think you have
found a bug in <CODE>ncurses</CODE>, there are some steps you can take
before contacting us that will help get the bug fixed quickly. <P>
In order to use our bug-fixing time efficiently, we put people who
show us they've taken these steps at the head of our queue. This
means that if you don't, you'll probably end up at the tail end and
have to wait a while.
<OL>
<LI>Develop a recipe to reproduce the bug.
<p>
Bugs we can reproduce are likely to be fixed very quickly, often
within days. The most effective single thing you can do to get a
quick fix is develop a way we can duplicate the bad behavior --
ideally, by giving us source for a small, portable test program that
breaks the library. (Even better is a keystroke recipe using one of
the test programs provided with the distribution.)
<LI>Try to reproduce the bug on a different terminal type. <P>
In our experience, most of the behaviors people report as library bugs
are actually due to subtle problems in terminal descriptions. This is
especially likely to be true if you're using a traditional
asynchronous terminal or PC-based terminal emulator, rather than xterm
or a UNIX console entry. <P>
It's therefore extremely helpful if you can tell us whether or not your
problem reproduces on other terminal types. Usually you'll have both
a console type and xterm available; please tell us whether or not your
bug reproduces on both. <P>
If you have xterm available, it is also good to collect xterm reports for
different window sizes. This is especially true if you normally use an
unusual xterm window size -- a surprising number of the bugs we've seen
are either triggered or masked by these.
<LI>Generate and examine a trace file for the broken behavior. <P>
Recompile your program with the debugging versions of the libraries.
Insert a <CODE>trace()</CODE> call with the argument set to <CODE>TRACE_UPDATE</CODE>.
(See <A HREF="ncurses-intro.html#debugging">"Writing Programs with
NCURSES"</A> for details on trace levels.)
Reproduce your bug, then look at the trace file to see what the library
was actually doing. <P>
Another frequent cause of apparent bugs is application coding errors
that cause the wrong things to be put on the virtual screen. Looking
at the virtual-screen dumps in the trace file will tell you immediately if
this is happening, and save you from the possible embarrassment of being
told that the bug is in your code and is your problem rather than ours. <P>
If the virtual-screen dumps look correct but the bug persists, it's
possible to crank up the trace level to give more and more information
about the library's update actions and the control sequences it issues
to perform them. The test directory of the distribution contains a
tool for digesting these logs to make them less tedious to wade
through. <P>
Often you'll find terminfo problems at this stage by noticing that the
escape sequences put out for various capabilities are wrong. If not,
you're likely to learn enough to be able to characterize any bug in
the screen-update logic quite exactly.
<LI>Report details and symptoms, not just interpretations. <P>
If you do the preceding two steps, it is very likely that you'll discover
the nature of the problem yourself and be able to send us a fix. This
will create happy feelings all around and earn you good karma for the first
time you run into a bug you really can't characterize and fix yourself. <P>
If you're still stuck, at least you'll know what to tell us. Remember, we
need details. If you guess about what is safe to leave out, you are too
likely to be wrong. <P>
If your bug produces a bad update, include a trace file. Try to make
the trace at the <EM>least</EM> voluminous level that pins down the
bug. Logs that have been through tracemunch are OK, it doesn't throw
away any information (actually they're better than un-munched ones because
they're easier to read). <P>
If your bug produces a core-dump, please include a symbolic stack trace
generated by gdb(1) or your local equivalent. <P>
Tell us about every terminal on which you've reproduced the bug -- and
every terminal on which you can't. Ideally, sent us terminfo sources
for all of these (yours might differ from ours). <P>
Include your ncurses version and your OS/machine type, of course! You can
find your ncurses version in the <CODE>curses.h</CODE> file.
</OL>
If your problem smells like a logic error or in cursor movement or
scrolling or a bad capability, there are a couple of tiny test frames
for the library algorithms in the progs directory that may help you
isolate it. These are not part of the normal build, but do have their
own make productions. <P>
The most important of these is <CODE>mvcur</CODE>, a test frame for the
cursor-movement optimization code. With this program, you can see
directly what control sequences will be emitted for any given cursor
movement or scroll/insert/delete operations. If you think you've got
a bad capability identified, you can disable it and test again. The
program is command-driven and has on-line help. <P>
If you think the vertical-scroll optimization is broken, or just want to
understand how it works better, build <CODE>hashmap</CODE> and read the
header comments of <CODE>hardscroll.c</CODE> and <CODE>hashmap.c</CODE>; then try
it out. You can also test the hardware-scrolling optimization separately
with <CODE>hardscroll</CODE>. <P>
There's one other interactive tester, <CODE>tctest</CODE>, that exercises
translation between termcap and terminfo formats. If you have a serious
need to run this, you probably belong on our development team!
<H1><A NAME="ncurslib">A Tour of the Ncurses Library</A></H1>
<H2><A NAME="loverview">Library Overview</A></H2>
Most of the library is superstructure -- fairly trivial convenience
interfaces to a small set of basic functions and data structures used
to manipulate the virtual screen (in particular, none of this code
does any I/O except through calls to more fundamental modules
described below). The files
<blockquote>
<CODE>
lib_addch.c
lib_bkgd.c
lib_box.c
lib_chgat.c
lib_clear.c
lib_clearok.c
lib_clrbot.c
lib_clreol.c
lib_colorset.c
lib_data.c
lib_delch.c
lib_delwin.c
lib_echo.c
lib_erase.c
lib_gen.c
lib_getstr.c
lib_hline.c
lib_immedok.c
lib_inchstr.c
lib_insch.c
lib_insdel.c
lib_insstr.c
lib_instr.c
lib_isendwin.c
lib_keyname.c
lib_leaveok.c
lib_move.c
lib_mvwin.c
lib_overlay.c
lib_pad.c
lib_printw.c
lib_redrawln.c
lib_scanw.c
lib_screen.c
lib_scroll.c
lib_scrollok.c
lib_scrreg.c
lib_set_term.c
lib_slk.c
lib_slkatr_set.c
lib_slkatrof.c
lib_slkatron.c
lib_slkatrset.c
lib_slkattr.c
lib_slkclear.c
lib_slkcolor.c
lib_slkinit.c
lib_slklab.c
lib_slkrefr.c
lib_slkset.c
lib_slktouch.c
lib_touch.c
lib_unctrl.c
lib_vline.c
lib_wattroff.c
lib_wattron.c
lib_window.c
</CODE>
</blockquote>
are all in this category. They are very
unlikely to need change, barring bugs or some fundamental
reorganization in the underlying data structures. <P>
These files are used only for debugging support:
<blockquote>
<code>
lib_trace.c
lib_traceatr.c
lib_tracebits.c
lib_tracechr.c
lib_tracedmp.c
lib_tracemse.c
trace_buf.c
</code>
</blockquote>
It is rather unlikely you will ever need to change these, unless
you want to introduce a new debug trace level for some reasoon.<P>
There is another group of files that do direct I/O via <EM>tputs()</EM>,
computations on the terminal capabilities, or queries to the OS
environment, but nevertheless have only fairly low complexity. These
include:
<blockquote>
<code>
lib_acs.c
lib_beep.c
lib_color.c
lib_endwin.c
lib_initscr.c
lib_longname.c
lib_newterm.c
lib_options.c
lib_termcap.c
lib_ti.c
lib_tparm.c
lib_tputs.c
lib_vidattr.c
read_entry.c.
</code>
</blockquote>
They are likely to need revision only if
ncurses is being ported to an environment without an underlying
terminfo capability representation. <P>
These files
have serious hooks into
the tty driver and signal facilities:
<blockquote>
<code>
lib_kernel.c
lib_baudrate.c
lib_raw.c
lib_tstp.c
lib_twait.c
</code>
</blockquote>
If you run into porting snafus
moving the package to another UNIX, the problem is likely to be in one
of these files.
The file <CODE>lib_print.c</CODE> uses sleep(2) and also
falls in this category.<P>
Almost all of the real work is done in the files
<blockquote>
<code>
hardscroll.c
hashmap.c
lib_addch.c
lib_doupdate.c
lib_getch.c
lib_mouse.c
lib_mvcur.c
lib_refresh.c
lib_setup.c
lib_vidattr.c
</code>
</blockquote>
Most of the algorithmic complexity in the
library lives in these files.
If there is a real bug in <STRONG>ncurses</STRONG> itself, it's probably here.
We'll tour some of these files in detail
below (see <A HREF="#engine">The Engine Room</A>). <P>
Finally, there is a group of files that is actually most of the
terminfo compiler. The reason this code lives in the <STRONG>ncurses</STRONG>
library is to support fallback to /etc/termcap. These files include
<blockquote>
<code>
alloc_entry.c
captoinfo.c
comp_captab.c
comp_error.c
comp_hash.c
comp_parse.c
comp_scan.c
parse_entry.c
read_termcap.c
write_entry.c
</code>
</blockquote>
We'll discuss these in the compiler tour.
<H2><A NAME="engine">The Engine Room</A></H2>
<H3><A NAME="input">Keyboard Input</A></H3>
All <CODE>ncurses</CODE> input funnels through the function
<CODE>wgetch()</CODE>, defined in <CODE>lib_getch.c</CODE>. This function is
tricky; it has to poll for keyboard and mouse events and do a running
match of incoming input against the set of defined special keys. <P>
The central data structure in this module is a FIFO queue, used to
match multiple-character input sequences against special-key
capabilities; also to implement pushback via <CODE>ungetch()</CODE>. <P>
The <CODE>wgetch()</CODE> code distinguishes between function key
sequences and the same sequences typed manually by doing a timed wait
after each input character that could lead a function key sequence.
If the entire sequence takes less than 1 second, it is assumed to have
been generated by a function key press. <P>
Hackers bruised by previous encounters with variant <CODE>select(2)</CODE>
calls may find the code in <CODE>lib_twait.c</CODE> interesting. It deals
with the problem that some BSD selects don't return a reliable
time-left value. The function <CODE>timed_wait()</CODE> effectively
simulates a System V select.
<H3><A NAME="mouse">Mouse Events</A></H3>
If the mouse interface is active, <CODE>wgetch()</CODE> polls for mouse
events each call, before it goes to the keyboard for input. It is
up to <CODE>lib_mouse.c</CODE> how the polling is accomplished; it may vary
for different devices. <P>
Under xterm, however, mouse event notifications come in via the keyboard
input stream. They are recognized by having the <STRONG>kmous</STRONG> capability
as a prefix. This is kind of klugey, but trying to wire in recognition of
a mouse key prefix without going through the function-key machinery would
be just too painful, and this turns out to imply having the prefix somewhere
in the function-key capabilities at terminal-type initialization. <P>
This kluge only works because <STRONG>kmous</STRONG> isn't actually used by any
historic terminal type or curses implementation we know of. Best
guess is it's a relic of some forgotten experiment in-house at Bell
Labs that didn't leave any traces in the publicly-distributed System V
terminfo files. If System V or XPG4 ever gets serious about using it
again, this kluge may have to change. <P>
Here are some more details about mouse event handling: <P>
The <CODE>lib_mouse()</CODE>code is logically split into a lower level that
accepts event reports in a device-dependent format and an upper level that
parses mouse gestures and filters events. The mediating data structure is a
circular queue of event structures. <P>
Functionally, the lower level's job is to pick up primitive events and
put them on the circular queue. This can happen in one of two ways:
either (a) <CODE>_nc_mouse_event()</CODE> detects a series of incoming
mouse reports and queues them, or (b) code in <CODE>lib_getch.c</CODE> detects the
<STRONG>kmous</STRONG> prefix in the keyboard input stream and calls _nc_mouse_inline
to queue up a series of adjacent mouse reports. <P>
In either case, <CODE>_nc_mouse_parse()</CODE> should be called after the
series is accepted to parse the digested mouse reports (low-level
events) into a gesture (a high-level or composite event).
<H3><A NAME="output">Output and Screen Updating</A></H3>
With the single exception of character echoes during a <CODE>wgetnstr()</CODE>
call (which simulates cooked-mode line editing in an ncurses window),
the library normally does all its output at refresh time. <P>
The main job is to go from the current state of the screen (as represented
in the <CODE>curscr</CODE> window structure) to the desired new state (as
represented in the <CODE>newscr</CODE> window structure), while doing as
little I/O as possible. <P>
The brains of this operation are the modules <CODE>hashmap.c</CODE>,
<CODE>hardscroll.c</CODE> and <CODE>lib_doupdate.c</CODE>; the latter two use
<CODE>lib_mvcur.c</CODE>. Essentially, what happens looks like this: <P>
The <CODE>hashmap.c</CODE> module tries to detect vertical motion
changes between the real and virtual screens. This information
is represented by the oldindex members in the newscr structure.
These are modified by vertical-motion and clear operations, and both are
re-initialized after each update. To this change-journalling
information, the hashmap code adds deductions made using a modified Heckel
algorithm on hash values generated from the line contents. <P>
The <CODE>hardscroll.c</CODE> module computes an optimum set of scroll,
insertion, and deletion operations to make the indices match. It calls
<CODE>_nc_mvcur_scrolln()</CODE> in <CODE>lib_mvcur.c</CODE> to do those motions. <P>
Then <CODE>lib_doupdate.c</CODE> goes to work. Its job is to do line-by-line
transformations of <CODE>curscr</CODE> lines to <CODE>newscr</CODE> lines. Its main
tool is the routine <CODE>mvcur()</CODE> in <CODE>lib_mvcur.c</CODE>. This routine
does cursor-movement optimization, attempting to get from given screen
location A to given location B in the fewest output characters posible. <P>
If you want to work on screen optimizations, you should use the fact
that (in the trace-enabled version of the library) enabling the
<CODE>TRACE_TIMES</CODE> trace level causes a report to be emitted after
each screen update giving the elapsed time and a count of characters
emitted during the update. You can use this to tell when an update
optimization improves efficiency. <P>
In the trace-enabled version of the library, it is also possible to disable
and re-enable various optimizations at runtime by tweaking the variable
<CODE>_nc_optimize_enable</CODE>. See the file <CODE>include/curses.h.in</CODE>
for mask values, near the end.
<H1><A NAME="fmnote">The Forms and Menu Libraries</A></H1>
The forms and menu libraries should work reliably in any environment you
can port ncurses to. The only portability issue anywhere in them is what
flavor of regular expressions the built-in form field type TYPE_REGEXP
will recognize. <P>
The configuration code prefers the POSIX regex facility, modeled on
System V's, but will settle for BSD regexps if the former isn't available. <P>
Historical note: the panels code was written primarily to assist in
porting u386mon 2.0 (comp.sources.misc v14i001-4) to systems lacking
panels support; u386mon 2.10 and beyond use it. This version has been
slightly cleaned up for <CODE>ncurses</CODE>.
<H1><A NAME="tic">A Tour of the Terminfo Compiler</A></H1>
The <STRONG>ncurses</STRONG> implementation of <STRONG>tic</STRONG> is rather complex
internally; it has to do a trying combination of missions. This starts
with the fact that, in addition to its normal duty of compiling
terminfo sources into loadable terminfo binaries, it has to be able to
handle termcap syntax and compile that too into terminfo entries. <P>
The implementation therefore starts with a table-driven, dual-mode
lexical analyzer (in <CODE>comp_scan.c</CODE>). The lexer chooses its
mode (termcap or terminfo) based on the first `,' or `:' it finds in
each entry. The lexer does all the work of recognizing capability
names and values; the grammar above it is trivial, just "parse entries
till you run out of file".
<H2><A NAME="nonuse">Translation of Non-<STRONG>use</STRONG> Capabilities</A></H2>
Translation of most things besides <STRONG>use</STRONG> capabilities is pretty
straightforward. The lexical analyzer's tokenizer hands each capability
name to a hash function, which drives a table lookup. The table entry
yields an index which is used to look up the token type in another table,
and controls interpretation of the value. <P>
One possibly interesting aspect of the implementation is the way the
compiler tables are initialized. All the tables are generated by various
awk/sed/sh scripts from a master table <CODE>include/Caps</CODE>; these
scripts actually write C initializers which are linked to the compiler.
Furthermore, the hash table is generated in the same way, so it doesn't
have to be generated at compiler startup time (another benefit of this
organization is that the hash table can be in shareable text space). <P>
Thus, adding a new capability is usually pretty trivial, just a matter
of adding one line to the <CODE>include/Caps</CODE> file. We'll have more
to say about this in the section on <A HREF="#translation">Source-Form
Translation</A>.
<H2><A NAME="uses">Use Capability Resolution</A></H2>
The background problem that makes <STRONG>tic</STRONG> tricky isn't the capability
translation itself, it's the resolution of <STRONG>use</STRONG> capabilities. Older
versions would not handle forward <STRONG>use</STRONG> references for this reason
(that is, a using terminal always had to follow its use target in the
source file). By doing this, they got away with a simple implementation
tactic; compile everything as it blows by, then resolve uses from compiled
entries. <P>
This won't do for <STRONG>ncurses</STRONG>. The problem is that that the whole
compilation process has to be embeddable in the <STRONG>ncurses</STRONG> library
so that it can be called by the startup code to translate termcap
entries on the fly. The embedded version can't go promiscuously writing
everything it translates out to disk -- for one thing, it will typically
be running with non-root permissions. <P>
So our <STRONG>tic</STRONG> is designed to parse an entire terminfo file into a
doubly-linked circular list of entry structures in-core, and then do
<STRONG>use</STRONG> resolution in-memory before writing everything out. This
design has other advantages: it makes forward and back use-references
equally easy (so we get the latter for free), and it makes checking for
name collisions before they're written out easy to do. <P>
And this is exactly how the embedded version works. But the stand-alone
user-accessible version of <STRONG>tic</STRONG> partly reverts to the historical
strategy; it writes to disk (not keeping in core) any entry with no
<STRONG>use</STRONG> references. <P>
This is strictly a core-economy kluge, implemented because the
terminfo master file is large enough that some core-poor systems swap
like crazy when you compile it all in memory...there have been reports of
this process taking <STRONG>three hours</STRONG>, rather than the twenty seconds
or less typical on the author's development box. <P>
So. The executable <STRONG>tic</STRONG> passes the entry-parser a hook that
<EM>immediately</EM> writes out the referenced entry if it has no use
capabilities. The compiler main loop refrains from adding the entry
to the in-core list when this hook fires. If some other entry later
needs to reference an entry that got written immediately, that's OK;
the resolution code will fetch it off disk when it can't find it in
core. <P>
Name collisions will still be detected, just not as cleanly. The
<CODE>write_entry()</CODE> code complains before overwriting an entry that
postdates the time of <STRONG>tic</STRONG>'s first call to
<CODE>write_entry()</CODE>, Thus it will complain about overwriting
entries newly made during the <STRONG>tic</STRONG> run, but not about
overwriting ones that predate it.
<H2><A NAME="translation">Source-Form Translation</A></H2>
Another use of <STRONG>tic</STRONG> is to do source translation between various termcap
and terminfo formats. There are more variants out there than you might
think; the ones we know about are described in the <STRONG>captoinfo(1)</STRONG>
manual page. <P>
The translation output code (<CODE>dump_entry()</CODE> in
<CODE>ncurses/dump_entry.c</CODE>) is shared with the <STRONG>infocmp(1)</STRONG>
utility. It takes the same internal representation used to generate
the binary form and dumps it to standard output in a specified
format. <P>
The <CODE>include/Caps</CODE> file has a header comment describing ways you
can specify source translations for nonstandard capabilities just by
altering the master table. It's possible to set up capability aliasing
or tell the compiler to plain ignore a given capability without writing
any C code at all. <P>
For circumstances where you need to do algorithmic translation, there
are functions in <CODE>parse_entry.c</CODE> called after the parse of each
entry that are specifically intended to encapsulate such
translations. This, for example, is where the AIX <STRONG>box1</STRONG> capability
get translated to an <STRONG>acsc</STRONG> string.
<H1><A NAME="utils">Other Utilities</A></H1>
The <STRONG>infocmp</STRONG> utility is just a wrapper around the same
entry-dumping code used by <STRONG>tic</STRONG> for source translation. Perhaps
the one interesting aspect of the code is the use of a predicate
function passed in to <CODE>dump_entry()</CODE> to control which
capabilities are dumped. This is necessary in order to handle both
the ordinary De-compilation case and entry difference reporting. <P>
The <STRONG>tput</STRONG> and <STRONG>clear</STRONG> utilities just do an entry load
followed by a <CODE>tputs()</CODE> of a selected capability.
<H1><A NAME="style">Style Tips for Developers</A></H1>
See the TO-DO file in the top-level directory of the source distribution
for additions that would be particularly useful. <P>
The prefix <CODE>_nc_</CODE> should be used on library public functions that are
not part of the curses API in order to prevent pollution of the
application namespace.
If you have to add to or modify the function prototypes in curses.h.in,
read ncurses/MKlib_gen.sh first so you can avoid breaking XSI conformance.
Please join the ncurses mailing list. See the INSTALL file in the
top level of the distribution for details on the list. <P>
Look for the string <CODE>FIXME</CODE> in source files to tag minor bugs
and potential problems that could use fixing. <P>
Don't try to auto-detect OS features in the main body of the C code.
That's the job of the configuration system. <P>
To hold down complexity, do make your code data-driven. Especially,
if you can drive logic from a table filtered out of
<CODE>include/Caps</CODE>, do it. If you find you need to augment the
data in that file in order to generate the proper table, that's still
preferable to ad-hoc code -- that's why the fifth field (flags) is
there. <P>
Have fun!
<H1><A NAME="port">Porting Hints</A></H1>
The following notes are intended to be a first step towards DOS and Macintosh
ports of the ncurses libraries. <P>
The following library modules are `pure curses'; they operate only on
the curses internal structures, do all output through other curses
calls (not including <CODE>tputs()</CODE> and <CODE>putp()</CODE>) and do not
call any other UNIX routines such as signal(2) or the stdio library.
Thus, they should not need to be modified for single-terminal
ports.
<blockquote>
<code>
lib_addch.c
lib_addstr.c
lib_bkgd.c
lib_box.c
lib_clear.c
lib_clrbot.c
lib_clreol.c
lib_delch.c
lib_delwin.c
lib_erase.c
lib_inchstr.c
lib_insch.c
lib_insdel.c
lib_insstr.c
lib_keyname.c
lib_move.c
lib_mvwin.c
lib_newwin.c
lib_overlay.c
lib_pad.c
lib_printw.c
lib_refresh.c
lib_scanw.c
lib_scroll.c
lib_scrreg.c
lib_set_term.c
lib_touch.c
lib_tparm.c
lib_tputs.c
lib_unctrl.c
lib_window.c
panel.c
</code>
</blockquote>
<P>
This module is pure curses, but calls outstr():
<blockquote>
<code>
lib_getstr.c
</code>
</blockquote>
<P>
These modules are pure curses, except that they use <CODE>tputs()</CODE>
and <CODE>putp()</CODE>:
<blockquote>
<code>
lib_beep.c
lib_color.c
lib_endwin.c
lib_options.c
lib_slk.c
lib_vidattr.c
</code>
</blockquote>
<P>
This modules assist in POSIX emulation on non-POSIX systems:
<DL>
<DT> sigaction.c
<DD> signal calls
</DL>
The following source files will not be needed for a
single-terminal-type port.
<blockquote>
<code>
alloc_entry.c
captoinfo.c
clear.c
comp_captab.c
comp_error.c
comp_hash.c
comp_main.c
comp_parse.c
comp_scan.c
dump_entry.c
infocmp.c
parse_entry.c
read_entry.c
tput.c
write_entry.c
</code>
</blockquote>
<P>
The following modules will use open()/read()/write()/close()/lseek() on files,
but no other OS calls.
<DL>
<DT>lib_screen.c
<DD>used to read/write screen dumps
<DT>lib_trace.c
<DD>used to write trace data to the logfile
</DL>
Modules that would have to be modified for a port start here: <P>
The following modules are `pure curses' but contain assumptions inappropriate
for a memory-mapped port.
<dl>
<dt>lib_longname.c<dd>assumes there may be multiple terminals
<dt>lib_acs.c<dd>assumes acs_map as a double indirection
<dt>lib_mvcur.c<dd>assumes cursor moves have variable cost
<dt>lib_termcap.c<dd>assumes there may be multiple terminals
<dt>lib_ti.c<dd>assumes there may be multiple terminals
</dl>
The following modules use UNIX-specific calls:
<dl>
<dt>lib_doupdate.c<dd>input checking
<dt>lib_getch.c<dd>read()
<dt>lib_initscr.c<dd>getenv()
<dt>lib_newterm.c
<dt>lib_baudrate.c
<dt>lib_kernel.c<dd>various tty-manipulation and system calls
<dt>lib_raw.c<dd>various tty-manipulation calls
<dt>lib_setup.c<dd>various tty-manipulation calls
<dt>lib_restart.c<dd>various tty-manipulation calls
<dt>lib_tstp.c<dd>signal-manipulation calls
<dt>lib_twait.c<dd>gettimeofday(), select().
</dl>
<HR>
<ADDRESS>Eric S. Raymond &lt;esr@snark.thyrsus.com&gt;</ADDRESS>
(Note: This is <EM>not</EM> the <A HREF="#bugtrack">bug address</A>!)
</BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.25 1998/04/04 00:49:55 tom Exp $
# $Id: Makefile.in,v 1.28 2000/05/28 01:40:18 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"), #
@ -64,6 +64,7 @@ LD = @LD@
LN_S = @LN_S@
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ \
@ -82,7 +83,7 @@ LINK = $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib -L$(libdir)
SHLIB_LIST = $(SHLIB_DIRS) -lncurses @SHLIB_LIST@
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
@ -102,6 +103,7 @@ AUTO_SRC = \
################################################################################
all \
libs \
install :: $(AUTO_SRC) $(LIBRARIES)
sources : $(AUTO_SRC)

View File

@ -13,7 +13,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_enum.c,v 1.10 1999/05/16 17:23:14 juergen Exp $")
MODULE_ID("$Id: fty_enum.c,v 1.11 2000/03/19 01:09:56 Bruno.Haible Exp $")
typedef struct {
char **kwds;
@ -225,7 +225,7 @@ static bool Next_Enum(FIELD * field, const void * argp)
}
if (cnt<=0)
kwds = args->kwds;
if ((cnt>=0) || (Compare((unsigned char *)dummy,bp,ccase)==EXACT))
if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
{
set_field_buffer(field,0,*kwds);
return TRUE;
@ -261,7 +261,7 @@ static bool Previous_Enum(FIELD * field, const void * argp)
if (cnt<=0)
kwds = &args->kwds[args->count-1];
if ((cnt>=0) || (Compare((unsigned char *)dummy,bp,ccase)==EXACT))
if ((cnt>=0) || (Compare((const unsigned char *)dummy,bp,ccase)==EXACT))
{
set_field_buffer(field,0,*kwds);
return TRUE;

View File

@ -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.24 1999/01/17 02:01:44 tom Exp $
# $Id: Caps,v 1.25 1999/11/27 20:13:55 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@ -215,7 +215,7 @@ eat_newline_glitch xenl bool xn YBCGE newline ignored after 80 cols (concept)
erase_overstrike eo bool eo YBCG- can erase overstrikes with a blank
generic_type gn bool gn YB-G- generic line type
hard_copy hc bool hc YBCG- hardcopy terminal
has_meta_key km bool km YB-GE Has a meta key (shift, sets parity bit)
has_meta_key km bool km YB-GE Has a meta key (i.e., sets 8th-bit)
has_status_line hs bool hs YB-G- has extra status line
insert_null_glitch in bool in YBCGE insert mode distinguishes nulls
memory_above da bool da YBCG- display may be retained above the screen

View File

@ -1,7 +1,7 @@
BEGIN {
print "/****************************************************************************"
print " * Copyright (c) 1998 Free Software Foundation, Inc. *"
print " * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *"
print " * *"
print " * Permission is hereby granted, free of charge, to any person obtaining a *"
print " * copy of this software and associated documentation files (the *"
@ -33,7 +33,7 @@ BEGIN {
print "/* and: Eric S. Raymond <esr@snark.thyrsus.com> */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.36 1999/09/01 22:36:52 Peter.Wemm Exp $ */"
print "/* $Id: MKterm.h.awk.in,v 1.37 2000/03/12 02:40:07 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@ -174,6 +174,8 @@ $2 == "%%-STOP-HERE-%%" {
/^#/ {next;}
$1 == "acs_chars" {acsindex = StringCount}
$3 == "bool" {
printf "#define %-30s CUR Booleans[%d]\n", $1, BoolCount++
}
@ -197,6 +199,9 @@ END {
printf "#define NUMCOUNT %d\n", NumberCount
printf "#define STRCOUNT %d\n", StringCount
print ""
print "/* used by code for comparing entries */"
print "#define acs_chars_index ", acsindex
print ""
print "typedef struct termtype { /* in-core form of terminfo data */"
print " char *term_names; /* str_table offset of term names */"
print " char *str_table; /* pointer to string table */"

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.22 1998/02/11 12:13:46 tom Exp $
# $Id: Makefile.in,v 1.23 2000/05/28 01:33:52 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@ -71,6 +71,7 @@ AUTO_SRC = \
################################################################################
all \
libs \
sources \
install :: $(AUTO_SRC)

View File

@ -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,57 +31,54 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: capdefaults.c,v 1.8 1998/07/04 22:31:04 tom Exp $ */
/* $Id: capdefaults.c,v 1.12 2000/01/02 02:34:56 tom Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file
* is that the two places where it's needed want the macros to
* generate offsets to different structures. See the file Caps for
* explanations of these conversions.
*
* Note: This code is the functional inverse of the first part
* of postprocess_entry().
*/
{
char *sp;
int capval;
/*
* Compute obsolete capabilities. The reason this is an include file is
* that the two places where it's needed want the macros to generate
* offsets to different structures. See the file Caps for explanations of
* these conversions.
*
* Note: This code is the functional inverse of the first part of
* postprocess_termcap().
*/
{
char *sp;
int capval;
#define EXTRACT_DELAY(str) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0)
/* current (4.4BSD) capabilities marked obsolete */
if (VALID_STRING(carriage_return)
&& (capval = EXTRACT_DELAY(carriage_return)))
carriage_return_delay = capval;
if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline)))
new_line_delay = capval;
/* current (4.4BSD) capabilities marked obsolete */
if (VALID_STRING(carriage_return)
&& (capval = EXTRACT_DELAY(carriage_return)))
carriage_return_delay = capval;
if (VALID_STRING(newline) && (capval = EXTRACT_DELAY(newline)))
new_line_delay = capval;
/* current (4.4BSD) capabilities not obsolete */
if (!VALID_STRING(termcap_init2) && VALID_STRING(init_3string))
{
termcap_init2 = init_3string;
init_3string = (char *)0;
}
if (VALID_STRING(reset_1string)
&& !VALID_STRING(reset_2string)
&& VALID_STRING(reset_3string))
{
termcap_reset = reset_2string;
reset_2string = (char *)0;
}
#if USE_XMC_SUPPORT
if (magic_cookie_glitch_ul < 0 && magic_cookie_glitch && VALID_STRING(enter_underline_mode))
magic_cookie_glitch_ul = magic_cookie_glitch;
#else
magic_cookie_glitch_ul = -1;
#endif
/* current (4.4BSD) capabilities not obsolete */
if (!VALID_STRING(termcap_init2) && VALID_STRING(init_3string)) {
termcap_init2 = init_3string;
init_3string = ABSENT_STRING;
}
if (!VALID_STRING(termcap_reset)
&& VALID_STRING(reset_2string)
&& !VALID_STRING(reset_1string)
&& !VALID_STRING(reset_3string)) {
termcap_reset = reset_2string;
reset_2string = ABSENT_STRING;
}
if (magic_cookie_glitch_ul == ABSENT_NUMERIC
&& magic_cookie_glitch != ABSENT_NUMERIC
&& VALID_STRING(enter_underline_mode))
magic_cookie_glitch_ul = magic_cookie_glitch;
/* totally obsolete capabilities */
linefeed_is_newline = VALID_STRING(newline)
&& (strcmp("\n", newline) == 0);
if (VALID_STRING(cursor_left)
&& (capval = EXTRACT_DELAY(cursor_left)))
backspace_delay = capval;
if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab)))
horizontal_tab_delay = capval;
/* totally obsolete capabilities */
linefeed_is_newline = VALID_STRING(newline)
&& (strcmp("\n", newline) == 0);
if (VALID_STRING(cursor_left)
&& (capval = EXTRACT_DELAY(cursor_left)))
backspace_delay = capval;
if (VALID_STRING(tab) && (capval = EXTRACT_DELAY(tab)))
horizontal_tab_delay = capval;
#undef EXTRACT_DELAY
}
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: curses.h.in,v 1.85 1999/10/23 12:33:54 tom Exp $ */
/* $Id: curses.h.in,v 1.92 2000/04/29 18:52:53 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -65,6 +65,12 @@
#undef NCURSES_CONST
#define NCURSES_CONST @NCURSES_CONST@
#undef NCURSES_COLOR_T
#define NCURSES_COLOR_T short
#undef NCURSES_SIZE_T
#define NCURSES_SIZE_T short
typedef unsigned @cf_cv_typeof_chtype@ chtype;
#include <stdio.h>
@ -245,18 +251,18 @@ cchar_t;
struct ldat
{
chtype *text; /* text of the line */
short firstchar; /* first changed character in the line */
short lastchar; /* last changed character in the line */
short oldindex; /* index of the line at last update */
NCURSES_SIZE_T firstchar; /* first changed character in the line */
NCURSES_SIZE_T lastchar; /* last changed character in the line */
NCURSES_SIZE_T oldindex; /* index of the line at last update */
};
struct _win_st
{
short _cury, _curx; /* current cursor position */
NCURSES_SIZE_T _cury, _curx; /* current cursor position */
/* window location and size */
short _maxy, _maxx; /* maximums of x and y, NOT window size */
short _begy, _begx; /* screen coords of upper-left-hand corner */
NCURSES_SIZE_T _maxy, _maxx; /* maximums of x and y, NOT window size */
NCURSES_SIZE_T _begy, _begx; /* screen coords of upper-left-hand corner */
short _flags; /* window state flags */
@ -279,8 +285,8 @@ struct _win_st
struct ldat *_line; /* the actual line data */
/* global screen state */
short _regtop; /* top line of scrolling region */
short _regbottom; /* bottom line of scrolling region */
NCURSES_SIZE_T _regtop; /* top line of scrolling region */
NCURSES_SIZE_T _regbottom; /* bottom line of scrolling region */
/* these are used only if this is a sub-window */
int _parx; /* x coordinate of this window in parent */
@ -290,12 +296,12 @@ struct _win_st
/* these are used only if this is a pad */
struct pdat
{
short _pad_y, _pad_x;
short _pad_top, _pad_left;
short _pad_bottom, _pad_right;
NCURSES_SIZE_T _pad_y, _pad_x;
NCURSES_SIZE_T _pad_top, _pad_left;
NCURSES_SIZE_T _pad_bottom, _pad_right;
} _pad;
short _yoffset; /* real begy is _begy + _yoffset */
NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
};
extern WINDOW *stdscr;
@ -311,8 +317,14 @@ extern int TABSIZE;
*/
extern int ESCDELAY; /* ESC expire time in milliseconds */
extern char ttytype[]; /* needed for backward compatibility */
/*
* These functions are extensions - not in XSI Curses.
*/
extern char *keybound (int, int);
extern const char *curses_version (void);
extern int assume_default_colors (int, int);
extern int define_key (char *, int);
extern int keyok (int, bool);
extern int resizeterm (int, int);
@ -320,8 +332,6 @@ extern int use_default_colors (void);
extern int use_extended_names (bool);
extern int wresize (WINDOW *, int, int);
extern char ttytype[]; /* needed for backward compatibility */
/*
* GCC (and some other compilers) define '__attribute__'; we're using this
* macro to alert the compiler to flag inconsistencies in printf/scanf-like
@ -433,6 +443,7 @@ extern int doupdate(void); /* implemented */
extern WINDOW *dupwin(WINDOW *); /* implemented */
extern int echo(void); /* implemented */
extern int echochar(const chtype); /* generated */
extern int erase(void); /* generated */
#ifdef _XOPEN_SOURCE_EXTENDED
extern int echo_wchar(const cchar_t *); /* missing */
extern int erasewchar(wchar_t*); /* missing */
@ -945,7 +956,7 @@ extern bool mouse_trafo(int*, int*, bool); /* generated */
#define winchstr(w, s) winchnstr(w, s, -1)
#define winsstr(w, s) winsnstr(w, s, -1)
#define redrawwin(w) wredrawln(w, 0, w->_maxy+1)
#define redrawwin(win) wredrawln(win, 0, (win)->_maxy+1)
#define waddstr(win,str) waddnstr(win,str,-1)
#define waddchstr(win,str) waddchnstr(win,str,-1)
@ -1313,7 +1324,6 @@ extern char *_tracechar(const unsigned char);
extern char *_tracechtype(chtype);
extern char *_tracechtype2(int, chtype);
extern char *_tracemouse(const MEVENT *);
#define trace _nc_trace
extern void trace(const unsigned int);
/* trace masks */
@ -1330,6 +1340,7 @@ extern void trace(const unsigned int);
#define TRACE_BITS 0x0100 /* trace state of TTY control bits */
#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_MAXIMUM 0xffff /* maximum trace level */
#if defined(TRACE) || defined(NCURSES_TEST)
@ -1342,6 +1353,14 @@ extern const char *_nc_visbuf(const char *);
#endif
#ifdef __cplusplus
/* these names conflict with STL */
#undef box
#undef clear
#undef erase
#undef move
#undef refresh
}
#endif

View File

@ -29,7 +29,7 @@
/****************************************************************************
* Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.7 1999/04/03 23:15:13 tom Exp $ */
/* $Id: nc_alloc.h,v 1.8 2000/04/08 23:42:57 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@ -69,4 +69,15 @@ extern void _nc_leaks_dump_entry(void);
#define ExitProgram(code) return code
#endif
/* doalloc.c */
extern void *_nc_doalloc(void *, size_t);
#if !HAVE_STRDUP
#define strdup _nc_strdup
extern char *_nc_strdup(const char *);
#endif
#define typeMalloc(type,elts) (type *)malloc((elts)*sizeof(type))
#define typeCalloc(type,elts) (type *)calloc((elts),sizeof(type))
#define typeRealloc(type,elts,ptr) (type *)_nc_doalloc(ptr, (elts)*sizeof(type))
#endif /* NC_ALLOC_included */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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,6 +31,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/* $Id: term_entry.h,v 1.29 2000/03/19 02:04:15 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@ -46,16 +47,20 @@ extern "C" {
#include <term.h>
#define MAX_USES 32
#define MAX_CROSSLINKS 16
typedef struct entry {
TERMTYPE tterm;
int nuses;
struct
{
void *parent; /* (char *) or (ENTRY *) */
char *name;
struct entry *link;
long line;
}
uses[MAX_USES];
int ncrosslinks;
struct entry *crosslinks[MAX_CROSSLINKS];
long cstart, cend;
long startline;
struct entry *next;
@ -130,6 +135,7 @@ extern void _nc_init_acs(void); /* corresponds to traditional 'init_acs()' */
/* parse_entry.c: entry-parsing code */
#if NCURSES_XNAMES
extern bool _nc_user_definable;
extern bool _nc_disable_period;
#endif
extern int _nc_parse_entry(ENTRY *, int, bool);
extern int _nc_capcmp(const char *, const char *);
@ -141,7 +147,7 @@ extern void _nc_write_entry(TERMTYPE *const);
/* comp_parse.c: entry list handling */
extern void _nc_read_entry_source(FILE*, char*, int, bool, bool (*)(ENTRY*));
extern bool _nc_entry_match(char *, char *);
extern int _nc_resolve_uses(void);
extern int _nc_resolve_uses(bool);
extern void _nc_free_entries(ENTRY *);
extern void (*_nc_check_termtype)(TERMTYPE *);

View File

@ -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 *
@ -97,8 +97,21 @@ extern "C" {
/* location of user's personal info directory */
#define PRIVATE_INFO "%s/.terminfo" /* plug getenv("HOME") into %s */
/*
* Some traces are designed to be used via tic's verbose option (and similar in
* infocmp and toe) rather than the 'trace()' function. So we use the bits
* above the normal trace() parameter as a debug-level.
*/
#define MAX_DEBUG_LEVEL 15
#define DEBUG_LEVEL(n) ((n) << 12) /* see TRACE_MAXIMUM */
#define set_trace_level(n) \
_nc_tracing &= DEBUG_LEVEL(MAX_DEBUG_LEVEL), \
_nc_tracing |= DEBUG_LEVEL(n)
#ifdef TRACE
#define DEBUG(n, a) if (_nc_tracing & (1 << (n - 1))) _tracef a
#define DEBUG(n, a) if (_nc_tracing >= DEBUG_LEVEL(n)) _tracef a
#else
#define DEBUG(n, a) /*nothing*/
#endif
@ -157,7 +170,7 @@ struct tinfo_fkeys {
chtype code;
};
#ifdef BROKEN_LINKER
#if BROKEN_LINKER
#define _nc_tinfo_fkeys _nc_tinfo_fkeysf()
extern struct tinfo_fkeys *_nc_tinfo_fkeysf(void);
@ -258,7 +271,7 @@ extern bool _nc_suppress_warnings;
extern char *_nc_tic_expand(const char *, bool, int);
/* comp_scan.c: decode string from readable form */
extern char _nc_trans_string(char *);
extern char _nc_trans_string(char *, char *);
/* captoinfo.c: capability conversion */
extern char *_nc_captoinfo(const char *, const char *, int const);

View File

@ -1,15 +1,27 @@
#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
#
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
@ -29,7 +41,7 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
tranformbasename=""
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"

View File

@ -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 *
@ -27,7 +27,7 @@
# authorization. *
#***************************************************************************
#
# $Id: MKterminfo.sh,v 1.5 1998/09/06 00:20:01 tom Exp $
# $Id: MKterminfo.sh,v 1.6 2000/01/25 11:31:57 tom Exp $
#
# MKterminfo.sh -- generate terminfo.5 from Caps tabular data
#
@ -40,6 +40,12 @@
#  to \n because I couldn't get used to inserting linefeeds directly. There
# had better be no s in the table source text.
#
# keep the order independent of locale:
LANGUAGE=C
LC_ALL=C
export LANGUAGE
export LC_ALL
#
head=$1
caps=$2
tail=$3

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.25 1998/02/11 12:13:49 tom Exp $
# $Id: Makefile.in,v 1.26 2000/04/01 22:15:22 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@ -54,11 +54,13 @@ sources: terminfo.5
$(INSTALL_PREFIX)$(mandir) :
$(srcdir)/../mkinstalldirs $@
EDITARGS = $(INSTALL_PREFIX)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
install install.man : terminfo.5 $(INSTALL_PREFIX)$(mandir)
sh ./edit_man.sh installing $(INSTALL_PREFIX)$(mandir) terminfo.5 $(srcdir)/*.[0-9]*
sh ./edit_man.sh installing $(EDITARGS)
uninstall uninstall.man :
-sh ./edit_man.sh removing $(INSTALL_PREFIX)$(mandir) terminfo.5 $(srcdir)/*.[0-9]*
-sh ./edit_man.sh removing $(EDITARGS)
# We compose terminfo.5 from the real sources...
CAPLIST=$(srcdir)/../include/Caps

View File

@ -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: captoinfo.1m,v 1.13 1998/12/26 19:57:11 tom Exp $
.\" $Id: captoinfo.1m,v 1.14 2000/03/19 02:20:28 tom Exp $
.TH captoinfo 1M ""
.ds n 5
.ds d @DATADIR@/terminfo
@ -173,6 +173,7 @@ capabilities \fBmeml\fR (memory lock) and \fBmemu\fR (memory unlock).
These will be discarded with a warning message.
.SH NOTES
This utility is actually a link to \fItic\fR(1M), running in \fI-I\fR mode.
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.

View File

@ -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: curs_addch.3x,v 1.16 1999/02/07 03:47:42 tom Exp $
.\" $Id: curs_addch.3x,v 1.17 2000/07/01 19:53:01 tom Exp $
.TH curs_addch 3X ""
.SH NAME
\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR,
\fBechochar\fR, \fBwechochar\fR - add a character (with attributes) to a
\fBcurses\fR window, then advance the cursor
\fBechochar\fR,
\fBwechochar\fR - add a character (with attributes) to a \fBcurses\fR window, then advance the cursor
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addchstr.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_addchstr.3x,v 1.7 2000/07/01 19:53:33 tom Exp $
.TH curs_addchstr 3X ""
.SH NAME
\fBaddchstr\fR, \fBaddchnstr\fR, \fBwaddchstr\fR,
\fBwaddchnstr\fR, \fBmvaddchstr\fR, \fBmvaddchnstr\fR, \fBmvwaddchstr\fR,
\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a
\fBcurses\fR window
\fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addstr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_addstr.3x,v 1.9 2000/07/01 19:54:05 tom Exp $
.TH curs_addstr 3X ""
.SH NAME
\fBaddstr\fR, \fBaddnstr\fR, \fBwaddstr\fR, \fBwaddnstr\fR,
\fBmvaddstr\fR, \fBmvaddnstr\fR, \fBmvwaddstr\fR, \fBmvwaddnstr\fR - add a
string of characters to a \fBcurses\fR window and advance cursor
\fBaddstr\fR,
\fBaddnstr\fR,
\fBwaddstr\fR,
\fBwaddnstr\fR,
\fBmvaddstr\fR,
\fBmvaddnstr\fR,
\fBmvwaddstr\fR,
\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,13 +27,18 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_attr.3x,v 1.19 1998/12/26 19:25:35 tom Exp $
.\" $Id: curs_attr.3x,v 1.21 2000/07/01 16:50:07 tom Exp $
.TH curs_attr 3X ""
.SH NAME
\fBattroff\fR, \fBwattroff\fR, \fBattron\fR, \fBwattron\fR,
\fBattrset\fR, \fBwattrset\fR, \fBcolor_set\fR, \fBwcolor_set\fR,
\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR,
\fBwstandout\fR - \fBcurses\fR character and window attribute control routines
\fBstandend\fR, \fBwstandend\fR, \fBstandout\fR, \fBwstandout\fR,
\fBattr_get\fR, \fBwattr_get\fR,
\fBattr_off\fR, \fBwattr_off\fR,
\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
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br
@ -75,9 +80,9 @@
.br
\fBint wattr_on(WINDOW *win, attr_t attrs, void *opts);\fR
.br
\fBint attr_set(attr_t attrs, void *opts);\fR
\fBint attr_set(attr_t attrs, short pair, void *opts);\fR
.br
\fBint wattr_set(WINDOW *win, attr_t attrs, void *opts);\fR
\fBint wattr_set(WINDOW *win, attr_t attrs, short pair, void *opts);\fR
.br
\fBint chgat(int n, attr_t attr, short color,\fR
\fBconst void *opts)\fR

View File

@ -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,11 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_bkgd.3x,v 1.12 1998/03/14 23:43:31 tom Exp $
.\" $Id: curs_bkgd.3x,v 1.14 2000/07/01 17:39:31 tom Exp $
.TH curs_bkgd 3X ""
.SH NAME
\fBbkgdset\fR, \fBwbkgdset\fR, \fBbkgd\fR,
\fBwbkgd\fR - \fBcurses\fR window background manipulation routines
\fBbkgdset\fR, \fBwbkgdset\fR,
\fBbkgd\fR, \fBwbkgd\fR,
\fBgetbkgd\fR - \fBcurses\fR window background manipulation routines
..
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_border.3x,v 1.11 1999/01/30 23:11:47 tom Exp $
.\" $Id: curs_border.3x,v 1.14 2000/07/01 19:54:58 tom Exp $
.TH curs_border 3X ""
.SH NAME
\fBborder\fR, \fBwborder\fR, \fBbox\fR,
\fBhline\fR, \fBwhline\fR, \fBvline\fR, \fBwvline\fR - create
\fBcurses\fR borders, horizontal and vertical lines
\fBhline\fR, \fBwhline\fR,
\fBvline\fR, \fBwvline\fR,
\fBmvhline\fR, \fBmvwhline\fR,
\fBmvvline\fR, \fBmvwvline\fR - create \fBcurses\fR borders, horizontal and vertical lines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br

View File

@ -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,11 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_delch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_delch.3x,v 1.7 2000/07/01 19:55:37 tom Exp $
.TH curs_delch 3X ""
.SH NAME
\fBdelch\fR, \fBwdelch\fR, \fBmvdelch\fR, \fBmvwdelch\fR -
delete character under the cursor in a \fBcurses\fR window
\fBdelch\fR,
\fBwdelch\fR,
\fBmvdelch\fR,
\fBmvwdelch\fR - delete character under the cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_deleteln.3x,v 1.5 1999/02/07 03:58:20 tom Exp $
.\" $Id: curs_deleteln.3x,v 1.6 2000/07/01 19:56:12 tom Exp $
.TH curs_deleteln 3X ""
.SH NAME
\fBdeleteln\fR, \fBwdeleteln\fR, \fBinsdelln\fR,
\fBwinsdelln\fR, \fBinsertln\fR, \fBwinsertln\fR - delete and insert
lines in a \fBcurses\fR window
\fBdeleteln\fR,
\fBwdeleteln\fR,
\fBinsdelln\fR,
\fBwinsdelln\fR,
\fBinsertln\fR,
\fBwinsertln\fR - delete and insert lines in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -0,0 +1,89 @@
.\"***************************************************************************
.\" 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 *
.\" "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> 1999
.\"
.\" $Id: curs_extend.3x,v 1.4 2000/07/01 16:43:11 tom Exp $
.TH use_default_colors 3X ""
.SH NAME
\fBcurs_extend\fR:
\fBcurses_version\fP,
\fBuse_extended_names\fP \- miscellaneous curses extensions
..
.SH SYNOPSIS
\fB#include <curses.h>\fP
\fBconst char * curses_version(void);\fP
.br
\fBint use_extended_names(bool enable);\fP
..
.SH DESCRIPTION
These functions are extensions to the curses library
which do not fit easily into other categories.
.PP
Use
.I curses_version()
to get the version number, including patch level of the library, e.g.,
.B 5.0.19991023
.PP
The
.I use_extended_names()
function controls whether the calling application
is able to use user-defined or nonstandard names
which may be compiled into the terminfo
description, i.e., via the terminfo or termcap interfaces.
Normally these names are available for use, since the essential descision
is made by using the \fB-x\fP option of \fItic\fP to compile
extended terminal definitions.
However you can disable this feature
to ensure compatiblity with other implementations of curses
..
.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_getch\fR(3X),
\fBcurs_mouse\fR(3X),
\fBcurs_print\fR(3X),
\fBdefine_key\fR(3X),
\fBdft_fgbg\fR(3X),
\fBkeybound\fR(3X),
\fBkeyok\fR(3X),
\fBresizeterm\fR(3X),
\fBwresize\fR(3X).
..
.SH AUTHOR
Thomas Dickey.
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_getch.3x,v 1.15 1998/11/29 01:04:26 Rick.Ohnemus Exp $
.\" $Id: curs_getch.3x,v 1.17 2000/07/01 16:45:36 tom Exp $
.TH curs_getch 3X ""
.SH NAME
\fBgetch\fR, \fBwgetch\fR, \fBmvgetch\fR,
\fBmvwgetch\fR, \fBungetch\fR - get (or push back) characters from
\fBcurses\fR terminal keyboard
\fBgetch\fR,
\fBwgetch\fR,
\fBmvgetch\fR,
\fBmvwgetch\fR,
\fBungetch\fR,
\fBhas_key\fR \- get (or push back) characters from \fBcurses\fR terminal keyboard
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -57,7 +60,7 @@ this is after one character (cbreak mode), or after the first newline (nocbreak
mode). In half-delay mode, the program waits until a character is typed or the
specified timeout has been reached.
If \fBnoecho\fR has been set, then the character will also be echoed into the
Unless \fBnoecho\fR has been set, then the character will also be echoed into the
designated window according to the following rules:
If the character is the current erase character, left arrow, or backspace,
the cursor is moved one space to the left and that screen position is erased

View File

@ -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,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_getstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_getstr.3x,v 1.9 2000/07/01 17:39:31 tom Exp $
.TH curs_getstr 3X ""
.SH NAME
\fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR,
\fBmvwgetstr\fR, \fBwgetnstr\fR - accept character strings from
\fBcurses\fR terminal keyboard
\fBgetstr\fR,
\fBgetnstr\fR,
\fBwgetstr\fR,
\fBwgetnstr\fR,
\fBmvgetstr\fR,
\fBmvgetnstr\fR,
\fBmvwgetstr\fR,
\fBmvwgetnstr\fR - accept character strings from \fBcurses\fR terminal keyboard
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -41,6 +46,8 @@
.br
\fBint wgetstr(WINDOW *win, char *str);\fR
.br
\fBint wgetnstr(WINDOW *win, char *str, int n);\fR
.br
\fBint mvgetstr(int y, int x, char *str);\fR
.br
\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR
@ -49,8 +56,6 @@
.br
\fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR
.br
\fBint wgetnstr(WINDOW *win, char *str, int n);\fR
.br
.SH DESCRIPTION
The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR,
until a newline or carriage return is received (the terminating character is

View File

@ -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_inchstr.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_inchstr.3x,v 1.8 2000/07/01 20:16:18 tom Exp $
.TH curs_inchstr 3X ""
.SH NAME
\fBinchstr\fR, \fBinchnstr\fR, \fBwinchstr\fR,
\fBwinchnstr\fR, \fBmvinchstr\fR, \fBmvinchnstr\fR, \fBmvwinchstr\fR,
\fBmvwinchnstr\fR - get a string of characters (and attributes) from a
\fBcurses\fR window
\fBinchstr\fR,
\fBinchnstr\fR,
\fBwinchstr\fR,
\fBwinchnstr\fR,
\fBmvinchstr\fR,
\fBmvinchnstr\fR,
\fBmvwinchstr\fR,
\fBmvwinchnstr\fR - get a string of characters (and attributes) from a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_initscr.3x,v 1.8 1999/09/18 23:52:30 tom Exp $
.\" $Id: curs_initscr.3x,v 1.9 2000/07/01 19:56:51 tom Exp $
.TH curs_initscr 3X ""
.SH NAME
\fBinitscr\fR, \fBnewterm\fR, \fBendwin\fR,
\fBisendwin\fR, \fBset_term\fR, \fBdelscreen\fR - \fBcurses\fR screen
initialization and manipulation routines
\fBinitscr\fR,
\fBnewterm\fR,
\fBendwin\fR,
\fBisendwin\fR,
\fBset_term\fR,
\fBdelscreen\fR - \fBcurses\fR screen initialization and manipulation routines
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,11 +26,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_insch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_insch.3x,v 1.7 2000/07/01 19:57:21 tom Exp $
.TH curs_insch 3X ""
.SH NAME
\fBinsch\fR, \fBwinsch\fR, \fBmvinsch\fR, \fBmvwinsch\fR -
insert a character before cursor in a \fBcurses\fR window
\fBinsch\fR,
\fBwinsch\fR,
\fBmvinsch\fR,
\fBmvwinsch\fR - insert a character before cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_insstr.3x,v 1.10 1998/07/25 20:32:57 Todd.Miller Exp $
.\" $Id: curs_insstr.3x,v 1.11 2000/07/01 19:57:49 tom Exp $
.TH curs_insstr 3X ""
.SH NAME
\fBinsstr\fR, \fBinsnstr\fR, \fBwinsstr\fR, \fBwinsnstr\fR,
\fBmvinsstr\fR, \fBmvinsnstr\fR, \fBmvwinsstr\fR, \fBmvwinsnstr\fR - insert
string before cursor in a \fBcurses\fR window
\fBinsstr\fR,
\fBinsnstr\fR,
\fBwinsstr\fR,
\fBwinsnstr\fR,
\fBmvinsstr\fR,
\fBmvinsnstr\fR,
\fBmvwinsstr\fR,
\fBmvwinsnstr\fR - insert string before cursor in a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br

View File

@ -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,17 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_instr.3x,v 1.8 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_instr.3x,v 1.9 2000/07/01 20:05:03 tom Exp $
.TH curs_instr 3X ""
.SH NAME
\fBinstr\fR, \fBinnstr\fR, \fBwinstr\fR, \fBwinnstr\fR,
\fBmvinstr\fR, \fBmvinnstr\fR, \fBmvwinstr\fR, \fBmvwinnstr\fR - get a string
of characters from a \fBcurses\fR window
\fBinstr\fR,
\fBinnstr\fR,
\fBwinstr\fR,
\fBwinnstr\fR,
\fBmvinstr\fR,
\fBmvinnstr\fR,
\fBmvwinstr\fR,
\fBmvwinnstr\fR - get a string of characters from a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_kernel.3x,v 1.11 1998/06/27 21:56:38 tom Exp $
.\" $Id: curs_kernel.3x,v 1.12 2000/02/27 01:37:46 tom Exp $
.TH curs_kernel 3X ""
.SH NAME
\fBdef_prog_mode\fR, \fBdef_shell_mode\fR,
@ -134,6 +134,13 @@ the variables \fIy\fR and \fIx\fR.
Older SVr4 man pages warn that the return value of \fBcurs_set\fR "is currently
incorrect". This implementation gets it right, but it may be unwise to count
on the correctness of the return value anywhere else.
Both ncurses and SVr4 will call \fBcurs_set\fR in \fBendwin\fR
if \fBcurs_set\fR
has been called to make the cursor other than normal, i.e., either
visible or very visible.
There is no way for ncurses to determine the initial cursor state to
restore that.
.SH PORTABILITY
The functions \fBsetsyx\fR and \fBgetsyx\fR are not described in the XSI
Curses standard, Issue 4. All other functions are as described in XSI Curses.

View File

@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_outopts.3x,v 1.13 1998/12/26 20:02:04 tom Exp $
.\" $Id: curs_outopts.3x,v 1.14 2000/02/27 01:41:58 tom Exp $
.TH curs_outopts 3X ""
.SH NAME
\fBclearok\fR, \fBidlok\fR, \fBidcok immedok\fR,
@ -151,6 +151,7 @@ time.
The XSI Curses standard does not mention that the cursor should be
made invisible as a side-effect of \fBleaveok\fR.
SVr4 curses documentation does this, but the code does not.
Use \fBcurs_set\fR to make the cursor invisible.
.SH NOTES
Note that \fBclearok\fR, \fBleaveok\fR, \fBscrollok\fR, \fBidcok\fR, \fBnl\fR,
\fBnonl\fR and \fBsetscrreg\fR may be macros.

View File

@ -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,11 +26,12 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_overlay.3x,v 1.8 1998/12/26 20:08:30 tom Exp $
.\" $Id: curs_overlay.3x,v 1.9 2000/07/01 20:05:31 tom Exp $
.TH curs_overlay 3X ""
.SH NAME
\fBoverlay\fR, \fBoverwrite\fR, \fBcopywin\fR - overlay and
manipulate overlapped \fBcurses\fR windows
\fBoverlay\fR,
\fBoverwrite\fR,
\fBcopywin\fR - overlay and manipulate overlapped \fBcurses\fR windows
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_printw.3x,v 1.8 1998/12/26 20:09:36 tom Exp $
.\" $Id: curs_printw.3x,v 1.11 2000/07/01 20:11:32 tom Exp $
.TH curs_printw 3X ""
.SH NAME
\fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR,
\fBmvwprintw\fR, \fBvwprintw\fR - print formatted output in
\fBcurses\fR windows
\fBprintw\fR,
\fBwprintw\fR,
\fBmvprintw\fR,
\fBmvwprintw\fR,
\fBvwprintw\fR, \fBvw_printw\fR - print formatted output in \fBcurses\fR windows
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -48,6 +50,8 @@
.br
\fBint vwprintw(WINDOW *win, char *fmt, varglist);\fR
.br
\fBint vw_printw(WINDOW *win, char *fmt, varglist);\fR
.br
.SH DESCRIPTION
The \fBprintw\fR, \fBwprintw\fR, \fBmvprintw\fR and \fBmvwprintw\fR
routines are analogous to \fBprintf\fR [see \fBprintf\fR(3S)]. In

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_refresh.3x,v 1.7 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_refresh.3x,v 1.8 2000/07/01 20:06:14 tom Exp $
.TH curs_refresh 3X ""
.SH NAME
\fBrefresh\fR, \fBwrefresh\fR, \fBwnoutrefresh\fR,
\fBdoupdate\fR, \fBredrawwin\fR, \fBwredrawln\fR - refresh
\fBcurses\fR windows and lines
\fBrefresh\fR,
\fBwrefresh\fR,
\fBwnoutrefresh\fR,
\fBdoupdate\fR,
\fBredrawwin\fR,
\fBwredrawln\fR - refresh \fBcurses\fR windows and lines
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_scanw.3x,v 1.8 1998/12/26 20:10:12 tom Exp $
.\" $Id: curs_scanw.3x,v 1.10 2000/07/01 20:06:29 tom Exp $
.TH curs_scanw 3X ""
.SH NAME
\fBscanw\fR, \fBwscanw\fR, \fBmvscanw\fR,
\fBmvwscanw\fR, \fBvwscanw\fR - convert formatted input from a
\fBcurses\fR widow
\fBscanw\fR,
\fBwscanw\fR,
\fBmvscanw\fR,
\fBmvwscanw\fR,
\fBvwscanw\fR, \fBvw_scanw\fR - convert formatted input from a \fBcurses\fR widow
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -44,6 +46,8 @@
\fBint mvwscanw(WINDOW *win, int y, int x,\fR
\fBchar *fmt\fR [\fB, arg]\fR \fB...);\fR
.br
\fBint vw_scanw(WINDOW *win, char *fmt, va_list varglist);\fR
.br
\fBint vwscanw(WINDOW *win, char *fmt, va_list varglist);\fR
.SH DESCRIPTION
The \fBscanw\fR, \fBwscanw\fR and \fBmvscanw\fR routines are analogous to

View File

@ -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,13 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_scr_dump.3x,v 1.1 1998/03/11 21:12:53 tom Exp $
.\" $Id: curs_scr_dump.3x,v 1.2 2000/07/01 20:06:53 tom Exp $
.TH curs_scr_dump 3X ""
.SH NAME
\fBscr_dump\fR, \fBscr_restore\fR,
\fBscr_init\fR, \fBscr_set\fR - read (write) a \fBcurses\fR screen
from (to) a file
\fBscr_dump\fR,
\fBscr_restore\fR,
\fBscr_init\fR,
\fBscr_set\fR - read (write) a \fBcurses\fR screen from (to) a file
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -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: curs_scroll.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_scroll.3x,v 1.8 2000/07/01 17:54:23 tom Exp $
.TH curs_scroll 3X ""
.SH NAME
\fBscroll\fR, \fBsrcl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window
\fBscroll\fR, \fBscrl\fR, \fBwscrl\fR - scroll a \fBcurses\fR window
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -63,7 +63,8 @@ immediately if the scroll region is the entire screen "is" performed, not
that this will occur, in order to leave open the possibility of smarter
optimization of multiple scroll actions on the next update.
Neither the SVr4 documentation specifies whether the current attribute or
Neither the SVr4 nor the XSI documentation specify whether the current
attribute or
current color-pair of blanks generated by the scroll function is zeroed.
Under this implementation it is.
.SH PORTABILITY

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_slk.3x,v 1.9 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_slk.3x,v 1.10 2000/07/01 17:52:44 tom Exp $
.TH curs_slk 3X ""
.SH NAME
\fBslk_init\fR, \fBslk_set\fR, \fBslk_refresh\fR,
\fBslk_noutrefresh\fR, \fBslk_label\fR, \fBslk_clear\fR, \fBslk_restore\fR,
\fBslk_touch\fR, \fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR, \fBslk_color\fR -
\fBcurses\fR soft label routines
\fBslk_noutrefresh\fR, \fBslk_label\fR,
\fBslk_clear\fR, \fBslk_restore\fR, \fBslk_touch\fR,
\fBslk_attron\fR, \fBslk_attrset\fR, \fBslk_attroff\fR,
\fBslk_attr_on\fR, \fBslk_attr_set\fR, \fBslk_attr_off\fR,
\fBslk_attr\fR \fBslk_color\fR - \fBcurses\fR soft label routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
@ -54,11 +56,19 @@
.br
\fBint slk_attron(const chtype attrs);\fR
.br
\fBint slk_attroff(const chtype attrs);\fR
.br
\fBint slk_attrset(const chtype attrs);\fR
.br
\fBattr_t slk_attr(void);\fR
\fBint slk_attr_on(attr_t attrs, void* opts);\fR
.br
\fBint slk_attroff(const chtype attrs);\fR
\fBint slk_attr_off(const attr_t attrs, void * opts);\fR
.br
\fBint slk_attr_set(const attr_t attrs,\fR
.br
\fBshort color_pair_number, void* opts);\fR
.br
\fBattr_t slk_attr(void);\fR
.br
\fBint slk_color(short color_pair_number);\fR
.br

View File

@ -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,16 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_termcap.3x,v 1.12 1999/09/05 01:02:07 tom Exp $
.\" $Id: curs_termcap.3x,v 1.13 2000/07/01 20:10:57 tom Exp $
.TH curs_termcap 3X ""
.ds n 5
.SH NAME
\fBtgetent\fR, \fBtgetflag\fR, \fBtgetnum\fR,
\fBtgetstr\fR, \fBtgoto\fR, \fBtputs\fR - direct \fBcurses\fR
interface to the terminfo capability database
\fBtgetent\fR,
\fBtgetflag\fR,
\fBtgetnum\fR,
\fBtgetstr\fR,
\fBtgoto\fR,
\fBtputs\fR - direct \fBcurses\fR interface to the terminfo capability database
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br

View File

@ -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 *
@ -26,15 +26,24 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_terminfo.3x,v 1.12 1999/10/17 01:11:59 tom Exp $
.\" $Id: curs_terminfo.3x,v 1.13 2000/07/01 20:07:34 tom Exp $
.TH curs_terminfo 3X ""
.ds n 5
.SH NAME
\fBsetupterm\fR, \fBsetterm\fR,
\fBset_curterm\fR, \fBdel_curterm\fR, \fBrestartterm\fR, \fBtparm\fR,
\fBtputs\fR, \fBputp\fR, \fBvidputs\fR, \fBvidattr\fR, \fBmvcur\fR,
\fBtigetflag\fR, \fBtigetnum\fR, \fBtigetstr\fR - \fBcurses\fR
interfaces to terminfo database
\fBsetupterm\fR,
\fBsetterm\fR,
\fBset_curterm\fR,
\fBdel_curterm\fR,
\fBrestartterm\fR,
\fBtparm\fR,
\fBtputs\fR,
\fBputp\fR,
\fBvidputs\fR,
\fBvidattr\fR,
\fBmvcur\fR,
\fBtigetflag\fR,
\fBtigetnum\fR,
\fBtigetstr\fR - \fBcurses\fR interfaces to terminfo database
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br

View File

@ -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,15 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_touch.3x,v 1.6 1998/03/11 21:12:53 juergen Exp $
.\" $Id: curs_touch.3x,v 1.7 2000/07/01 20:08:04 tom Exp $
.TH curs_touch 3X ""
.SH NAME
\fBtouchwin\fR, \fBtouchline\fR, \fBuntouchwin\fR,
\fBwtouchln\fR, \fBis_linetouched\fR, \fBis_wintouched\fR -
\fBcurses\fR refresh control routines
\fBtouchwin\fR,
\fBtouchline\fR,
\fBuntouchwin\fR,
\fBwtouchln\fR,
\fBis_linetouched\fR,
\fBis_wintouched\fR - \fBcurses\fR refresh control routines
.SH SYNOPSIS
\fB#include <curses.h>\fR
.br

View File

@ -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,20 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_window.3x,v 1.8 1999/03/20 22:38:46 tom Exp $
.\" $Id: curs_window.3x,v 1.9 2000/07/01 20:08:37 tom Exp $
.TH curs_window 3X ""
.SH NAME
\fBnewwin\fR, \fBdelwin\fR, \fBmvwin\fR,
\fBsubwin\fR, \fBderwin\fR, \fBmvderwin\fR, \fBdupwin\fR,
\fBwsyncup\fR, \fBsyncok\fR, \fBwcursyncup\fR, \fBwsyncdown\fR -
create \fBcurses\fR windows
\fBnewwin\fR,
\fBdelwin\fR,
\fBmvwin\fR,
\fBsubwin\fR,
\fBderwin\fR,
\fBmvderwin\fR,
\fBdupwin\fR,
\fBwsyncup\fR,
\fBsyncok\fR,
\fBwcursyncup\fR,
\fBwsyncdown\fR - create \fBcurses\fR windows
.SH SYNOPSIS
\fB#include <curses.h>\fR

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998 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 *
@ -26,35 +26,61 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" Author: Thomas E. Dickey <dickey@clark.net> 1997
.\" Author: Thomas E. Dickey <dickey@clark.net> 1997,1999
.\"
.\" $Id: dft_fgbg.3x,v 1.6 1998/03/14 23:43:15 tom Exp $
.\" $Id: dft_fgbg.3x,v 1.10 2000/07/01 16:33:31 tom Exp $
.TH use_default_colors 3X ""
.SH NAME
\fBdft_fgbg\fR \- use terminal's default colors
\fBdft_fgbg\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
This is an extension to the curses library.
It is used with terminals that support ISO 6429 color, or equivalent.
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).
Because they are designed to support this, their design usually includes
features to change the default foreground or background colors so that
they do not match the assumption in XSI curses of white on black.
.PP
Applications that paint a colored background over the whole screen
are not adversely impacted by this type of terminal design.
However, there are applications that are designed to work with
the default background.
do not take advantage of SGR 39 and SGR 49.
Some applications are designed to work with the default background.
.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, and -1 means default terminal color.
The following are equivalent:
.RS
.br
.I use_default_colors();
.br
.I assume_default_colors(-1,-1);
.RE
.PP
This is a ncurses extension and for other curses implementations color
number -1 does not mean anything, just as for ncurses before a
successful call of use_default_colors or assume_default_colors.
..
.SH RETURN VALUE
The function returns the integer \fBERR\fP upon failure and \fBOK\fP on success.
It will fail if either the terminal does not support
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.

View File

@ -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: form_field_info.3x,v 1.5 1998/11/29 01:06:24 Rick.Ohnemus Exp $
.\" $Id: form_field_info.3x,v 1.6 2000/04/15 22:21:31 tom Exp $
.TH form_field_info 3X ""
.SH NAME
\fBform_field_info\fR - retrieve field characteristics
@ -69,6 +69,10 @@ The header file \fB<form.h>\fR automatically includes the header file
.SH PORTABILITY
These routines emulate the System V forms library. They were not supported on
Version 7 or BSD versions.
.PP
A null (zero pointer) is accepted for any of the return values,
to ignore that value.
Not all implementations allow this, e.g., Solaris 2.7 does not.
.SH AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
S. Raymond.

View File

@ -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,14 +27,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: infocmp.1m,v 1.21 1999/06/15 23:12:25 tom Exp $
.\" $Id: infocmp.1m,v 1.25 2000/06/11 02:08:16 tom Exp $
.TH infocmp 1M ""
.ds n 5
.ds d @DATADIR@/terminfo
.SH NAME
\fBinfocmp\fR - compare or print out \fIterminfo\fR descriptions
.SH SYNOPSIS
\fBinfocmp\fR [\fB-dceEGgnpILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR]
\fBinfocmp\fR [\fB-dceEGgnpqrILCuV1\fR] [\fB-v\fR \fIn\fR] [\fB-s d\fR| \fBi\fR| \fBl\fR| \fBc\fR]
.br
[\fB-w\fR\ \fIwidth\fR] [\fB-A\fR\ \fIdirectory\fR] [\fB-B\fR\ \fIdirectory\fR]
.br
@ -213,16 +213,27 @@ filenames. The files are searched for pairwise matches between
entries, with two entries considered to match if any of their names do.
The report printed to standard output lists entries with no matches in
the other file, and entries with more than one match. For entries
with exactly one match it includes a difference report.
with exactly one match it includes a difference report. Normally,
to reduce the volume of the report, use references are
not resolved before looking for differences, but resolution can be forced
by also specifying \fB-r\fR.
.TP
\fB-G\fR
Display constant literals in decimal form
rather than their character equivalents.
.TP
\fB-a\fR
tells \fBinfocmp\fP to retain commented-out capabilities rather than discarding
them. Capabilities are commented by prefixing them with a period.
.TP 5
\fB-q\fR
Make the comparison listing shorter by omitting subheadings, and using
"-" for absent capabilities, "@" for canceled rather than "NULL".
.TP 5
\fB-R\fR\fIsubset\fR
Restrict output to a given subset. This option is for use with archaic
versions of terminfo like those on SVr1, Ultrix, or HP/UX that don't support
the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX
versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
the full set of SVR4/XSI Curses terminfo; and variants such as AIX
that have their own extensions incompatible with SVr4/XSI. Available terminfo
subsets are "SVr1", "Ultrix", "HP", and "AIX"; see \fBterminfo\fR(\*n) for
details. You can also choose the subset "BSD" which selects only capabilities
@ -336,11 +347,13 @@ The
\fB-G\fR,
\fB-R\fR,
\fB-T\fR,
\fB-a\fR,
\fB-e\fR,
\fB-f\fR,
\fB-g\fR,
\fB-i\fR, and
\fB-p\fR
\fB-i\fR,
\fB-p\fR, and
\fB-q\fR
options are not supported in SVr4 curses.
The \fB-r\fR option's notion of `termcap' capabilities is System V Release 4's.
@ -355,7 +368,7 @@ The -F option of \fBinfocmp\fR(1M) should be a \fBtoe\fR(1M) mode.
.SH AUTHOR
Eric S. Raymond <esr@snark.thyrsus.com>
and
Thomas E. Dickey <dickey@clark.net>
Thomas E. Dickey <dickey@herndon4.his.com>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:

View File

@ -0,0 +1,74 @@
'\" t
.\"***************************************************************************
.\" 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 *
.\" "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: infotocap.1m,v 1.2 2000/03/19 02:19:49 tom Exp $
.TH infotocap 1M ""
.ds n 5
.ds d @DATADIR@/terminfo
.SH NAME
\fBinfotocap\fR - convert a \fIterminfo\fR description into a \fItermcap\fR description
.SH SYNOPSIS
\fBinfotocap\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
\fBinfotocap\fR looks in \fIfile\fR for \fBterminfo\fR descriptions. For each
one found, an equivalent \fBtermcap\fR description is written to standard
output. Terminfo \fBuse\fR capabilities are translated directly to termcap
\fBtc\fR capabilities.
.TP 5
\fB-v\fR
print out tracing information on standard error as the program runs.
.TP 5
\fB-V\fR
print out the version of the program in use on standard error and exit.
.TP 5
\fB-1\fR
cause the fields to print out one to a line. Otherwise, the fields
will be printed several to a line to a maximum width of 60
characters.
.TP 5
\fB-w\fR
change the output to \fIwidth\fR characters.
.SH FILES
.TP 20
\*d
Compiled terminal description database.
.SH NOTES
This utility is actually a link to \fItic\fR(1M), running in \fI-C\fR mode.
You can use other \fItic\fR options such as \fB-f\fR and \fB-x\fR.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBtic\fR(1M),
\fBinfocmp\fR(1M),
\fBterminfo\fR(\*n)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,4 +1,4 @@
# $Id: man_db.renames,v 0.15 1999/10/02 23:28:13 tom Exp $
# $Id: man_db.renames,v 0.18 2000/03/19 00:10:15 tom Exp $
# Manual-page renamings for the man_db program
#
captoinfo.1m captoinfo.1
@ -14,6 +14,7 @@ curs_clear.3x clear.3ncurses
curs_color.3x color.3ncurses
curs_delch.3x delch.3ncurses
curs_deleteln.3x deleteln.3ncurses
curs_extend.3x extensions.3ncurses
curs_getch.3x getch.3ncurses
curs_getstr.3x getstr.3ncurses
curs_getyx.3x getyx.3ncurses
@ -70,6 +71,7 @@ form_requestname.3x requestname.3form
form_userptr.3x userptr.3form
form_win.3x win.3form
infocmp.1m infocmp.1
infotocap.1m infotocap.1
keybound.3x keybound.3ncurses
keyok.3x keyok.3ncurses
menu.3x menu.3menu
@ -105,6 +107,7 @@ system.3s system.3
term.5 term.5
term.7 term.7
terminfo.5 terminfo.5
terminfo.\\\*n terminfo.5
tic.1m tic.1
toe.1m toe.1
tput.1 tput.1

View File

@ -0,0 +1,68 @@
# $Id: manlinks.sed,v 1.7 2000/07/01 19:50:06 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. #
##############################################################################
# Given a manpage (nroff) as input, writes a list of the names that are
# listed in the "NAME" section, i.e., the names that we would like to use
# as aliases for the manpage -T.Dickey
/^'\\"/d
/\.\\"/d
/^\.br/d
/^\.sp/d
s/\\f.//g
s/[:,]/ /g
s/^[ ][ ]*//
s/[ ][ ]*$//
s/[ ][ ]*/ /g
s/\.SH[ ][ ]*/.SH_(/
#
/^\.SH_(NAME/,/^\.SH_(SYNOPSIS/{
s/\\-.*/ -/
/ -/{
s/ -.*//
s/ /\
/g
}
/^-/{
d
}
s/ /\
/g
}
:syn
/^\.SH_(SYNOPSIS/,/^\.SH_(DESCRIPTION/{
/^#/d
/^[^(]*$/d
s/^\([^ (]\+ [*]*\)\+//g
s/\.SH_(/.SH_/
s/(.*//
s/\.SH_/.SH_(/
}
/^\.SH_(DESCRIPTION/,${
d
}
/^\./d

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: ncurses.3x,v 1.35 1999/10/23 19:50:07 tom Exp $
.\" $Id: ncurses.3x,v 1.39 1999/12/19 01:53:04 tom Exp $
.hy 0
.TH ncurses 3X ""
.ds n 5
@ -203,6 +203,7 @@ 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)*
attr_get/\fBcurs_attr\fR(3X)
attr_off/\fBcurs_attr\fR(3X)
attr_on/\fBcurs_attr\fR(3X)
@ -227,6 +228,7 @@ color_content/\fBcurs_color\fR(3X)
color_set/\fBcurs_attr\fR(3X)
copywin/\fBcurs_overlay\fR(3X)
curs_set/\fBcurs_kernel\fR(3X)
curses_version/\fBcurs_extend\fR(3X)*
def_prog_mode/\fBcurs_kernel\fR(3X)
def_shell_mode/\fBcurs_kernel\fR(3X)
define_key/\fBdefine_key\fR(3X)*
@ -284,6 +286,7 @@ intrflush/\fBcurs_inopts\fR(3X)
is_linetouched/\fBcurs_touch\fR(3X)
is_wintouched/\fBcurs_touch\fR(3X)
isendwin/\fBcurs_initscr\fR(3X)
keybound/\fBkeybound\fR(3X)*
keyname/\fBcurs_util\fR(3X)
keyok/\fBkeyok\fR(3X)*
keypad/\fBcurs_inopts\fR(3X)
@ -432,6 +435,7 @@ ungetmouse/\fBcurs_mouse\fR(3X)*
untouchwin/\fBcurs_touch\fR(3X)
use_default_colors/\fBdft_fgbg\fR(3X)*
use_env/\fBcurs_util\fR(3X)
use_extended_names/\fBcurs_extend\fR(3X)*
vidattr/\fBcurs_terminfo\fR(3X)
vidputs/\fBcurs_terminfo\fR(3X)
vline/\fBcurs_border\fR(3X)
@ -479,7 +483,7 @@ winsertln/\fBcurs_deleteln\fR(3X)
winsnstr/\fBcurs_insstr\fR(3X)
winsstr/\fBcurs_insstr\fR(3X)
winstr/\fBcurs_instr\fR(3X)
wmouse_trafo/\fBcurs_mouse\fR(3X)
wmouse_trafo/\fBcurs_mouse\fR(3X)*
wmove/\fBcurs_move\fR(3X)
wnoutrefresh/\fBcurs_refresh\fR(3X)
wprintw/\fBcurs_printw\fR(3X)
@ -549,14 +553,6 @@ a terminal description for terminals which are run as emulations.
Use the \fBuse_env\fR function to disable this feature.
.TP 5
DISPLAY
Provides a hint to ncurses that your terminal is an X terminal
emulator such as \fBxterm\fP.
If the \fBkmous\fP capability is set to the beginning of the xterm
mouse response, e.g., "kmous=\E[M", then ncurses will send the terminal
xterm's mouse initialization strings and allow appropriate replies.
See the \fBcurs_mouse\fR(3X) manual page for programming information.
.TP 5
ESCDELAY
Specifies the total time, in milliseconds, for which ncurses will
await a character sequence, e.g., a function key.

View File

@ -1,4 +1,4 @@
.\" $Id: terminfo.tail,v 1.29 1999/03/07 02:09:07 tom Exp $
.\" $Id: terminfo.tail,v 1.32 2000/04/15 20:04:58 tom Exp $
.\" Beginning of terminfo.tail file
.ps +1
.PP
@ -310,7 +310,8 @@ The \fB%\fR encodings have the following meanings:
\s-1%% outputs `%'
%\fI[[\fP:\fI]flags][width[.precision]][\fPdoxXs\fI]\fP
as in \fBprintf\fP, flags are [-+#] and space
%c print pop() gives %c
%c print pop() like %c in printf()
%s print pop() like %s in printf()
%p[1-9] push \fIi\fP'th parm
%P[a-z] set dynamic variable [a-z] to pop()
@ -327,7 +328,7 @@ The \fB%\fR encodings have the following meanings:
%= %> %< logical operations: push(pop() op pop())
%A, %O logical and & or operations (for conditionals)
%! %~ unary operations push(op pop())
%i add 1 to first two parms (for ANSI terminals)
%i add 1 to first two parameters (for ANSI terminals)
%? expr %t thenpart %e elsepart %;
if-then-else, %e elsepart is optional.
@ -1326,16 +1327,20 @@ capabilities of the form \fBx\fR\fIx\fR.
.PP
.SS Similar Terminals
.PP
If there are two very similar terminals,
one can be defined as being just like the other with certain exceptions.
The string capability \fBuse\fR can be given
with the name of the similar terminal.
The capabilities given before
If there are two very similar terminals, one (the variant) can be defined as
being just like the other (the base) with certain exceptions. In the
definition of the variant, the string capability \fBuse\fR can be given with
the name of the base terminal. The capabilities given before
.B use
override those in the terminal type invoked by
override those in the base type named by
.BR use .
If there are multiple \fBuse\fR capabilities, they are merged in reverse order.
That is, the rightmost \fBuse\fR reference is processed first, then the one to
its left, and so forth. Capabilities given explicitly in the entry override
those brought in by \fBuse\fR references.
.PP
A capability can be canceled by placing \fBxx@\fR to the left of the
capability definition, where xx is the capability.
use reference that imports it, where \fIxx\fP is the capability.
For example, the entry
.PP
2621-nl, smkx@, rmkx@, use=2621,
@ -1425,10 +1430,6 @@ of terminfo (under HP-UX and AIX) which diverged from System V terminfo after
SVr1, and have added extension capabilities to the string table that (in the
binary format) collide with System V and XSI Curses extensions.
.SH EXTENSIONS
The %x operator in parameterized strings is unique to the ncurses implementation
of \fBtparm\fR (it is required in order to support an unfortunate choice of
\fBinitc\fR format on the Linux console).
.PP
Some SVr4 \fBcurses\fR implementations, and all previous to SVr4, don't
interpret the %A and %O operators in parameter strings.
.PP

View File

@ -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 *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: tic.1m,v 1.25 1999/03/07 02:07:06 tom Exp $
.\" $Id: tic.1m,v 1.26 2000/03/19 02:18:18 tom Exp $
.TH tic 1M ""
.ds n 5
.ds d @DATADIR@/terminfo
@ -41,6 +41,7 @@ I\
N\
R\
T\
a\
c\
f\
r\
@ -72,8 +73,14 @@ Libraries that read terminfo entries are expected to check for a TERMINFO
directory first, look at \fI$HOME/.terminfo\fR if TERMINFO is not set, and
finally look in \fI\*d\fR.
.TP
\fB-a\fR
tells \fBtic\fP to retain commented-out capabilities rather than discarding
them. Capabilities are commented by prefixing them with a period.
This sets the \fB-x\fR option, because it treats the commented-out
entries as user-defined names.
.TP
\fB-c\fR
specifies to only check \fIfile\fR for errors, including syntax problems and
tells \fBtic\fP to only check \fIfile\fR for errors, including syntax problems and
bad use links. If you specify \fB-C\fR (\fB-I\fR) with this option, the code
will print warnings about entries which, after use resolution, are more than
1023 (4096) bytes long. Due to a fixed buffer length in older termcap
@ -171,6 +178,9 @@ are written, and the number of entries which are compiled.
.TP
\fB-x\fR
Treat unknown capabilities as user-defined.
That is, if you supply a capability name which \fBtic\fP does not recognize,
it will infer its type (boolean, number or string) from the syntax and
make an extended table entry for that.
.TP
\fIfile\fR
contains one or more \fBterminfo\fR terminal descriptions in source
@ -251,16 +261,17 @@ The error messages from this \fBtic\fR have the same format as GNU C
error messages, and can be parsed by GNU Emacs's compile facility.
The
\fB-o\fR,
\fB-C\fR,
\fB-G\fR,
\fB-I\fR,
\fB-C\fR,
\fB-N\fR,
\fB-R\fR,
\fB-T\fR,
\fB-a\fR,
\fB-e\fR,
\fB-f\fR,
\fB-g\fR,
\fB-T\fR,
\fB-o\fR,
\fB-r\fR,
\fB-s\fR and
\fB-x\fR

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.25 1998/11/10 19:08:30 juergen Exp $
# $Id: Makefile.in,v 1.28 2000/05/28 01:40:08 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"), #
@ -64,6 +64,7 @@ LD = @LD@
LN_S = @LN_S@
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ \
@ -83,7 +84,7 @@ LINK = $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib -L$(libdir)
SHLIB_LIST = $(SHLIB_DIRS) -lncurses @SHLIB_LIST@
SHLIB_LIST = $(SHLIB_DIRS) -lncurses@LIB_SUFFIX@ @SHLIB_LIST@
MK_SHARED_LIB = @MK_SHARED_LIB@
@ -105,6 +106,7 @@ AUTO_SRC = \
################################################################################
all \
libs \
install :: $(AUTO_SRC) $(LIBRARIES)
sources : $(AUTO_SRC)

View File

@ -0,0 +1,35 @@
/* Use this with indent 2.0 (2.1 is not acceptable, since it has more bugs) */
/* indent 4 columns */
-i4
/* tab stops every 8 columns */
-ts8
/* cuddle 'else' */
-ce
/* force blank lines after procedure body */
-bap
/* do not force newline after comma in declaration */
-nbc
/* do not force blank line after declarations */
-nbad
/* format braces inline */
-br
/* do not line up parentheses */
-nlp
/* put the type of a procedure on the line before its name */
-psl
/* do not insert a space between procedure name and '(' */
-npcs
/* leave preprocessor space */
-lps
/* swallow optional blank lines */
-sob
/* continuation indent of 0 spaces */
-ci0
/* force space before semicolon on same line */
-ss
/* for vile */
-T size_t
-T LINE
-T BUFFER
-T WINDOW

View File

@ -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> 1996
#
# $Id: run_tic.sh,v 1.10 1998/05/31 00:29:34 mooney Exp $
# $Id: run_tic.sh,v 1.12 2000/07/01 19:25:13 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.
#
@ -118,6 +118,17 @@ if test "x$TABSET" != "x/usr/share/tabset" ; then
SRC=$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 -s $SRC )
then
echo '** built new '$TERMINFO

View File

@ -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> 1996
#
# $Id: shlib,v 1.5 1998/05/31 00:29:38 mooney Exp $
# $Id: shlib,v 1.6 2000/05/20 23:01:17 tom Exp $
# Use this script as a wrapper when running executables linked to shared
# libraries on systems that use the $LD_LIBRARY_PATH variable and don't embed
# the soname's path within the linked executable (such as IRIX), e.g,
@ -55,6 +55,9 @@
# Using a conventional link, with -L and -l options on Linux results in a
# statically linked executable, which we don't want at all.
#
# Special cases:
#
# BeOS R4.5 uses $LIBRARY_PATH rather than $LD_LIBRARY_PATH.
#
# Make sure that we use the PATH that was set in run_tic.sh
@ -74,6 +77,8 @@ done
if test -n "$q" ; then
if test -n "$LD_LIBRARY_PATH"; then
LD_LIBRARY_PATH="$q:$LD_LIBRARY_PATH"
elif test -n "$LIBRARY_PATH" ; then
LIBRARY_PATH="$q:$LIBRARY_PATH"
else
LD_LIBRARY_PATH="$q"
fi

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
# $Id: mk-0th.awk,v 1.7 1998/02/11 12:13:52 tom Exp $
# $Id: mk-0th.awk,v 1.8 2000/01/09 00:29: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"), #
@ -38,6 +38,12 @@ BEGIN {
print ""
print "# generated by mk-0th.awk"
print ""
print ".SUFFIXES: .c .h .i"
print ".c.i :"
printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
print ".h.i :"
printf "\t$(CPP) $(CPPFLAGS) $< >$@\n"
print ""
found = 0;
}
!/^[@#]/ {

View File

@ -1,4 +1,4 @@
# $Id: mk-1st.awk,v 1.39 1998/05/09 21:54:02 tom Exp $
# $Id: mk-1st.awk,v 1.40 2000/04/01 20:50:29 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@ -114,7 +114,14 @@ BEGIN {
}
}
}
!/^[@#]/ {
/^[@#]/ {
next
}
$1 ~ /trace/ {
if (traces != "all" && traces != MODEL && $1 != "lib_trace")
next
}
{
if (using \
&& ( $2 == "lib" \
|| $2 == "progs" \

View File

@ -1,4 +1,4 @@
# $Id: mk-2nd.awk,v 1.11 1998/10/17 21:54:21 Alexander.V.Lukyanov Exp $
# $Id: mk-2nd.awk,v 1.12 2000/04/01 20:50:36 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@ -67,7 +67,14 @@ BEGIN {
}
}
}
!/^[@#]/ {
/^[@#]/ {
next
}
$1 ~ /trace/ {
if (traces != "all" && traces != MODEL && $1 != "lib_trace")
next
}
{
if ($0 != "" \
&& using != 0) {
found = 1

View File

@ -4,11 +4,12 @@
# Created: 1993-05-16
# Last modified: 1994-03-25
# Public domain
#
umask 022
errstatus=0
umask 022
for file in ${1+"$@"} ; do
for file in ${1+"$@"} ; do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
@ -21,7 +22,10 @@ for file in ${1+"$@"} ; do
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || errstatus=$?
case "$pathcomp" in
[a-zA-Z]: ) ;; # DOSISH systems
* ) mkdir "$pathcomp" || errstatus=$? ;;
esac
fi
pathcomp="$pathcomp/"

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.63 1999/09/01 22:35:53 tom Exp $
# $Id: Makefile.in,v 1.66 2000/05/28 01:39:56 tom Exp $
##############################################################################
# Copyright (c) 1998 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 "Software"), #
@ -129,7 +129,7 @@ AUTO_SRC = \
./names.c \
./unctrl.c
TEST_DEPS = @LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
TEST_DEPS = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
TEST_ARGS = -L../lib -lncurses@DFT_ARG_SUFFIX@
TEST_LDFLAGS = @LD_MODEL@ $(TEST_ARGS) @LIBS@ @EXTRA_LIBS@ @LOCAL_LDFLAGS@ @LDFLAGS@
@ -145,7 +145,8 @@ tinfo = $(srcdir)/tinfo
trace = $(srcdir)/trace
################################################################################
all :: $(AUTO_SRC) ../lib $(LIBRARIES)
all \
libs :: $(AUTO_SRC) ../lib $(LIBRARIES)
sources: $(AUTO_SRC)

View File

@ -1,4 +1,4 @@
# $Id: MKunctrl.awk,v 1.6 1998/06/06 18:18:07 tom Exp $
# $Id: MKunctrl.awk,v 1.7 2000/04/01 19:49:26 tom Exp $
##############################################################################
# Copyright (c) 1998 Free Software Foundation, Inc. #
# #
@ -50,6 +50,8 @@ END {
printf "\"^\\%03o\"", ch + 64
} else if (ch == 127) {
printf "\"^?\""
} else if (ch >= 128 && ch < 160) {
printf "\"~\\%03o\"", ch - 64
} else {
printf "\"\\%03o\"", ch
gap = gap " "

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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 *
@ -41,7 +41,7 @@
#include <curses.priv.h>
#include <ctype.h>
MODULE_ID("$Id: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $")
MODULE_ID("$Id: lib_addch.c,v 1.44 2000/05/20 21:13:11 tom Exp $")
/*
* Ugly microtweaking alert. Everything from here to end of module is
@ -56,40 +56,40 @@ MODULE_ID("$Id: lib_addch.c,v 1.42 1999/07/24 20:01:05 tom Exp $")
/* Return bit mask for clearing color pair number if given ch has color */
#define COLOR_MASK(ch) (~(chtype)((ch)&A_COLOR?A_COLOR:0))
static inline chtype render_char(WINDOW *win, chtype ch)
static inline chtype
render_char(WINDOW *win, chtype ch)
/* compute a rendition of the given char correct for the current context */
{
chtype a = win->_attrs;
if (ch == ' ')
{
/* color in attrs has precedence over bkgd */
ch = a | (win->_bkgd & COLOR_MASK(a));
}
else
{
/* color in attrs has precedence over bkgd */
a |= (win->_bkgd & A_ATTRIBUTES) & COLOR_MASK(a);
/* color in ch has precedence */
ch |= (a & COLOR_MASK(ch));
}
chtype a = win->_attrs;
TR(TRACE_VIRTPUT, ("bkg = %lx, attrs = %lx -> ch = %lx", win->_bkgd,
win->_attrs, ch));
if (ch == ' ') {
/* color in attrs has precedence over bkgd */
ch = a | (win->_bkgd & COLOR_MASK(a));
} else {
/* color in attrs has precedence over bkgd */
a |= (win->_bkgd & A_ATTRIBUTES) & COLOR_MASK(a);
/* color in ch has precedence */
ch |= (a & COLOR_MASK(ch));
}
return(ch);
TR(TRACE_VIRTPUT, ("bkg = %lx, attrs = %lx -> ch = %lx", win->_bkgd,
win->_attrs, ch));
return (ch);
}
chtype _nc_background(WINDOW *win)
chtype
_nc_background(WINDOW *win)
/* make render_char() visible while still allowing us to inline it below */
{
return (win->_bkgd);
return (win->_bkgd);
}
chtype _nc_render(WINDOW *win, chtype ch)
chtype
_nc_render(WINDOW *win, chtype ch)
/* make render_char() visible while still allowing us to inline it below */
{
return render_char(win, ch);
return render_char(win, ch);
}
/* check if position is legal; if not, return error */
@ -105,149 +105,152 @@ chtype _nc_render(WINDOW *win, chtype ch)
return(ERR); \
}
#else
#define CHECK_POSITION(win, x, y) /* nothing */
#define CHECK_POSITION(win, x, y) /* nothing */
#endif
static inline
int waddch_literal(WINDOW *win, chtype ch)
static inline int
waddch_literal(WINDOW *win, chtype ch)
{
int x;
struct ldat *line;
int x;
struct ldat *line;
x = win->_curx;
x = win->_curx;
CHECK_POSITION(win, x, win->_cury);
CHECK_POSITION(win, x, win->_cury);
/*
* If we're trying to add a character at the lower-right corner more
* than once, fail. (Moving the cursor will clear the flag).
*/
#if 0 /* Solaris 2.6 allows updating the corner more than once */
if (win->_flags & _WRAPPED) {
if (x >= win->_maxx)
return (ERR);
win->_flags &= ~_WRAPPED;
}
#endif
ch = render_char(win, ch);
TR(TRACE_VIRTPUT, ("win attr = %s", _traceattr(win->_attrs)));
line = win->_line + win->_cury;
CHANGED_CELL(line, x);
line->text[x++] = ch;
TR(TRACE_VIRTPUT, ("(%d, %d) = %s", win->_cury, x, _tracechtype(ch)));
if (x > win->_maxx) {
/*
* If we're trying to add a character at the lower-right corner more
* than once, fail. (Moving the cursor will clear the flag).
* The _WRAPPED flag is useful only for telling an application that
* we've just wrapped the cursor. We don't do anything with this flag
* except set it when wrapping, and clear it whenever we move the
* cursor. If we try to wrap at the lower-right corner of a window, we
* cannot move the cursor (since that wouldn't be legal). So we return
* an error (which is what SVr4 does). Unlike SVr4, we can
* successfully add a character to the lower-right corner (Solaris 2.6
* does this also, however).
*/
if (win->_flags & _WRAPPED) {
if (x >= win->_maxx)
return (ERR);
win->_flags &= ~_WRAPPED;
win->_flags |= _WRAPPED;
if (++win->_cury > win->_regbottom) {
win->_cury = win->_regbottom;
win->_curx = win->_maxx;
if (!win->_scroll)
return (ERR);
scroll(win);
}
ch = render_char(win, ch);
TR(TRACE_VIRTPUT, ("win attr = %s", _traceattr(win->_attrs)));
line = win->_line+win->_cury;
CHANGED_CELL(line,x);
line->text[x++] = ch;
TR(TRACE_VIRTPUT, ("(%d, %d) = %s", win->_cury, x, _tracechtype(ch)));
if (x > win->_maxx) {
/*
* The _WRAPPED flag is useful only for telling an application
* that we've just wrapped the cursor. We don't do anything
* with this flag except set it when wrapping, and clear it
* whenever we move the cursor. If we try to wrap at the
* lower-right corner of a window, we cannot move the cursor
* (since that wouldn't be legal). So we return an error
* (which is what SVr4 does). Unlike SVr4, we can successfully
* add a character to the lower-right corner.
*/
win->_flags |= _WRAPPED;
if (++win->_cury > win->_regbottom) {
win->_cury = win->_regbottom;
win->_curx = win->_maxx;
if (!win->_scroll)
return (ERR);
scroll(win);
}
win->_curx = 0;
return (OK);
}
win->_curx = x;
return OK;
win->_curx = 0;
return (OK);
}
win->_curx = x;
return OK;
}
static inline
int waddch_nosync(WINDOW *win, const chtype ch)
static inline int
waddch_nosync(WINDOW *win, const chtype ch)
/* the workhorse function -- add a character to the given window */
{
int x, y;
int t = 0;
const char *s = 0;
int x, y;
int t = 0;
const char *s = 0;
if ((ch & A_ALTCHARSET)
|| ((t = TextOf(ch)) > 127)
|| ((s = unctrl(t))[1] == 0))
return waddch_literal(win, ch);
if ((ch & A_ALTCHARSET)
|| ((t = TextOf(ch)) > 127)
|| ((s = unctrl(t))[1] == 0))
return waddch_literal(win, ch);
x = win->_curx;
y = win->_cury;
x = win->_curx;
y = win->_cury;
switch (t) {
case '\t':
x += (TABSIZE-(x%TABSIZE));
switch (t) {
case '\t':
x += (TABSIZE - (x % TABSIZE));
/*
* Space-fill the tab on the bottom line so that we'll get the
* "correct" cursor position.
*/
if ((! win->_scroll && (y == win->_regbottom))
|| (x <= win->_maxx)) {
chtype blank = (' ' | AttrOf(ch));
while (win->_curx < x) {
if (waddch_literal(win, blank) == ERR)
return(ERR);
}
break;
} else {
wclrtoeol(win);
win->_flags |= _WRAPPED;
if (++y > win->_regbottom) {
x = win->_maxx;
y--;
if (win->_scroll) {
scroll(win);
x = 0;
}
} else {
x = 0;
}
/*
* Space-fill the tab on the bottom line so that we'll get the
* "correct" cursor position.
*/
if ((!win->_scroll && (y == win->_regbottom))
|| (x <= win->_maxx)) {
chtype blank = (' ' | AttrOf(ch));
while (win->_curx < x) {
if (waddch_literal(win, blank) == ERR)
return (ERR);
}
break;
} else {
wclrtoeol(win);
win->_flags |= _WRAPPED;
if (++y > win->_regbottom) {
x = win->_maxx;
y--;
if (win->_scroll) {
scroll(win);
x = 0;
}
break;
case '\n':
wclrtoeol(win);
if (++y > win->_regbottom) {
y--;
if (win->_scroll)
scroll(win);
else
return (ERR);
}
/* FALLTHRU */
case '\r':
} else {
x = 0;
win->_flags &= ~_WRAPPED;
break;
case '\b':
if (x == 0)
return (OK);
x--;
win->_flags &= ~_WRAPPED;
break;
default:
while (*s)
if (waddch_literal(win, (*s++)|AttrOf(ch)) == ERR)
return ERR;
return(OK);
}
}
break;
case '\n':
wclrtoeol(win);
if (++y > win->_regbottom) {
y--;
if (win->_scroll)
scroll(win);
else
return (ERR);
}
/* FALLTHRU */
case '\r':
x = 0;
win->_flags &= ~_WRAPPED;
break;
case '\b':
if (x == 0)
return (OK);
x--;
win->_flags &= ~_WRAPPED;
break;
default:
while (*s)
if (waddch_literal(win, (*s++) | AttrOf(ch)) == ERR)
return ERR;
return (OK);
}
win->_curx = x;
win->_cury = y;
win->_curx = x;
win->_cury = y;
return(OK);
return (OK);
}
int _nc_waddch_nosync(WINDOW *win, const chtype c)
int
_nc_waddch_nosync(WINDOW *win, const chtype c)
/* export copy of waddch_nosync() so the string-put functions can use it */
{
return(waddch_nosync(win, c));
return (waddch_nosync(win, c));
}
/*
@ -258,36 +261,38 @@ int _nc_waddch_nosync(WINDOW *win, const chtype c)
/* These are actual entry points */
int waddch(WINDOW *win, const chtype ch)
int
waddch(WINDOW *win, const chtype ch)
{
int code = ERR;
int code = ERR;
TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win, _tracechtype(ch)));
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("waddch(%p, %s)"), win,
_tracechtype(ch)));
if (win && (waddch_nosync(win, ch) != ERR))
{
_nc_synchook(win);
code = OK;
}
if (win && (waddch_nosync(win, ch) != ERR)) {
_nc_synchook(win);
code = OK;
}
TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_RETURN("%d"), code));
return(code);
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
return (code);
}
int wechochar(WINDOW *win, const chtype ch)
int
wechochar(WINDOW *win, const chtype ch)
{
int code = ERR;
int code = ERR;
TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win, _tracechtype(ch)));
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_CALLED("wechochar(%p, %s)"), win,
_tracechtype(ch)));
if (win && (waddch_nosync(win, ch) != ERR))
{
bool save_immed = win->_immed;
win->_immed = TRUE;
_nc_synchook(win);
win->_immed = save_immed;
code = OK;
}
TR(TRACE_VIRTPUT|TRACE_CCALLS, (T_RETURN("%d"), code));
return(code);
if (win && (waddch_nosync(win, ch) != ERR)) {
bool save_immed = win->_immed;
win->_immed = TRUE;
_nc_synchook(win);
win->_immed = save_immed;
code = OK;
}
TR(TRACE_VIRTPUT | TRACE_CCALLS, (T_RETURN("%d"), code));
return (code);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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 *
@ -40,64 +40,64 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_addstr.c,v 1.16 1998/06/28 00:38:29 tom Exp $")
MODULE_ID("$Id: lib_addstr.c,v 1.17 2000/04/29 21:15:55 tom Exp $")
int
waddnstr(WINDOW *win, const char *const astr, int n)
{
unsigned const char *str = (unsigned const char *)astr;
int code = ERR;
unsigned const char *str = (unsigned const char *) astr;
int code = ERR;
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, ("str is not null"));
code = OK;
if (n < 0)
n = (int)strlen(astr);
while((n-- > 0) && (*str != '\0')) {
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, ("str is not null"));
code = OK;
if (n < 0)
n = (int) strlen(astr);
while ((n-- > 0) && (*str != '\0')) {
TR(TRACE_VIRTPUT, ("*str = %#x", *str));
if (_nc_waddch_nosync(win, (chtype)*str++) == ERR) {
code = ERR;
break;
if (_nc_waddch_nosync(win, (chtype) * str++) == ERR) {
code = ERR;
break;
}
}
_nc_synchook(win);
}
TR(TRACE_VIRTPUT, ("waddnstr returns %d", code));
returnCode(code);
_nc_synchook(win);
}
TR(TRACE_VIRTPUT, ("waddnstr returns %d", code));
returnCode(code);
}
int
waddchnstr(WINDOW *win, const chtype *const astr, int n)
waddchnstr(WINDOW *win, const chtype * const astr, int n)
{
short y = win->_cury;
short x = win->_curx;
int code = OK;
struct ldat *line;
NCURSES_SIZE_T y = win->_cury;
NCURSES_SIZE_T x = win->_curx;
int code = OK;
struct ldat *line;
T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
T((T_CALLED("waddchnstr(%p,%p,%d)"), win, astr, n));
if (!win)
returnCode(ERR);
if (!win)
returnCode(ERR);
if (n < 0) {
const chtype *str;
n = 0;
for (str=(const chtype *)astr; *str!=0; str++)
n++;
}
if (n > win->_maxx - x + 1)
n = win->_maxx - x + 1;
if (n == 0)
returnCode(code);
line = &(win->_line[y]);
memcpy(line->text+x, astr, n*sizeof(*astr));
CHANGED_RANGE(line, x, x+n-1);
_nc_synchook(win);
if (n < 0) {
const chtype *str;
n = 0;
for (str = (const chtype *) astr; *str != 0; str++)
n++;
}
if (n > win->_maxx - x + 1)
n = win->_maxx - x + 1;
if (n == 0)
returnCode(code);
line = &(win->_line[y]);
memcpy(line->text + x, astr, n * sizeof(*astr));
CHANGED_RANGE(line, x, x + n - 1);
_nc_synchook(win);
returnCode(code);
}

View File

@ -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,8 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/*
** lib_box.c
**
@ -42,69 +40,80 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_box.c,v 1.10 1998/02/11 12:13:56 tom Exp $")
MODULE_ID("$Id: lib_box.c,v 1.11 2000/04/29 21:12:37 tom Exp $")
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
int
wborder(WINDOW *win,
chtype ls, chtype rs, chtype ts, chtype bs,
chtype tl, chtype tr, chtype bl, chtype br)
{
short i;
short endx, endy;
NCURSES_SIZE_T i;
NCURSES_SIZE_T endx, endy;
T((T_CALLED("wborder(%p,%s,%s,%s,%s,%s,%s,%s,%s)"),
win,
_tracechtype2(1,ls),
_tracechtype2(2,rs),
_tracechtype2(3,ts),
_tracechtype2(4,bs),
_tracechtype2(5,tl),
_tracechtype2(6,tr),
_tracechtype2(7,bl),
_tracechtype2(8,br)));
win,
_tracechtype2(1, ls),
_tracechtype2(2, rs),
_tracechtype2(3, ts),
_tracechtype2(4, bs),
_tracechtype2(5, tl),
_tracechtype2(6, tr),
_tracechtype2(7, bl),
_tracechtype2(8, br)));
if (!win)
returnCode(ERR);
if (!win)
returnCode(ERR);
if (ls == 0) ls = ACS_VLINE;
if (rs == 0) rs = ACS_VLINE;
if (ts == 0) ts = ACS_HLINE;
if (bs == 0) bs = ACS_HLINE;
if (tl == 0) tl = ACS_ULCORNER;
if (tr == 0) tr = ACS_URCORNER;
if (bl == 0) bl = ACS_LLCORNER;
if (br == 0) br = ACS_LRCORNER;
if (ls == 0)
ls = ACS_VLINE;
if (rs == 0)
rs = ACS_VLINE;
if (ts == 0)
ts = ACS_HLINE;
if (bs == 0)
bs = ACS_HLINE;
if (tl == 0)
tl = ACS_ULCORNER;
if (tr == 0)
tr = ACS_URCORNER;
if (bl == 0)
bl = ACS_LLCORNER;
if (br == 0)
br = ACS_LRCORNER;
ls = _nc_render(win, ls);
rs = _nc_render(win, rs);
ts = _nc_render(win, ts);
bs = _nc_render(win, bs);
tl = _nc_render(win, tl);
tr = _nc_render(win, tr);
bl = _nc_render(win, bl);
br = _nc_render(win, br);
ls = _nc_render(win, ls);
rs = _nc_render(win, rs);
ts = _nc_render(win, ts);
bs = _nc_render(win, bs);
tl = _nc_render(win, tl);
tr = _nc_render(win, tr);
bl = _nc_render(win, bl);
br = _nc_render(win, br);
T(("using %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx", ls, rs, ts, bs, tl, tr, bl, br));
T(("using %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx, %#lx",
ls, rs, ts, bs, tl, tr, bl, br));
endx = win->_maxx;
endy = win->_maxy;
endx = win->_maxx;
endy = win->_maxy;
for (i = 0; i <= endx; i++) {
win->_line[0].text[i] = ts;
win->_line[endy].text[i] = bs;
}
win->_line[endy].firstchar = win->_line[0].firstchar = 0;
win->_line[endy].lastchar = win->_line[0].lastchar = endx;
for (i = 0; i <= endx; i++) {
win->_line[0].text[i] = ts;
win->_line[endy].text[i] = bs;
}
win->_line[endy].firstchar = win->_line[0].firstchar = 0;
win->_line[endy].lastchar = win->_line[0].lastchar = endx;
for (i = 0; i <= endy; i++) {
win->_line[i].text[0] = ls;
win->_line[i].text[endx] = rs;
win->_line[i].firstchar = 0;
win->_line[i].lastchar = endx;
}
win->_line[0].text[0] = tl;
win->_line[0].text[endx] = tr;
win->_line[endy].text[0] = bl;
win->_line[endy].text[endx] = br;
for (i = 0; i <= endy; i++) {
win->_line[i].text[0] = ls;
win->_line[i].text[endx] = rs;
win->_line[i].firstchar = 0;
win->_line[i].lastchar = endx;
}
win->_line[0].text[0] = tl;
win->_line[0].text[endx] = tr;
win->_line[endy].text[0] = bl;
win->_line[endy].text[endx] = br;
_nc_synchook(win);
returnCode(OK);
_nc_synchook(win);
returnCode(OK);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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 *
@ -40,36 +40,37 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_clrbot.c,v 1.14 1998/06/28 00:36:26 tom Exp $")
MODULE_ID("$Id: lib_clrbot.c,v 1.15 2000/04/29 21:15:26 tom Exp $")
int wclrtobot(WINDOW *win)
int
wclrtobot(WINDOW *win)
{
int code = ERR;
int code = ERR;
T((T_CALLED("wclrtobot(%p)"), win));
T((T_CALLED("wclrtobot(%p)"), win));
if (win) {
short y;
short startx = win->_curx;
chtype blank = _nc_background(win);
if (win) {
NCURSES_SIZE_T y;
NCURSES_SIZE_T startx = win->_curx;
chtype blank = _nc_background(win);
T(("clearing from y = %d to y = %d with maxx = %d", win->_cury, win->_maxy, win->_maxx));
T(("clearing from y = %d to y = %d with maxx = %d",
win->_cury, win->_maxy, win->_maxx));
for (y = win->_cury; y <= win->_maxy; y++) {
struct ldat *line = &(win->_line[y]);
chtype *ptr = &(line->text[startx]);
chtype *end = &(line->text[win->_maxx]);
for (y = win->_cury; y <= win->_maxy; y++) {
struct ldat *line = &(win->_line[y]);
chtype *ptr = &(line->text[startx]);
chtype *end = &(line->text[win->_maxx]);
CHANGED_TO_EOL(line, startx, win->_maxx);
CHANGED_TO_EOL(line, startx, win->_maxx);
while (ptr <= end)
*ptr++ = blank;
while (ptr <= end)
*ptr++ = blank;
startx = 0;
}
_nc_synchook(win);
code = OK;
startx = 0;
}
returnCode(code);
_nc_synchook(win);
code = OK;
}
returnCode(code);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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_clreol.c
**
@ -41,51 +40,52 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_clreol.c,v 1.15 1998/06/28 00:32:20 tom Exp $")
MODULE_ID("$Id: lib_clreol.c,v 1.16 2000/04/29 21:14:54 tom Exp $")
int wclrtoeol(WINDOW *win)
int
wclrtoeol(WINDOW *win)
{
int code = ERR;
int code = ERR;
T((T_CALLED("wclrtoeol(%p)"), win));
T((T_CALLED("wclrtoeol(%p)"), win));
if (win) {
chtype blank;
chtype *ptr, *end;
struct ldat *line;
short y = win->_cury;
short x = win->_curx;
if (win) {
chtype blank;
chtype *ptr, *end;
struct ldat *line;
NCURSES_SIZE_T y = win->_cury;
NCURSES_SIZE_T x = win->_curx;
/*
* If we have just wrapped the cursor, the clear applies to the
* new line, unless we are at the lower right corner.
*/
if (win->_flags & _WRAPPED
&& y < win->_maxy) {
win->_flags &= ~_WRAPPED;
}
/*
* There's no point in clearing if we're not on a legal
* position, either.
*/
if (win->_flags & _WRAPPED
|| y > win->_maxy
|| x > win->_maxx)
returnCode(ERR);
blank = _nc_background(win);
line = &win->_line[y];
CHANGED_TO_EOL(line, x, win->_maxx);
ptr = &(line->text[x]);
end = &(line->text[win->_maxx]);
while (ptr <= end)
*ptr++ = blank;
_nc_synchook(win);
code = OK;
/*
* If we have just wrapped the cursor, the clear applies to the
* new line, unless we are at the lower right corner.
*/
if (win->_flags & _WRAPPED
&& y < win->_maxy) {
win->_flags &= ~_WRAPPED;
}
returnCode(code);
/*
* There's no point in clearing if we're not on a legal
* position, either.
*/
if (win->_flags & _WRAPPED
|| y > win->_maxy
|| x > win->_maxx)
returnCode(ERR);
blank = _nc_background(win);
line = &win->_line[y];
CHANGED_TO_EOL(line, x, win->_maxx);
ptr = &(line->text[x]);
end = &(line->text[win->_maxx]);
while (ptr <= end)
*ptr++ = blank;
_nc_synchook(win);
code = OK;
}
returnCode(code);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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 *
@ -34,22 +34,22 @@
/* lib_color.c
*
* Handles color emulation of SYS V curses
*
*/
#include <curses.priv.h>
#include <term.h>
#include <tic.h>
MODULE_ID("$Id: lib_color.c,v 1.36 1999/10/03 00:20:37 Philippe.Blain Exp $")
MODULE_ID("$Id: lib_color.c,v 1.51 2000/05/20 20:09:22 tom Exp $")
/*
* These should be screen structure members. They need to be globals for
* hystorical reasons. So we assign them in start_color() and also in
* historical reasons. So we assign them in start_color() and also in
* set_term()'s screen-switching logic.
*/
int COLOR_PAIRS;
int COLORS;
int COLOR_PAIRS = 0;
int COLORS = 0;
/*
* Given a RGB range of 0..1000, we'll normally set the individual values
@ -57,141 +57,179 @@ int COLORS;
*/
#define RGB_ON 680
#define RGB_OFF 0
/* *INDENT-OFF* */
static const color_t cga_palette[] =
{
/* R G B */
{RGB_OFF, RGB_OFF, RGB_OFF}, /* COLOR_BLACK */
{RGB_ON, RGB_OFF, RGB_OFF}, /* COLOR_RED */
{RGB_OFF, RGB_ON, RGB_OFF}, /* COLOR_GREEN */
{RGB_ON, RGB_ON, RGB_OFF}, /* COLOR_YELLOW */
{RGB_OFF, RGB_OFF, RGB_ON}, /* COLOR_BLUE */
{RGB_ON, RGB_OFF, RGB_ON}, /* COLOR_MAGENTA */
{RGB_OFF, RGB_ON, RGB_ON}, /* COLOR_CYAN */
{RGB_ON, RGB_ON, RGB_ON}, /* COLOR_WHITE */
/* R G B */
{RGB_OFF, RGB_OFF, RGB_OFF}, /* COLOR_BLACK */
{RGB_ON, RGB_OFF, RGB_OFF}, /* COLOR_RED */
{RGB_OFF, RGB_ON, RGB_OFF}, /* COLOR_GREEN */
{RGB_ON, RGB_ON, RGB_OFF}, /* COLOR_YELLOW */
{RGB_OFF, RGB_OFF, RGB_ON}, /* COLOR_BLUE */
{RGB_ON, RGB_OFF, RGB_ON}, /* COLOR_MAGENTA */
{RGB_OFF, RGB_ON, RGB_ON}, /* COLOR_CYAN */
{RGB_ON, RGB_ON, RGB_ON}, /* COLOR_WHITE */
};
static const color_t hls_palette[] =
{
/* H L S */
{0, 0, 0}, /* COLOR_BLACK */
{120, 50, 100}, /* COLOR_RED */
{240, 50, 100}, /* COLOR_GREEN */
{180, 50, 100}, /* COLOR_YELLOW */
{330, 50, 100}, /* COLOR_BLUE */
{60, 50, 100}, /* COLOR_MAGENTA */
{300, 50, 100}, /* COLOR_CYAN */
{0, 50, 100}, /* COLOR_WHITE */
/* H L S */
{ 0, 0, 0}, /* COLOR_BLACK */
{ 120, 50, 100}, /* COLOR_RED */
{ 240, 50, 100}, /* COLOR_GREEN */
{ 180, 50, 100}, /* COLOR_YELLOW */
{ 330, 50, 100}, /* COLOR_BLUE */
{ 60, 50, 100}, /* COLOR_MAGENTA */
{ 300, 50, 100}, /* COLOR_CYAN */
{ 0, 50, 100}, /* COLOR_WHITE */
};
/* *INDENT-ON* */
#ifdef 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.
*/
static int
default_fg(void)
{
return (SP != 0) ? SP->_default_fg : COLOR_WHITE;
}
static int
default_bg(void)
{
return SP != 0 ? SP->_default_bg : COLOR_BLACK;
}
#else
#define default_fg() COLOR_WHITE
#define default_bg() COLOR_BLACK
#endif
/*
* SVr4 curses is known to interchange color codes (1,4) and (3,6), possibly
* to maintain compatibility with a pre-ANSI scheme. The same scheme is
* also used in the FreeBSD syscons.
*/
static int toggled_colors(int c)
static int
toggled_colors(int c)
{
if (c < 16) {
static const int table[] =
{ 0, 4, 2, 6, 1, 5, 3, 7,
8, 12, 10, 14, 9, 13, 11, 15};
{0, 4, 2, 6, 1, 5, 3, 7,
8, 12, 10, 14, 9, 13, 11, 15};
c = table[c];
}
return c;
}
static void set_background_color(int bg, int (*outc)(int))
static void
set_background_color(int bg, int (*outc) (int))
{
if (set_a_background)
{
TPUTS_TRACE("set_a_background");
tputs(tparm(set_a_background, bg), 1, outc);
}
else
{
TPUTS_TRACE("set_background");
tputs(tparm(set_background, toggled_colors(bg)), 1, outc);
}
if (set_a_background) {
TPUTS_TRACE("set_a_background");
tputs(tparm(set_a_background, bg), 1, outc);
} else {
TPUTS_TRACE("set_background");
tputs(tparm(set_background, toggled_colors(bg)), 1, outc);
}
}
static void set_foreground_color(int fg, int (*outc)(int))
static void
set_foreground_color(int fg, int (*outc) (int))
{
if (set_a_foreground)
{
TPUTS_TRACE("set_a_foreground");
tputs(tparm(set_a_foreground, fg), 1, outc);
}
else
{
TPUTS_TRACE("set_foreground");
tputs(tparm(set_foreground, toggled_colors(fg)), 1, outc);
}
if (set_a_foreground) {
TPUTS_TRACE("set_a_foreground");
tputs(tparm(set_a_foreground, fg), 1, outc);
} else {
TPUTS_TRACE("set_foreground");
tputs(tparm(set_foreground, toggled_colors(fg)), 1, outc);
}
}
static bool set_original_colors(void)
static bool
set_original_colors(void)
{
if (orig_pair != 0) {
TPUTS_TRACE("orig_pair");
putp(orig_pair);
return TRUE;
}
else if (orig_colors != NULL)
{
TPUTS_TRACE("orig_colors");
putp(orig_colors);
return TRUE;
}
return FALSE;
if (orig_pair != 0) {
TPUTS_TRACE("orig_pair");
putp(orig_pair);
return TRUE;
} else if (orig_colors != NULL) {
TPUTS_TRACE("orig_colors");
putp(orig_colors);
return TRUE;
}
return FALSE;
}
int start_color(void)
int
start_color(void)
{
T((T_CALLED("start_color()")));
int n;
const color_t *tp;
if (set_original_colors() != TRUE)
{
set_foreground_color(COLOR_WHITE, _nc_outch);
set_background_color(COLOR_BLACK, _nc_outch);
T((T_CALLED("start_color()")));
if (set_original_colors() != TRUE) {
set_foreground_color(default_fg(), _nc_outch);
set_background_color(default_bg(), _nc_outch);
}
if (VALID_NUMERIC(max_pairs))
COLOR_PAIRS = SP->_pair_count = max_pairs;
else
returnCode(ERR);
if ((SP->_color_pairs = typeCalloc(unsigned short, max_pairs)) == 0)
returnCode(ERR);
SP->_color_pairs[0] = PAIR_OF(default_fg(), default_bg());
if (VALID_NUMERIC(max_colors))
COLORS = SP->_color_count = max_colors;
else
returnCode(ERR);
SP->_coloron = 1;
if ((SP->_color_table = typeMalloc(color_t, COLORS)) == 0)
returnCode(ERR);
tp = (hue_lightness_saturation) ? hls_palette : cga_palette;
for (n = 0; n < COLORS; n++) {
if (n < 8) {
SP->_color_table[n] = tp[n];
} else {
SP->_color_table[n] = tp[n % 8];
if (hue_lightness_saturation) {
SP->_color_table[n].green = 100;
} else {
if (SP->_color_table[n].red)
SP->_color_table[n].red = 1000;
if (SP->_color_table[n].green)
SP->_color_table[n].green = 1000;
if (SP->_color_table[n].blue)
SP->_color_table[n].blue = 1000;
}
}
}
if (max_pairs != -1)
COLOR_PAIRS = SP->_pair_count = max_pairs;
else
returnCode(ERR);
if ((SP->_color_pairs = typeCalloc(unsigned short, max_pairs)) == 0)
returnCode(ERR);
SP->_color_pairs[0] = PAIR_OF(COLOR_WHITE, COLOR_BLACK);
if (max_colors != -1)
COLORS = SP->_color_count = max_colors;
else
returnCode(ERR);
SP->_coloron = 1;
T(("started color: COLORS = %d, COLOR_PAIRS = %d", COLORS, COLOR_PAIRS));
if ((SP->_color_table = typeMalloc(color_t, COLORS)) == 0)
returnCode(ERR);
if (hue_lightness_saturation)
memcpy(SP->_color_table, hls_palette, sizeof(color_t) * COLORS);
else
memcpy(SP->_color_table, cga_palette, sizeof(color_t) * COLORS);
T(("started color: COLORS = %d, COLOR_PAIRS = %d", COLORS, COLOR_PAIRS));
returnCode(OK);
returnCode(OK);
}
/* This function was originally written by Daniel Weaver <danw@znyx.com> */
static void rgb2hls(short r, short g, short b, short *h, short *l, short *s)
static void
rgb2hls(short r, short g, short b, short *h, short *l, short *s)
/* convert RGB to HLS system */
{
short min, max, t;
if ((min = g < r ? g : r) > b) min = b;
if ((max = g > r ? g : r) < b) max = b;
if ((min = g < r ? g : r) > b)
min = b;
if ((max = g > r ? g : r) < b)
max = b;
/* calculate lightness */
*l = (min + max) / 20;
if (min == max) /* black, white and all shades of gray */
{
if (min == max) { /* black, white and all shades of gray */
*h = 0;
*s = 0;
return;
@ -200,16 +238,16 @@ static void rgb2hls(short r, short g, short b, short *h, short *l, short *s)
/* calculate saturation */
if (*l < 50)
*s = ((max - min) * 100) / (max + min);
else *s = ((max - min) * 100) / (2000 - max - min);
else
*s = ((max - min) * 100) / (2000 - max - min);
/* calculate hue */
if (r == max)
t = 120 + ((g - b) * 60) / (max - min);
else if (g == max)
t = 240 + ((b - r) * 60) / (max - min);
else
if (g == max)
t = 240 + ((b - r) * 60) / (max - min);
else
t = 360 + ((r - g) * 60) / (max - min);
t = 360 + ((r - g) * 60) / (max - min);
*h = t % 360;
}
@ -218,212 +256,227 @@ static void rgb2hls(short r, short g, short b, short *h, short *l, short *s)
* Extension (1997/1/18) - Allow negative f/b values to set default color
* values.
*/
int init_pair(short pair, short f, short b)
int
init_pair(short pair, short f, short b)
{
unsigned result;
unsigned result;
T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b));
T((T_CALLED("init_pair(%d,%d,%d)"), pair, f, b));
if ((pair < 1) || (pair >= COLOR_PAIRS))
returnCode(ERR);
if (SP->_default_color)
{
if (f < 0)
f = C_MASK;
if (b < 0)
b = C_MASK;
if (f >= COLORS && f != C_MASK)
returnCode(ERR);
if (b >= COLORS && b != C_MASK)
returnCode(ERR);
}
else
if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
#ifdef NCURSES_EXT_FUNCS
if (SP->_default_color) {
if (f < 0)
f = C_MASK;
if (b < 0)
b = C_MASK;
if (f >= COLORS && f != C_MASK)
returnCode(ERR);
if (b >= COLORS && b != C_MASK)
returnCode(ERR);
} else
#endif
{
if ((f < 0) || (f >= COLORS)
|| (b < 0) || (b >= COLORS))
returnCode(ERR);
|| (b < 0) || (b >= COLORS)
|| (pair < 1))
returnCode(ERR);
}
/*
* When a pair's content is changed, replace its colors (if pair was
* initialized before a screen update is performed replacing original
* pair colors with the new ones).
*/
result = PAIR_OF(f,b);
if (SP->_color_pairs[pair] != 0
&& SP->_color_pairs[pair] != result) {
int y, x;
attr_t z = COLOR_PAIR(pair);
/*
* When a pair's content is changed, replace its colors (if pair was
* initialized before a screen update is performed replacing original
* pair colors with the new ones).
*/
result = PAIR_OF(f, b);
if (SP->_color_pairs[pair] != 0
&& SP->_color_pairs[pair] != result) {
int y, x;
attr_t z = COLOR_PAIR(pair);
for (y = 0; y <= curscr->_maxy; y++) {
struct ldat *ptr = &(curscr->_line[y]);
bool changed = FALSE;
for (x = 0; x <= curscr->_maxx; x++) {
if ((ptr->text[x] & A_COLOR) == z) {
/* Set the old cell to zero to ensure it will be
updated on the next doupdate() */
ptr->text[x] = 0;
CHANGED_CELL(ptr,x);
changed = TRUE;
}
for (y = 0; y <= curscr->_maxy; y++) {
struct ldat *ptr = &(curscr->_line[y]);
bool changed = FALSE;
for (x = 0; x <= curscr->_maxx; x++) {
if ((ptr->text[x] & A_COLOR) == z) {
/* Set the old cell to zero to ensure it will be
updated on the next doupdate() */
ptr->text[x] = 0;
CHANGED_CELL(ptr, x);
changed = TRUE;
}
if (changed)
_nc_make_oldhash(y);
}
if (changed)
_nc_make_oldhash(y);
}
SP->_color_pairs[pair] = result;
}
SP->_color_pairs[pair] = result;
if ((int) (SP->_current_attr & A_COLOR) == COLOR_PAIR(pair))
SP->_current_attr |= A_COLOR; /* force attribute update */
if (initialize_pair)
{
const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
if (initialize_pair) {
const color_t *tp = hue_lightness_saturation ? hls_palette : cga_palette;
T(("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
pair,
tp[f].red, tp[f].green, tp[f].blue,
tp[b].red, tp[b].green, tp[b].blue));
T(("initializing pair: pair = %d, fg=(%d,%d,%d), bg=(%d,%d,%d)",
pair,
tp[f].red, tp[f].green, tp[f].blue,
tp[b].red, tp[b].green, tp[b].blue));
if (initialize_pair)
{
TPUTS_TRACE("initialize_pair");
putp(tparm(initialize_pair,
pair,
tp[f].red, tp[f].green, tp[f].blue,
tp[b].red, tp[b].green, tp[b].blue));
}
if (initialize_pair) {
TPUTS_TRACE("initialize_pair");
putp(tparm(initialize_pair,
pair,
tp[f].red, tp[f].green, tp[f].blue,
tp[b].red, tp[b].green, tp[b].blue));
}
}
returnCode(OK);
returnCode(OK);
}
int init_color(short color, short r, short g, short b)
int
init_color(short color, short r, short g, short b)
{
T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b));
T((T_CALLED("init_color(%d,%d,%d,%d)"), color, r, g, b));
if (initialize_color == NULL)
returnCode(ERR);
if (initialize_color == NULL)
returnCode(ERR);
if (color < 0 || color >= COLORS)
returnCode(ERR);
if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000)
returnCode(ERR);
if (color < 0 || color >= COLORS)
returnCode(ERR);
if (r < 0 || r > 1000 || g < 0 || g > 1000 || b < 0 || b > 1000)
returnCode(ERR);
if (hue_lightness_saturation)
rgb2hls(r, g, b,
&SP->_color_table[color].red,
&SP->_color_table[color].green,
&SP->_color_table[color].blue);
else
{
SP->_color_table[color].red = r;
SP->_color_table[color].green = g;
SP->_color_table[color].blue = b;
}
if (hue_lightness_saturation)
rgb2hls(r, g, b,
&SP->_color_table[color].red,
&SP->_color_table[color].green,
&SP->_color_table[color].blue);
else {
SP->_color_table[color].red = r;
SP->_color_table[color].green = g;
SP->_color_table[color].blue = b;
}
if (initialize_color)
{
TPUTS_TRACE("initialize_color");
putp(tparm(initialize_color, color, r, g, b));
}
returnCode(OK);
if (initialize_color) {
TPUTS_TRACE("initialize_color");
putp(tparm(initialize_color, color, r, g, b));
}
returnCode(OK);
}
bool can_change_color(void)
bool
can_change_color(void)
{
T((T_CALLED("can_change_color()")));
returnCode ((can_change != 0) ? TRUE : FALSE);
T((T_CALLED("can_change_color()")));
returnCode((can_change != 0) ? TRUE : FALSE);
}
bool has_colors(void)
bool
has_colors(void)
{
T((T_CALLED("has_colors()")));
returnCode (((max_colors != -1) && (max_pairs != -1)
&& (((set_foreground != NULL)
&& (set_background != NULL))
|| ((set_a_foreground != NULL)
&& (set_a_background != NULL))
|| set_color_pair)) ? TRUE : FALSE);
T((T_CALLED("has_colors()")));
returnCode((VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
&& (((set_foreground != NULL)
&& (set_background != NULL))
|| ((set_a_foreground != NULL)
&& (set_a_background != NULL))
|| set_color_pair)) ? TRUE : FALSE);
}
int color_content(short color, short *r, short *g, short *b)
int
color_content(short color, short *r, short *g, short *b)
{
T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b));
if (color < 0 || color >= COLORS)
returnCode(ERR);
if (r) *r = SP->_color_table[color].red;
if (g) *g = SP->_color_table[color].green;
if (b) *b = SP->_color_table[color].blue;
if (r)
*r = SP->_color_table[color].red;
if (g)
*g = SP->_color_table[color].green;
if (b)
*b = SP->_color_table[color].blue;
returnCode(OK);
}
int pair_content(short pair, short *f, short *b)
int
pair_content(short pair, short *f, short *b)
{
T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
if (f) *f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
if (b) *b = (SP->_color_pairs[pair] & C_MASK);
if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
if (f)
*f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
if (b)
*b = (SP->_color_pairs[pair] & C_MASK);
returnCode(OK);
returnCode(OK);
}
void _nc_do_color(int pair, bool reverse, int (*outc)(int))
void
_nc_do_color(int old_pair, int pair, bool reverse, int (*outc) (int))
{
short fg, bg;
NCURSES_COLOR_T fg = C_MASK, bg = C_MASK;
NCURSES_COLOR_T old_fg, old_bg;
if (pair == 0)
{
if (orig_pair)
{
TPUTS_TRACE("orig_pair");
tputs(orig_pair, 1, outc);
}
else if (set_color_pair)
{
if (pair < 0 || pair >= COLOR_PAIRS) {
return;
} else if (pair != 0) {
if (set_color_pair) {
TPUTS_TRACE("set_color_pair");
tputs(tparm(set_color_pair, pair), 1, outc);
}
else
{
set_foreground_color(COLOR_WHITE, outc);
set_background_color(COLOR_BLACK, outc);
}
}
else
{
if (set_color_pair)
{
TPUTS_TRACE("set_color_pair");
tputs(tparm(set_color_pair, pair), 1, outc);
}
else
{
return;
} else if (SP != 0) {
pair_content(pair, &fg, &bg);
if (reverse) {
short xx = fg;
fg = bg;
bg = xx;
}
T(("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg));
if (fg == C_MASK || bg == C_MASK)
{
if (set_original_colors() != TRUE)
{
if (fg == C_MASK)
set_foreground_color(COLOR_WHITE, outc);
if (bg == C_MASK)
set_background_color(COLOR_BLACK, outc);
}
}
if (fg != C_MASK)
{
set_foreground_color(fg, outc);
}
if (bg != C_MASK)
{
set_background_color(bg, outc);
}
}
}
if (old_pair >= 0 && SP != 0) {
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
/*
* A minor optimization - but extension. If "AX" is specified in
* the terminal description, treat it as screen's indicator of ECMA
* SGR 39 and SGR 49, and assume the two sequences are independent.
*/
if (SP->_has_sgr_39_49 && old_bg == C_MASK && old_fg != C_MASK) {
tputs("\033[39m", 1, outc);
} else if (SP->_has_sgr_39_49 && old_fg == C_MASK && old_bg != C_MASK) {
tputs("\033[49m", 1, outc);
} else
#endif
set_original_colors();
}
} else {
set_original_colors();
if (old_pair < 0)
return;
}
#ifdef NCURSES_EXT_FUNCS
if (fg == C_MASK)
fg = default_fg();
if (bg == C_MASK)
bg = default_bg();
#endif
if (reverse) {
NCURSES_COLOR_T xx = fg;
fg = bg;
bg = xx;
}
T(("setting colors: pair = %d, fg = %d, bg = %d", pair, fg, bg));
if (fg != C_MASK) {
set_foreground_color(fg, outc);
}
if (bg != C_MASK) {
set_background_color(bg, outc);
}
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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,34 +27,45 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey <dickey@clark.net> 1997 *
* Author: Thomas E. Dickey <dickey@clark.net> 1997,1999 *
****************************************************************************/
#include <curses.priv.h>
#include <term.h>
MODULE_ID("$Id: lib_dft_fgbg.c,v 1.3 1998/02/11 12:13:54 tom Exp $")
MODULE_ID("$Id: lib_dft_fgbg.c,v 1.11 2000/05/07 01:26:06 tom Exp $")
/*
* Modify the behavior of color-pair 0 so that the library doesn't assume that
* it is black on white. This is an extension to XSI curses.
*
* Invoke this function after 'start_color()'.
* it is white on black. This is an extension to XSI curses.
*/
int
use_default_colors(void)
{
T((T_CALLED("use_default_colors()")));
if (!SP->_coloron)
returnCode(ERR);
if (!orig_pair && !orig_colors)
returnCode(ERR);
if (initialize_pair) /* don't know how to handle this */
returnCode(ERR);
SP->_default_color = TRUE;
SP->_color_pairs[0] = PAIR_OF(C_MASK, C_MASK);
returnCode(OK);
T((T_CALLED("use_default_colors()")));
returnCode(assume_default_colors(C_MASK, C_MASK));
}
/*
* Modify the behavior of color-pair 0 so that the library assumes that it
* is something specific, possibly not white on black.
*/
int
assume_default_colors(int fg, int bg)
{
T((T_CALLED("assume_default_colors(%d,%d)"), fg, bg));
if (!orig_pair && !orig_colors)
returnCode(ERR);
if (initialize_pair) /* don't know how to handle this */
returnCode(ERR);
SP->_default_color = (fg != COLOR_WHITE) || (bg != COLOR_BLACK);
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;
if (SP->_color_pairs != 0)
init_pair(0, fg, bg);
returnCode(OK);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
* Copyright (c) 1998,1999 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,94 +39,101 @@
extern int malloc_errfd; /* FIXME */
#endif
MODULE_ID("$Id: lib_freeall.c,v 1.15 1999/10/22 21:40:10 tom Exp $")
MODULE_ID("$Id: lib_freeall.c,v 1.16 1999/11/28 01:34:11 tom Exp $")
static void free_slk(SLK *p)
static void
free_slk(SLK *p)
{
if (p != 0) {
FreeIfNeeded(p->ent);
FreeIfNeeded(p->buffer);
free(p);
}
if (p != 0) {
FreeIfNeeded(p->ent);
FreeIfNeeded(p->buffer);
free(p);
}
}
static void free_tries(struct tries *p)
static void
free_tries(struct tries *p)
{
struct tries *q;
struct tries *q;
while (p != 0) {
q = p->sibling;
if (p->child != 0)
free_tries(p->child);
free(p);
p = q;
}
while (p != 0) {
q = p->sibling;
if (p->child != 0)
free_tries(p->child);
free(p);
p = q;
}
}
/*
* Free all ncurses data. This is used for testing only (there's no practical
* use for it as an extension).
*/
void _nc_freeall(void)
void
_nc_freeall(void)
{
WINDOWLIST *p, *q;
WINDOWLIST *p, *q;
#if NO_LEAKS
_nc_free_tparm();
_nc_free_tparm();
#endif
if (SP != 0) {
while (_nc_windows != 0) {
/* Delete only windows that're not a parent */
for (p = _nc_windows; p != 0; p = p->next) {
bool found = FALSE;
/* Delete only windows that're not a parent */
for (p = _nc_windows; p != 0; p = p->next) {
bool found = FALSE;
for (q = _nc_windows; q != 0; q = q->next) {
if ((p != q)
&& (q->win->_flags & _SUBWIN)
&& (p->win == q->win->_parent)) {
found = TRUE;
break;
}
}
if (!found) {
delwin(p->win);
break;
}
for (q = _nc_windows; q != 0; q = q->next) {
if ((p != q)
&& (q->win->_flags & _SUBWIN)
&& (p->win == q->win->_parent)) {
found = TRUE;
break;
}
}
if (!found) {
delwin(p->win);
break;
}
}
}
if (SP != 0) {
free_tries (SP->_keytry);
free_tries (SP->_key_ok);
free_slk(SP->_slk);
FreeIfNeeded(SP->_color_pairs);
FreeIfNeeded(SP->_color_table);
free_tries(SP->_keytry);
free_tries(SP->_key_ok);
free_slk(SP->_slk);
FreeIfNeeded(SP->_color_pairs);
FreeIfNeeded(SP->_color_table);
#if !BROKEN_LINKER
FreeAndNull(SP);
FreeAndNull(SP);
#endif
}
if (cur_term != 0) {
_nc_free_termtype(&(cur_term->type));
free(cur_term);
}
}
if (cur_term != 0) {
_nc_free_termtype(&(cur_term->type));
free(cur_term);
}
#ifdef TRACE
(void) _nc_trace_buf(-1, 0);
(void) _nc_trace_buf(-1, 0);
#endif
#if HAVE_LIBDBMALLOC
malloc_dump(malloc_errfd);
malloc_dump(malloc_errfd);
#elif HAVE_LIBDMALLOC
#elif HAVE_PURIFY
purify_all_inuse();
purify_all_inuse();
#endif
}
void _nc_free_and_exit(int code)
void
_nc_free_and_exit(int code)
{
_nc_freeall();
exit(code);
_nc_freeall();
exit(code);
}
#else
void _nc_freeall(void) { }
void
_nc_freeall(void)
{
}
#endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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 *
@ -40,143 +40,154 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_getch.c,v 1.43 1999/03/08 02:35:10 tom Exp $")
MODULE_ID("$Id: lib_getch.c,v 1.47 2000/05/28 01:12:51 tom Exp $")
#include <fifo_defs.h>
int ESCDELAY = 1000; /* max interval betw. chars in funkeys, in millisecs */
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;
fd_set fdset;
int nums = SP->_ifd + 1;
for (;;) {
FD_ZERO(&fdset);
FD_SET(SP->_checkfd, &fdset);
if (SP->_mouse_fd >= 0) {
FD_SET(SP->_mouse_fd, &fdset);
if (SP->_mouse_fd > SP->_checkfd)
nums = SP->_mouse_fd+1;
}
if (select(nums, &fdset, NULL, NULL, NULL) >= 0) {
int n;
if (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;
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 */
#endif /* USE_EMX_MOUSE */
static inline int fifo_peek(void)
static inline int
fifo_peek(void)
{
int ch = SP->_fifo[peek];
T(("peeking at %d", peek));
int ch = SP->_fifo[peek];
T(("peeking at %d", peek));
p_inc();
return ch;
p_inc();
return ch;
}
static inline int fifo_pull(void)
static inline int
fifo_pull(void)
{
int ch;
ch = SP->_fifo[head];
T(("pulling %d from %d", ch, head));
int ch;
ch = SP->_fifo[head];
T(("pulling %d from %d", ch, head));
if (peek == head)
{
h_inc();
peek = head;
}
else
h_inc();
if (peek == head) {
h_inc();
peek = head;
} else
h_inc();
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT) _nc_fifo_dump();
if (_nc_tracing & TRACE_IEVENT)
_nc_fifo_dump();
#endif
return ch;
return ch;
}
static inline int fifo_push(void)
static inline int
fifo_push(void)
{
int n;
unsigned int ch;
int n;
unsigned int ch;
if (tail == -1) return ERR;
if (tail == -1)
return ERR;
#ifdef HIDE_EINTR
again:
errno = 0;
again:
errno = 0;
#endif
#if USE_GPM_SUPPORT
if ((SP->_mouse_fd >= 0)
&& (_nc_timed_wait(3, -1, (int *)0) & 2))
{
SP->_mouse_event(SP);
ch = KEY_MOUSE;
n = 1;
} else
if ((SP->_mouse_fd >= 0)
&& (_nc_timed_wait(3, -1, (int *) 0) & 2)) {
SP->_mouse_event(SP);
ch = KEY_MOUSE;
n = 1;
} else
#endif
{
unsigned char c2=0;
{
unsigned char c2 = 0;
#ifdef USE_EMX_MOUSE
n = kbd_mouse_read(&c2);
n = kbd_mouse_read(&c2);
#else
n = read(SP->_ifd, &c2, 1);
n = read(SP->_ifd, &c2, 1);
#endif
ch = c2 & 0xff;
}
ch = c2 & 0xff;
}
#ifdef HIDE_EINTR
/*
* Under System V curses with non-restarting signals, getch() returns
* with value ERR when a handled signal keeps it from completing.
* If signals restart system calls, OTOH, the signal is invisible
* except to its handler.
*
* We don't want this difference to show. This piece of code
* tries to make it look like we always have restarting signals.
*/
if (n <= 0 && errno == EINTR)
goto again;
/*
* Under System V curses with non-restarting signals, getch() returns
* with value ERR when a handled signal keeps it from completing.
* If signals restart system calls, OTOH, the signal is invisible
* except to its handler.
*
* We don't want this difference to show. This piece of code
* tries to make it look like we always have restarting signals.
*/
if (n <= 0 && errno == EINTR)
goto again;
#endif
if ((n == -1) || (n == 0))
{
T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno));
return ERR;
}
T(("read %d characters", n));
if ((n == -1) || (n == 0)) {
T(("read(%d,&ch,1)=%d, errno=%d", SP->_ifd, n, errno));
return ERR;
}
T(("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));
SP->_fifo[tail] = ch;
SP->_fifohold = 0;
if (head == -1)
head = peek = tail;
t_inc();
T(("pushed %#x at %d", ch, tail));
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT) _nc_fifo_dump();
if (_nc_tracing & TRACE_IEVENT)
_nc_fifo_dump();
#endif
return ch;
return ch;
}
static inline void fifo_clear(void)
static inline void
fifo_clear(void)
{
int i;
for (i = 0; i < FIFO_SIZE; i++)
SP->_fifo[i] = 0;
head = -1; tail = peek = 0;
int i;
for (i = 0; i < FIFO_SIZE; i++)
SP->_fifo[i] = 0;
head = -1;
tail = peek = 0;
}
static int kgetch(WINDOW *);
@ -188,146 +199,157 @@ static int kgetch(WINDOW *);
int
wgetch(WINDOW *win)
{
int ch;
int ch;
T((T_CALLED("wgetch(%p)"), win));
T((T_CALLED("wgetch(%p)"), win));
if (!win)
returnCode(ERR);
if (cooked_key_in_fifo())
{
if (wgetch_should_refresh(win))
wrefresh(win);
ch = fifo_pull();
T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch));)
returnCode(ch);
}
/*
* Handle cooked mode. Grab a string from the screen,
* stuff its contents in the FIFO queue, and pop off
* the first character to return it.
*/
if (head == -1 && !SP->_raw && !SP->_cbreak)
{
char buf[MAXCOLUMNS], *sp;
T(("filling queue in cooked mode"));
wgetnstr(win, buf, MAXCOLUMNS);
/* ungetch in reverse order */
ungetch('\n');
for (sp = buf+strlen(buf); sp>buf; sp--)
ungetch(sp[-1]);
returnCode(fifo_pull());
}
if (!win)
returnCode(ERR);
if (cooked_key_in_fifo()) {
if (wgetch_should_refresh(win))
wrefresh(win);
if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1))
{
int delay;
T(("timed delay in wgetch()"));
if (SP->_cbreak > 1)
delay = (SP->_cbreak - 1) * 100;
else
delay = win->_delay;
T(("delay is %d milliseconds", delay));
if (head == -1) /* fifo is empty */
if (!_nc_timed_wait(3, delay, (int *)0))
returnCode(ERR);
/* else go on to read data available */
}
if (win->_use_keypad)
{
/*
* This is tricky. We only want to get special-key
* events one at a time. But we want to accumulate
* mouse events until either (a) the mouse logic tells
* us it's picked up a complete gesture, or (b)
* there's a detectable time lapse after one.
*
* Note: if the mouse code starts failing to compose
* press/release events into clicks, you should probably
* increase the wait with mouseinterval().
*/
int runcount = 0;
do {
ch = kgetch(win);
if (ch == KEY_MOUSE)
{
++runcount;
if (SP->_mouse_inline(SP))
break;
}
} while
(ch == KEY_MOUSE
&& (_nc_timed_wait(3, SP->_maxclick, (int *)0)
|| !SP->_mouse_parse(runcount)));
if (runcount > 0 && ch != KEY_MOUSE)
{
/* mouse event sequence ended by keystroke, push it */
ungetch(ch);
ch = KEY_MOUSE;
}
} else {
if (head == -1)
fifo_push();
ch = fifo_pull();
}
if (ch == ERR)
{
#if USE_SIZECHANGE
if(SP->_sig_winch)
{
_nc_update_screensize();
/* resizeterm can push KEY_RESIZE */
if(cooked_key_in_fifo())
{
ch = fifo_pull();
T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch));)
returnCode(ch);
}
}
#endif
T(("wgetch returning ERR"));
returnCode(ERR);
}
/*
* Simulate ICRNL mode
*/
if ((ch == '\r') && SP->_nl)
ch = '\n';
/* Strip 8th-bit if so desired. We do this only for characters that
* are in the range 128-255, to provide compatibility with terminals
* that display only 7-bit characters. Note that 'ch' may be a
* function key at this point, so we mustn't strip _those_.
*/
if ((ch < KEY_MIN) && (ch & 0x80))
if (!SP->_use_meta)
ch &= 0x7f;
if (SP->_echo && ch < KEY_MIN && !(win->_flags & _ISPAD))
wechochar(win, (chtype)ch);
T(("wgetch returning : %#x = %s", ch, _trace_key(ch)));
wrefresh(win);
ch = fifo_pull();
T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch)));
returnCode(ch);
}
}
/*
* Handle cooked mode. Grab a string from the screen,
* stuff its contents in the FIFO queue, and pop off
* the first character to return it.
*/
if (head == -1 && !SP->_raw && !SP->_cbreak) {
char buf[MAXCOLUMNS], *sp;
T(("filling queue in cooked mode"));
wgetnstr(win, buf, MAXCOLUMNS);
/* ungetch in reverse order */
ungetch('\n');
for (sp = buf + strlen(buf); sp > buf; sp--)
ungetch(sp[-1]);
returnCode(fifo_pull());
}
if (wgetch_should_refresh(win))
wrefresh(win);
if (!win->_notimeout && (win->_delay >= 0 || SP->_cbreak > 1)) {
int delay;
T(("timed delay in wgetch()"));
if (SP->_cbreak > 1)
delay = (SP->_cbreak - 1) * 100;
else
delay = win->_delay;
T(("delay is %d milliseconds", delay));
if (head == -1) /* fifo is empty */
if (!_nc_timed_wait(3, delay, (int *) 0))
returnCode(ERR);
/* else go on to read data available */
}
if (win->_use_keypad) {
/*
* This is tricky. We only want to get special-key
* events one at a time. But we want to accumulate
* mouse events until either (a) the mouse logic tells
* us it's picked up a complete gesture, or (b)
* there's a detectable time lapse after one.
*
* Note: if the mouse code starts failing to compose
* press/release events into clicks, you should probably
* increase the wait with mouseinterval().
*/
int runcount = 0;
do {
ch = kgetch(win);
if (ch == KEY_MOUSE) {
++runcount;
if (SP->_mouse_inline(SP))
break;
}
} while
(ch == KEY_MOUSE
&& (_nc_timed_wait(3, SP->_maxclick, (int *) 0)
|| !SP->_mouse_parse(runcount)));
if (runcount > 0 && ch != KEY_MOUSE) {
/* mouse event sequence ended by keystroke, push it */
ungetch(ch);
ch = KEY_MOUSE;
}
} else {
if (head == -1)
fifo_push();
ch = fifo_pull();
}
if (ch == ERR) {
#if USE_SIZECHANGE
if (SP->_sig_winch) {
_nc_update_screensize();
/* resizeterm can push KEY_RESIZE */
if (cooked_key_in_fifo()) {
ch = fifo_pull();
T(("wgetch returning (pre-cooked): %#x = %s", ch, _trace_key(ch)));
returnCode(ch);
}
}
#endif
T(("wgetch returning ERR"));
returnCode(ERR);
}
/*
* If echo() is in effect, display the printable version of the
* key on the screen. Carriage return and backspace are treated
* specially by Solaris curses:
*
* If carriage return is defined as a function key in the
* terminfo, e.g., kent, then Solaris may return either ^J (or ^M
* if nonl() is set) or KEY_ENTER depending on the echo() mode.
* We echo before translating carriage return based on nonl(),
* since the visual result simply moves the cursor to column 0.
*
* Backspace is a different matter. Solaris curses does not
* translate it to KEY_BACKSPACE if kbs=^H. This does not depend
* on the stty modes, but appears to be a hardcoded special case.
* This is a difference from ncurses, which uses the terminfo entry.
* However, we provide the same visual result as Solaris, moving the
* cursor to the left.
*/
if (SP->_echo && !(win->_flags & _ISPAD)) {
chtype backup = (ch == KEY_BACKSPACE) ? '\b' : ch;
if (backup < KEY_MIN)
wechochar(win, backup);
}
/*
* Simulate ICRNL mode
*/
if ((ch == '\r') && SP->_nl)
ch = '\n';
/* Strip 8th-bit if so desired. We do this only for characters that
* are in the range 128-255, to provide compatibility with terminals
* that display only 7-bit characters. Note that 'ch' may be a
* function key at this point, so we mustn't strip _those_.
*/
if ((ch < KEY_MIN) && (ch & 0x80))
if (!SP->_use_meta)
ch &= 0x7f;
T(("wgetch returning : %#x = %s", ch, _trace_key(ch)));
returnCode(ch);
}
/*
** int
@ -347,68 +369,63 @@ int ch;
static int
kgetch(WINDOW *win GCC_UNUSED)
{
struct tries *ptr;
int ch = 0;
int timeleft = ESCDELAY;
struct tries *ptr;
int ch = 0;
int timeleft = ESCDELAY;
TR(TRACE_IEVENT, ("kgetch(%p) called", win));
TR(TRACE_IEVENT, ("kgetch(%p) called", win));
ptr = SP->_keytry;
ptr = SP->_keytry;
for(;;)
{
if (!raw_key_in_fifo())
{
if(fifo_push() == ERR)
{
peek = head; /* the keys stay uninterpreted */
return ERR;
}
}
ch = fifo_peek();
if (ch >= KEY_MIN)
{
peek = head;
/* assume the key is the last in fifo */
t_dec(); /* remove the key */
return ch;
}
for (;;) {
if (!raw_key_in_fifo()) {
if (fifo_push() == ERR) {
peek = head; /* the keys stay uninterpreted */
return ERR;
}
}
ch = fifo_peek();
if (ch >= KEY_MIN) {
peek = head;
/* assume the key is the last in fifo */
t_dec(); /* remove the key */
return ch;
}
TR(TRACE_IEVENT, ("ch: %s", _trace_key((unsigned char)ch)));
while ((ptr != NULL) && (ptr->ch != (unsigned char)ch))
ptr = ptr->sibling;
TR(TRACE_IEVENT, ("ch: %s", _trace_key((unsigned char) ch)));
while ((ptr != NULL) && (ptr->ch != (unsigned char) ch))
ptr = ptr->sibling;
#ifdef TRACE
if (ptr == NULL)
{TR(TRACE_IEVENT, ("ptr is null"));}
else
TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d",
ptr, ptr->ch, ptr->value));
if (ptr == NULL) {
TR(TRACE_IEVENT, ("ptr is null"));
} else
TR(TRACE_IEVENT, ("ptr=%p, ch=%d, value=%d",
ptr, ptr->ch, ptr->value));
#endif /* TRACE */
if (ptr == NULL)
break;
if (ptr == NULL)
break;
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));
if (peek == tail)
fifo_clear();
else
head = peek;
return(ptr->value);
}
ptr = ptr->child;
if (!raw_key_in_fifo())
{
TR(TRACE_IEVENT, ("waiting for rest of sequence"));
if (!_nc_timed_wait(3, timeleft, &timeleft)) {
TR(TRACE_IEVENT, ("ran out of time"));
break;
}
}
if (ptr->value != 0) { /* sequence terminated */
TR(TRACE_IEVENT, ("end of sequence"));
if (peek == tail)
fifo_clear();
else
head = peek;
return (ptr->value);
}
ch = fifo_pull();
peek = head;
return ch;
ptr = ptr->child;
if (!raw_key_in_fifo()) {
TR(TRACE_IEVENT, ("waiting for rest of sequence"));
if (!_nc_timed_wait(3, timeleft, &timeleft)) {
TR(TRACE_IEVENT, ("ran out of time"));
break;
}
}
}
ch = fifo_pull();
peek = head;
return ch;
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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,8 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/*
** lib_hline.c
**
@ -42,35 +40,36 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_hline.c,v 1.4 1998/06/28 00:11:01 tom Exp $")
MODULE_ID("$Id: lib_hline.c,v 1.5 2000/04/29 21:14:30 tom Exp $")
int whline(WINDOW *win, chtype ch, int n)
int
whline(WINDOW *win, chtype ch, int n)
{
int code = ERR;
short start;
short end;
int code = ERR;
NCURSES_SIZE_T start;
NCURSES_SIZE_T end;
T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
T((T_CALLED("whline(%p,%s,%d)"), win, _tracechtype(ch), n));
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
if (win) {
struct ldat *line = &(win->_line[win->_cury]);
start = win->_curx;
end = start + n - 1;
if (end > win->_maxx)
end = win->_maxx;
start = win->_curx;
end = start + n - 1;
if (end > win->_maxx)
end = win->_maxx;
CHANGED_RANGE(line, start, end);
CHANGED_RANGE(line, start, end);
if (ch == 0)
ch = ACS_HLINE;
ch = _nc_render(win, ch);
if (ch == 0)
ch = ACS_HLINE;
ch = _nc_render(win, ch);
while ( end >= start) {
line->text[end] = ch;
end--;
}
code = OK;
while (end >= start) {
line->text[end] = ch;
end--;
}
returnCode(code);
code = OK;
}
returnCode(code);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998 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,8 +31,6 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
/*
** lib_insstr.c
**
@ -43,39 +41,41 @@
#include <curses.priv.h>
#include <ctype.h>
MODULE_ID("$Id: lib_insstr.c,v 1.13 1999/03/14 00:27:21 tom Exp $")
MODULE_ID("$Id: lib_insstr.c,v 1.14 2000/04/29 21:16:41 tom Exp $")
int winsnstr(WINDOW *win, const char *s, int n)
int
winsnstr(WINDOW *win, const char *s, int n)
{
int code = ERR;
short oy;
short ox ;
const unsigned char *str = (const unsigned char *)s;
const unsigned char *cp;
int code = ERR;
NCURSES_SIZE_T oy;
NCURSES_SIZE_T ox;
const unsigned char *str = (const unsigned char *) s;
const unsigned char *cp;
T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbuf(s), n));
T((T_CALLED("winsnstr(%p,%s,%d)"), win, _nc_visbuf(s), n));
if (win && str) {
oy = win->_cury; ox = win->_curx;
for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
if (win && str) {
oy = win->_cury;
ox = win->_curx;
for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
if (*cp == '\n' || *cp == '\r' || *cp == '\t' || *cp == '\b')
_nc_waddch_nosync(win, (chtype)(*cp));
_nc_waddch_nosync(win, (chtype) (*cp));
else if (is7bits(*cp) && iscntrl(*cp)) {
winsch(win, ' ' + (chtype)(*cp));
winsch(win, '^');
win->_curx += 2;
winsch(win, ' ' + (chtype) (*cp));
winsch(win, '^');
win->_curx += 2;
} else {
winsch(win, (chtype)(*cp));
win->_curx++;
winsch(win, (chtype) (*cp));
win->_curx++;
}
if (win->_curx > win->_maxx)
win->_curx = win->_maxx;
}
win->_curx = ox;
win->_cury = oy;
_nc_synchook(win);
code = OK;
win->_curx = win->_maxx;
}
returnCode(code);
win->_curx = ox;
win->_cury = oy;
_nc_synchook(win);
code = OK;
}
returnCode(code);
}

View File

@ -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 *
@ -64,8 +64,7 @@
*/
#ifdef __EMX__
# include "io.h"
# include "fcntl.h"
# include <io.h>
# define INCL_DOS
# define INCL_VIO
# define INCL_KBD
@ -85,13 +84,13 @@
#endif
#endif
MODULE_ID("$Id: lib_mouse.c,v 1.45 1999/10/22 21:39:02 tom Exp $")
MODULE_ID("$Id: lib_mouse.c,v 1.52 2000/06/29 23:02:26 tom Exp $")
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
#define INVALID_EVENT -1
static int mousetype;
static int mousetype;
#define M_XTERM -1 /* use xterm's mouse tracking? */
#define M_NONE 0 /* no mouse device */
#define M_GPM 1 /* use GPM */
@ -104,7 +103,7 @@ static Gpm_Connect gpm_connect;
#endif
#endif
static mmask_t eventmask; /* current event mask */
static mmask_t eventmask; /* current event mask */
static bool _nc_mouse_parse(int);
static void _nc_mouse_resume(SCREEN *);
@ -116,22 +115,23 @@ static void _nc_mouse_wrap(SCREEN *);
* wgetch() may refer to the size and call _nc_mouse_parse() before circular
* list overflow.
*/
static MEVENT events[EV_MAX]; /* hold the last mouse event seen */
static MEVENT *eventp = events; /* next free slot in event queue */
static MEVENT events[EV_MAX]; /* hold the last mouse event seen */
static MEVENT *eventp = events; /* next free slot in event queue */
#define NEXT(ep) ((ep == events + EV_MAX - 1) ? events : ep + 1)
#define PREV(ep) ((ep == events) ? events + EV_MAX - 1 : ep - 1)
#ifdef TRACE
static void _trace_slot(const char *tag)
static void
_trace_slot(const char *tag)
{
MEVENT *ep;
MEVENT *ep;
_tracef(tag);
_tracef(tag);
for (ep = events; ep < events + EV_MAX; ep++)
_tracef("mouse event queue slot %ld = %s",
(long) (ep - events),
_tracemouse(ep));
for (ep = events; ep < events + EV_MAX; ep++)
_tracef("mouse event queue slot %ld = %s",
(long) (ep - events),
_tracemouse(ep));
}
#endif
@ -143,8 +143,8 @@ static void _trace_slot(const char *tag)
static int mouse_wfd;
static int mouse_thread;
static int mouse_activated;
static char mouse_buttons[] = { 0, 1, 3, 2};
static char mouse_buttons[] =
{0, 1, 3, 2};
# define M_FD(sp) sp->_mouse_fd
@ -174,34 +174,34 @@ mouse_server(unsigned long ignored GCC_UNUSED)
unsigned long ignore;
/* open the handle for the mouse */
if (MouOpen(NULL,&hmou) == 0) {
if (MouOpen(NULL, &hmou) == 0) {
if (MouSetEventMask(&mask,hmou) == 0
&& MouDrawPtr(hmou) == 0) {
if (MouSetEventMask(&mask, hmou) == 0
&& MouDrawPtr(hmou) == 0) {
for (;;) {
/* sit and wait on the event queue */
if (MouReadEventQue(&mouev,&fWait,hmou))
break;
if (MouReadEventQue(&mouev, &fWait, hmou))
break;
if (!mouse_activated)
goto finish;
/*
* OS/2 numbers a 3-button mouse inconsistently from other
* platforms:
* 1 = left
* 2 = right
* 3 = middle.
* 1 = left
* 2 = right
* 3 = middle.
*/
if ((mouev.fs ^ oldstate) & MOUSE_BN1_DOWN)
write_event(mouev.fs & MOUSE_BN1_DOWN,
mouse_buttons[1], mouev.col, mouev.row);
write_event(mouev.fs & MOUSE_BN1_DOWN,
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);
write_event(mouev.fs & MOUSE_BN2_DOWN,
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);
write_event(mouev.fs & MOUSE_BN3_DOWN,
mouse_buttons[2], mouev.col, mouev.row);
finish:
oldstate = mouev.fs;
@ -211,11 +211,11 @@ mouse_server(unsigned long ignored GCC_UNUSED)
DosWrite(2, errmess, strlen(errmess), &ignore);
MouClose(hmou);
}
DosExit(EXIT_THREAD, 0L );
DosExit(EXIT_THREAD, 0L);
}
static void
server_state(const int state)
{ /* It would be nice to implement pointer-off and stop looping... */
{ /* It would be nice to implement pointer-off and stop looping... */
mouse_activated = state;
}
@ -223,44 +223,30 @@ server_state(const int state)
static int initialized;
static void _nc_mouse_init(void)
/* initialize the mouse */
static void
initialize_mousetype(void)
{
int i;
if (initialized) {
return;
}
initialized = TRUE;
TR(MY_TRACE, ("_nc_mouse_init() called"));
for (i = 0; i < EV_MAX; i++)
events[i].id = INVALID_EVENT;
/* we know how to recognize mouse events under xterm */
if (key_mouse != 0
&& getenv("DISPLAY") != 0)
mousetype = M_XTERM;
static const char *xterm_kmous = "\033[M";
/* Try gpm first, because gpm may be configured to run in xterm */
#if USE_GPM_SUPPORT
else if (!strncmp(cur_term->type.term_names, "linux", 5))
{
/* GPM: initialize connection to gpm server */
gpm_connect.eventMask = GPM_DOWN|GPM_UP;
gpm_connect.defaultMask = ~(gpm_connect.eventMask|GPM_HARD);
gpm_connect.minMod = 0;
gpm_connect.maxMod = ~((1<<KG_SHIFT)|(1<<KG_SHIFTL)|(1<<KG_SHIFTR));
if (Gpm_Open (&gpm_connect, 0) >= 0) { /* returns the file-descriptor */
mousetype = M_GPM;
SP->_mouse_fd = gpm_fd;
}
/* GPM: initialize connection to gpm server */
gpm_connect.eventMask = GPM_DOWN | GPM_UP;
gpm_connect.defaultMask = ~(gpm_connect.eventMask | GPM_HARD);
gpm_connect.minMod = 0;
gpm_connect.maxMod = ~((1 << KG_SHIFT) | (1 << KG_SHIFTL) | (1 << KG_SHIFTR));
if (Gpm_Open(&gpm_connect, 0) >= 0) { /* returns the file-descriptor */
mousetype = M_GPM;
SP->_mouse_fd = gpm_fd;
return;
}
#endif
/* OS/2 VIO */
#ifdef USE_EMX_MOUSE
if (!mouse_thread && mousetype != M_XTERM && key_mouse) {
if (!mouse_thread
&& strstr(cur_term->type.term_names, "xterm") == 0
&& key_mouse) {
int handles[2];
if (pipe(handles) < 0) {
perror("mouse pipe error");
@ -283,19 +269,53 @@ static void _nc_mouse_init(void)
setmode(handles[0], O_BINARY);
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);
if (rc)
rc = DosCreateThread((unsigned long *) &mouse_thread,
mouse_server, 0, 0, 8192);
if (rc) {
printf("mouse thread error %d=%#x", rc, rc);
else
} else {
mousetype = M_XTERM;
return;
}
}
}
#endif
T(("_nc_mouse_init() set mousetype to %d", mousetype));
/* we know how to recognize mouse events under "xterm" */
if (key_mouse != 0) {
if (!strcmp(key_mouse, xterm_kmous)) {
mousetype = M_XTERM;
return;
}
} else if (strstr(cur_term->type.term_names, "xterm") != 0) {
(void) _nc_add_to_try(&(SP->_keytry), xterm_kmous, KEY_MOUSE);
mousetype = M_XTERM;
return;
}
}
static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED)
static void
_nc_mouse_init(void)
/* initialize the mouse */
{
int i;
if (!initialized) {
initialized = TRUE;
TR(MY_TRACE, ("_nc_mouse_init() called"));
for (i = 0; i < EV_MAX; i++)
events[i].id = INVALID_EVENT;
initialize_mousetype();
T(("_nc_mouse_init() set mousetype to %d", mousetype));
}
}
static bool
_nc_mouse_event(SCREEN * sp GCC_UNUSED)
/* query to see if there is a pending mouse event */
{
#if USE_GPM_SUPPORT
@ -303,23 +323,27 @@ static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED)
Gpm_Event ev;
if (gpm_fd >= 0
&& _nc_timed_wait(2, 0, (int *)0)
&& Gpm_GetEvent(&ev) == 1)
{
&& (_nc_timed_wait(3, 0, (int *) 0) & 2) != 0
&& Gpm_GetEvent(&ev) == 1) {
eventp->id = 0; /* there's only one mouse... */
eventp->bstate = 0;
switch (ev.type & 0x0f)
{
case(GPM_DOWN):
if (ev.buttons & GPM_B_LEFT) eventp->bstate |= BUTTON1_PRESSED;
if (ev.buttons & GPM_B_MIDDLE) eventp->bstate |= BUTTON2_PRESSED;
if (ev.buttons & GPM_B_RIGHT) eventp->bstate |= BUTTON3_PRESSED;
switch (ev.type & 0x0f) {
case (GPM_DOWN):
if (ev.buttons & GPM_B_LEFT)
eventp->bstate |= BUTTON1_PRESSED;
if (ev.buttons & GPM_B_MIDDLE)
eventp->bstate |= BUTTON2_PRESSED;
if (ev.buttons & GPM_B_RIGHT)
eventp->bstate |= BUTTON3_PRESSED;
break;
case(GPM_UP):
if (ev.buttons & GPM_B_LEFT) eventp->bstate |= BUTTON1_RELEASED;
if (ev.buttons & GPM_B_MIDDLE) eventp->bstate |= BUTTON2_RELEASED;
if (ev.buttons & GPM_B_RIGHT) eventp->bstate |= BUTTON3_RELEASED;
case (GPM_UP):
if (ev.buttons & GPM_B_LEFT)
eventp->bstate |= BUTTON1_RELEASED;
if (ev.buttons & GPM_B_MIDDLE)
eventp->bstate |= BUTTON2_RELEASED;
if (ev.buttons & GPM_B_RIGHT)
eventp->bstate |= BUTTON3_RELEASED;
break;
default:
break;
@ -336,20 +360,20 @@ static bool _nc_mouse_event(SCREEN *sp GCC_UNUSED)
#endif
/* xterm: never have to query, mouse events are in the keyboard stream */
return(FALSE); /* no event waiting */
return (FALSE); /* no event waiting */
}
static bool _nc_mouse_inline(SCREEN *sp)
static bool
_nc_mouse_inline(SCREEN * sp)
/* mouse report received in the keyboard stream -- parse its info */
{
TR(MY_TRACE, ("_nc_mouse_inline() called"));
if (mousetype == M_XTERM)
{
unsigned char kbuf[4];
MEVENT *prev;
size_t grabbed;
int res;
if (mousetype == M_XTERM) {
unsigned char kbuf[4];
MEVENT *prev;
size_t grabbed;
int res;
/* This code requires that your xterm entry contain the kmous
* capability and that it be set to the \E[M documented in the
@ -381,28 +405,27 @@ static bool _nc_mouse_inline(SCREEN *sp)
* single clist item. It always does under Linux but often
* fails to under Solaris.
*/
for (grabbed = 0; grabbed < 3; grabbed += res)
{
for (grabbed = 0; grabbed < 3; grabbed += res) {
/* For VIO mouse we add extra bit 64 to disambiguate button-up. */
/* For VIO mouse we add extra bit 64 to disambiguate button-up. */
#ifdef USE_EMX_MOUSE
res = read( M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3);
res = read(M_FD(sp) >= 0 ? M_FD(sp) : sp->_ifd, &kbuf, 3);
#else
res = read(sp->_ifd, kbuf + grabbed, 3-grabbed);
res = read(sp->_ifd, kbuf + grabbed, 3 - grabbed);
#endif
if (res == -1)
break;
if (res == -1)
break;
}
kbuf[3] = '\0';
TR(TRACE_IEVENT, ("_nc_mouse_inline sees the following xterm data: '%s'", kbuf));
TR(TRACE_IEVENT,
("_nc_mouse_inline sees the following xterm data: '%s'", kbuf));
eventp->id = 0; /* there's only one mouse... */
/* processing code goes here */
eventp->bstate = 0;
switch (kbuf[0] & 0x3)
{
switch (kbuf[0] & 0x3) {
case 0x0:
eventp->bstate = BUTTON1_PRESSED;
#ifdef USE_EMX_MOUSE
@ -434,8 +457,8 @@ static bool _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
@ -444,11 +467,11 @@ static bool _nc_mouse_inline(SCREEN *sp)
*/
prev = PREV(eventp);
if (!(prev->bstate & BUTTON1_PRESSED))
eventp->bstate &=~ BUTTON1_RELEASED;
eventp->bstate &= ~BUTTON1_RELEASED;
if (!(prev->bstate & BUTTON2_PRESSED))
eventp->bstate &=~ BUTTON2_RELEASED;
eventp->bstate &= ~BUTTON2_RELEASED;
if (!(prev->bstate & BUTTON3_PRESSED))
eventp->bstate &=~ BUTTON3_RELEASED;
eventp->bstate &= ~BUTTON3_RELEASED;
break;
}
@ -464,21 +487,23 @@ static bool _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",
TR(MY_TRACE,
("_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);
#if 0 /* this return would be needed for QNX's mods to lib_getch.c */
return(TRUE);
#if 0 /* this return would be needed for QNX's mods to lib_getch.c */
return (TRUE);
#endif
}
return(FALSE);
return (FALSE);
}
static void mouse_activate(bool on)
static void
mouse_activate(bool on)
{
if (!on && !initialized)
return;
@ -508,11 +533,11 @@ static void mouse_activate(bool on)
/* Make runtime binding to cut down on object size of applications that
* do not use the mouse (e.g., 'clear').
*/
SP->_mouse_event = _nc_mouse_event;
SP->_mouse_event = _nc_mouse_event;
SP->_mouse_inline = _nc_mouse_inline;
SP->_mouse_parse = _nc_mouse_parse;
SP->_mouse_parse = _nc_mouse_parse;
SP->_mouse_resume = _nc_mouse_resume;
SP->_mouse_wrap = _nc_mouse_wrap;
SP->_mouse_wrap = _nc_mouse_wrap;
} else {
@ -540,12 +565,13 @@ static void mouse_activate(bool on)
*
**************************************************************************/
static bool _nc_mouse_parse(int runcount)
static bool
_nc_mouse_parse(int runcount)
/* parse a run of atomic mouse events into a gesture */
{
MEVENT *ep, *runp, *next, *prev = PREV(eventp);
int n;
bool merge;
MEVENT *ep, *runp, *next, *prev = PREV(eventp);
int n;
bool merge;
TR(MY_TRACE, ("_nc_mouse_parse(%d) called", runcount));
@ -570,14 +596,14 @@ static bool _nc_mouse_parse(int runcount)
* button basis, as long as the device-dependent mouse code puts stuff
* on the queue in MEVENT format.
*/
if (runcount == 1)
{
TR(MY_TRACE, ("_nc_mouse_parse: returning simple mouse event %s at slot %ld",
_tracemouse(prev),
(long) (prev - events)));
if (runcount == 1) {
TR(MY_TRACE,
("_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;
? ((prev->bstate & eventmask) ? TRUE : FALSE)
: FALSE;
}
/* find the start of the run */
@ -587,12 +613,11 @@ static bool _nc_mouse_parse(int runcount)
}
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT)
{
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,
(long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
runcount);
}
#endif /* TRACE */
@ -600,36 +625,31 @@ static bool _nc_mouse_parse(int runcount)
/* first pass; merge press/release pairs */
do {
merge = FALSE;
for (ep = runp; next = NEXT(ep), next != eventp; ep = next)
{
for (ep = runp; next = NEXT(ep), next != eventp; ep = next) {
if (ep->x == next->x && ep->y == next->y
&& (ep->bstate & (BUTTON1_PRESSED|BUTTON2_PRESSED|BUTTON3_PRESSED))
&& (ep->bstate & (BUTTON1_PRESSED | BUTTON2_PRESSED | BUTTON3_PRESSED))
&& (!(ep->bstate & BUTTON1_PRESSED)
== !(next->bstate & BUTTON1_RELEASED))
&& (!(ep->bstate & BUTTON2_PRESSED)
== !(next->bstate & BUTTON2_RELEASED))
&& (!(ep->bstate & BUTTON3_PRESSED)
== !(next->bstate & BUTTON3_RELEASED))
)
{
) {
if ((eventmask & BUTTON1_CLICKED)
&& (ep->bstate & BUTTON1_PRESSED))
{
ep->bstate &=~ BUTTON1_PRESSED;
&& (ep->bstate & BUTTON1_PRESSED)) {
ep->bstate &= ~BUTTON1_PRESSED;
ep->bstate |= BUTTON1_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON2_CLICKED)
&& (ep->bstate & BUTTON2_PRESSED))
{
ep->bstate &=~ BUTTON2_PRESSED;
&& (ep->bstate & BUTTON2_PRESSED)) {
ep->bstate &= ~BUTTON2_PRESSED;
ep->bstate |= BUTTON2_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON3_CLICKED)
&& (ep->bstate & BUTTON3_PRESSED))
{
ep->bstate &=~ BUTTON3_PRESSED;
&& (ep->bstate & BUTTON3_PRESSED)) {
ep->bstate &= ~BUTTON3_PRESSED;
ep->bstate |= BUTTON3_CLICKED;
merge = TRUE;
}
@ -641,12 +661,11 @@ static bool _nc_mouse_parse(int runcount)
(merge);
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT)
{
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,
(long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
runcount);
}
#endif /* TRACE */
@ -668,12 +687,11 @@ static bool _nc_mouse_parse(int runcount)
* which would get us into portability trouble.
*/
do {
MEVENT *follower;
MEVENT *follower;
merge = FALSE;
for (ep = runp; next = NEXT(ep), next != eventp; ep = next)
if (ep->id != INVALID_EVENT)
{
if (ep->id != INVALID_EVENT) {
if (next->id != INVALID_EVENT)
continue;
follower = NEXT(next);
@ -684,26 +702,22 @@ static bool _nc_mouse_parse(int runcount)
if ((ep->bstate &
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))
&& (follower->bstate &
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED)))
{
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) {
if ((eventmask & BUTTON1_DOUBLE_CLICKED)
&& (follower->bstate & BUTTON1_CLICKED))
{
follower->bstate &=~ BUTTON1_CLICKED;
&& (follower->bstate & BUTTON1_CLICKED)) {
follower->bstate &= ~BUTTON1_CLICKED;
follower->bstate |= BUTTON1_DOUBLE_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON2_DOUBLE_CLICKED)
&& (follower->bstate & BUTTON2_CLICKED))
{
follower->bstate &=~ BUTTON2_CLICKED;
&& (follower->bstate & BUTTON2_CLICKED)) {
follower->bstate &= ~BUTTON2_CLICKED;
follower->bstate |= BUTTON2_DOUBLE_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON3_DOUBLE_CLICKED)
&& (follower->bstate & BUTTON3_CLICKED))
{
follower->bstate &=~ BUTTON3_CLICKED;
&& (follower->bstate & BUTTON3_CLICKED)) {
follower->bstate &= ~BUTTON3_CLICKED;
follower->bstate |= BUTTON3_DOUBLE_CLICKED;
merge = TRUE;
}
@ -714,29 +728,25 @@ static bool _nc_mouse_parse(int runcount)
/* merge double-click events forward */
if ((ep->bstate &
(BUTTON1_DOUBLE_CLICKED
| BUTTON2_DOUBLE_CLICKED
| BUTTON3_DOUBLE_CLICKED))
| BUTTON2_DOUBLE_CLICKED
| BUTTON3_DOUBLE_CLICKED))
&& (follower->bstate &
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED)))
{
(BUTTON1_CLICKED | BUTTON2_CLICKED | BUTTON3_CLICKED))) {
if ((eventmask & BUTTON1_TRIPLE_CLICKED)
&& (follower->bstate & BUTTON1_CLICKED))
{
follower->bstate &=~ BUTTON1_CLICKED;
&& (follower->bstate & BUTTON1_CLICKED)) {
follower->bstate &= ~BUTTON1_CLICKED;
follower->bstate |= BUTTON1_TRIPLE_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON2_TRIPLE_CLICKED)
&& (follower->bstate & BUTTON2_CLICKED))
{
follower->bstate &=~ BUTTON2_CLICKED;
&& (follower->bstate & BUTTON2_CLICKED)) {
follower->bstate &= ~BUTTON2_CLICKED;
follower->bstate |= BUTTON2_TRIPLE_CLICKED;
merge = TRUE;
}
if ((eventmask & BUTTON3_TRIPLE_CLICKED)
&& (follower->bstate & BUTTON3_CLICKED))
{
follower->bstate &=~ BUTTON3_CLICKED;
&& (follower->bstate & BUTTON3_CLICKED)) {
follower->bstate &= ~BUTTON3_CLICKED;
follower->bstate |= BUTTON3_TRIPLE_CLICKED;
merge = TRUE;
}
@ -748,12 +758,11 @@ static bool _nc_mouse_parse(int runcount)
(merge);
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT)
{
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,
(long) ((eventp - events) + (EV_MAX - 1)) % EV_MAX,
runcount);
}
#endif /* TRACE */
@ -766,28 +775,28 @@ static bool _nc_mouse_parse(int runcount)
if (prev->id == INVALID_EVENT || !(prev->bstate & eventmask)) {
eventp = prev;
}
#ifdef TRACE
if (_nc_tracing & TRACE_IEVENT)
{
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,
(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)));
TR(MY_TRACE,
("_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? */
return(PREV(eventp)->id != INVALID_EVENT);
return (PREV(eventp)->id != INVALID_EVENT);
}
static void _nc_mouse_wrap(SCREEN *sp GCC_UNUSED)
static void
_nc_mouse_wrap(SCREEN * sp GCC_UNUSED)
/* release mouse -- called by endwin() before shellout/exit */
{
TR(MY_TRACE, ("_nc_mouse_wrap() called"));
@ -799,13 +808,14 @@ static void _nc_mouse_wrap(SCREEN *sp GCC_UNUSED)
break;
#if USE_GPM_SUPPORT
/* GPM: pass all mouse events to next client */
case M_GPM:
break;
case M_GPM:
break;
#endif
}
}
static void _nc_mouse_resume(SCREEN *sp GCC_UNUSED)
static void
_nc_mouse_resume(SCREEN * sp GCC_UNUSED)
/* re-connect to mouse -- called by doupdate() after shellout */
{
TR(MY_TRACE, ("_nc_mouse_resume() called"));
@ -823,22 +833,22 @@ static void _nc_mouse_resume(SCREEN *sp GCC_UNUSED)
*
**************************************************************************/
int getmouse(MEVENT *aevent)
int
getmouse(MEVENT * aevent)
/* grab a copy of the current mouse event */
{
T((T_CALLED("getmouse(%p)"), aevent));
if (aevent && (mousetype != M_NONE))
{
if (aevent && (mousetype != M_NONE)) {
/* compute the current-event pointer */
MEVENT *prev = PREV(eventp);
MEVENT *prev = PREV(eventp);
/* copy the event we find there */
*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);
@ -846,7 +856,8 @@ int getmouse(MEVENT *aevent)
returnCode(ERR);
}
int ungetmouse(MEVENT *aevent)
int
ungetmouse(MEVENT * aevent)
/* enqueue a synthesized mouse event to be seen by the next wgetch() */
{
/* stick the given event in the next-free slot */
@ -859,7 +870,8 @@ int ungetmouse(MEVENT *aevent)
return ungetch(KEY_MOUSE);
}
mmask_t mousemask(mmask_t newmask, mmask_t *oldmask)
mmask_t
mousemask(mmask_t newmask, mmask_t * oldmask)
/* set the mouse event mask */
{
mmask_t result = 0;
@ -873,16 +885,15 @@ mmask_t mousemask(mmask_t newmask, mmask_t *oldmask)
returnCode(0);
_nc_mouse_init();
if ( mousetype != M_NONE )
{
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);
@ -892,21 +903,22 @@ mmask_t mousemask(mmask_t newmask, mmask_t *oldmask)
returnCode(result);
}
bool wenclose(const WINDOW *win, int y, int x)
bool
wenclose(const WINDOW *win, int y, int x)
/* check to see if given window encloses given screen location */
{
if (win)
{
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;
}
int mouseinterval(int maxclick)
int
mouseinterval(int maxclick)
/* set the maximum mouse interval within which to recognize a click */
{
int oldval;
@ -919,46 +931,44 @@ int mouseinterval(int maxclick)
oldval = DEFAULT_MAXCLICK;
}
return(oldval);
return (oldval);
}
/* This may be used by other routines to ask for the existence of mouse
support */
int _nc_has_mouse(void) {
return (mousetype==M_NONE ? 0:1);
int
_nc_has_mouse(void)
{
return (mousetype == M_NONE ? 0 : 1);
}
bool wmouse_trafo(const WINDOW* win, int* pY, int* pX, bool to_screen)
bool
wmouse_trafo(const WINDOW *win, int *pY, int *pX, bool to_screen)
{
bool result = FALSE;
bool result = FALSE;
if (win && pY && pX)
{
int y = *pY; int x = *pX;
if (win && pY && pX) {
int y = *pY;
int x = *pX;
if (to_screen)
{
y += win->_begy + win->_yoffset;
x += win->_begx;
if (wenclose(win,y,x))
result = TRUE;
}
else
{
if (wenclose(win,y,x))
{
y -= (win->_begy + win->_yoffset);
x -= win->_begx;
result = TRUE;
if (to_screen) {
y += win->_begy + win->_yoffset;
x += win->_begx;
if (wenclose(win, y, x))
result = TRUE;
} else {
if (wenclose(win, y, x)) {
y -= (win->_begy + win->_yoffset);
x -= win->_begx;
result = TRUE;
}
}
if (result)
{
*pX = x;
*pY = y;
if (result) {
*pX = x;
*pY = y;
}
}
return(result);
return (result);
}
/* lib_mouse.c ends here */

Some files were not shown because too many files have changed in this diff Show More