MFV r262617: ncurses 5.9.

This commit is contained in:
delphij 2014-02-28 23:48:13 +00:00
commit 27526f9f8f
491 changed files with 40183 additions and 12825 deletions

View File

@ -1,4 +1,4 @@
Announcing ncurses 5.7
Announcing ncurses 5.9
The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format,
@ -27,217 +27,30 @@
Release Notes
This release is designed to be upward compatible from ncurses 5.0
through 5.6; very few applications will require recompilation,
through 5.8; very few applications will require recompilation,
depending on the platform. These are the highlights from the
change-log since ncurses 5.6 release.
change-log since ncurses 5.8 release.
Interface changes:
* generate linkable stubs for some macros:
getattrs
This is a bug-fix release, correcting a small number of urgent
problems in the ncurses library from the 5.8 release.
New features and improvements:
* library
+ new flavor of the ncurses library provides rudimentary
support for POSIX threads. Several functions are reentrant,
but most require either a window-level or screen-level mutex.
(This is API-compatible, but not ABI-compatible with the
normal library).
+ add NCURSES_OPAQUE symbol to curses.h, will use to make
structs opaque in selected configurations.
+ add NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS symbols to
curses.h to make it simpler to tell if the extended functions
and/or colors are declared.
+ add wresize() to C++ binding
+ eliminate fixed-buffer vsprintf() calls in C++ binding.
+ add several functions to C++ binding which wrap C functions
that pass a WINDOW* parameter.
+ adapt mouse-handling code from menu library in form-library
+ improve tracing for form library, showing created forms,
fields, etc.
+ make $NCURSES_NO_PADDING feature work for termcap interface .
+ add check to trace-file open, if the given name is a
directory, add ".log" to the name and try again.
+ several new manpages: curs_legacy.3x, curs_memleaks.3x,
curs_opaque.3x and curs_threads.3x
* programs:
+ modified three test-programs to demonstrate the threading
support in this version: ditto, rain, worm.
+ several new test-programs: demo_panels, dots_mvcur,
inch_wide, inchs, key_name, key_names, savescreen,
savescreen.sh test_arrays, test_get_wstr, test_getstr,
test_instr, test_inwstr and test_opaque.
+ add adacurses-config to the Ada95 install.
+ modify tic -f option to format spaces as \s to prevent them
from being lost when that is read back in unformatted
strings.
+ The tack program is now distributed separately from ncurses.
* terminal database
+ added entries:
o Eterm-256color, Eterm-88color and rxvt-88color
o aterm
o konsole-256color
o mrxvt
o screen.mlterm
o screen.rxvt
o teraterm4.59 is now the primary primary teraterm entry,
renamed original to teraterm2.3
o 9term terminal
o Newbury Data entries
+ updated/improved entries:
o gnome to version 2.22.3
o h19, z100
o konsole to version 1.6.6
o mlterm, mlterm+pcfkeys
o xterm, and building-blocks for function-keys to [3]xterm
patch #230.
Major bug fixes:
* add logic to tic for cancelling strings in user-defined
capabilities (this is needed for current konsole terminfo entry).
* modify mk-1st.awk so the generated makefile rules for linking or
installing shared libraries do not first remove the library, in
case it is in use, e.g., libncurses.so by /bin/sh.
* correct check for notimeout() in wgetch().
* fix a sign-extension bug in infocmp's repair_acsc() function.
* change winnstr() to stop at the end of the line.
* make Ada95 demo_panels() example work.
* fix for adding a non-spacing character at the beginning of a line.
* fill in extended-color pair to make colors work for
wide-characters using extended-colors.
* improve refresh of window on top of multi-column characters,
taking into account split characters on left/right window
boundaries.
* modify win_wchnstr() to ensure that only a base cell is returned
for each multi-column character.
* improve waddch() and winsch() handling of EILSEQ from mbrtowc() by
using unctrl() to display illegal bytes rather than trying to
append further bytes to make up a valid sequence.
* restore curs_set() state after endwin()/refresh()
* modify keyname() to use "^X" form only if meta() has been called,
or if keyname() is called without initializing curses, e.g., via
initscr() or newterm().
* modify unctrl() to check codes in 128-255 range versus isprint().
If they are not printable, and locale was set, use a "M-" or "~"
sequence.
* improve resizeterm() by moving ripped-off lines, and repainting
the soft-keys.
* modify form library to accept control characters such as newline
in set_field_buffer(), which is compatible with Solaris.
* use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc.,
to make those work properly with the --enable-ext-mouse
configuration
* correct some functions in Ada95 binding which were using return
value from C where none was returned.
* reviewed/fixed issues reported by Coverity and Klocwork tools.
Portability:
* configure script:
+ new options:
--disable-big-strings
control whether static string tables are generated
as single large strings (to improve startup
performance), or as array of individual strings.
--disable-relink
control whether shared libraries are relinked
(during install) when rpath is enabled.
--disable-tic-depends
make explicit whether tic library depends on
ncurses/ncursesw library.
--enable-mixed-case
override the configure script's check if the
filesystem supports mixed-case filenames. This
allows one to control how the terminal database
maps to the filesystem. For filesystems that do not
support mixed-case, the library uses generate
2-character (hexadecimal) codes for the lower-level
of the filesystem terminfo database
--enable-reentrant
builds a different flavor of the ncurses library
(ncursest) which improves reentrant use of the
library by reducing global and static variables
(see the "--with-pthread" option for the threaded
support).
--enable-weak-symbols
use weak-symbols for linking to the POSIX thread
library, and use the same soname for the ncurses
shared library as the normal library (caveat: the
ABI is for the threaded library, which makes global
data accessed via functions).
--with-pthread
build with the POSIX thread library (tested with
AIX, Linux, FreeBSD, OpenBSD, HPUX, IRIX64,
Solaris, Tru64).
--with-ticlib
build/install the tic-support functions in a
separate library
+ improved options:
--enable-ext-colors
requires the wide-character configuration.
--with-chtype
ignore option value "unsigned" is always added to
the type in curses.h; do the same for
--with-mmask-t.
--with-dmalloc
build-fix for redefinition of strndup.
--with-hashed-db
accepts a parameter which is the install-prefix of
a given Berkeley Database.
--with-hashed-db
the $LIBS environment variable overrides the search
for the db library.
--without-hashed-db
assumed when "--disable-database" is used.
* other configure/build issues:
+ build-fixes for LynxOS
+ modify shared-library rules to allow FreeBSD 3.x to use
rpath.
+ build-fix for FreeBSD "contemporary" TTY interface.
+ build-fixes for AIX with libtool.
+ build-fixes for Darwin and libtool.
+ modify BeOS-specific ifdef's to build on Haiku.
+ corrected gcc options for building shared libraries on
Solaris and IRIX64.
+ change shared-library configuration for OpenBSD, make rpath
work.
+ build-fixes for using libutf8, e.g., on OpenBSD 3.7
+ add "-e" option in ncurses/Makefile.in when generating
source-files to force earlier exit if the build environment
fails unexpectedly.
+ add support for shared libraries for QNX.
+ change delimiter in MKlib_gen.sh from '%' to '@', to avoid
substitution by IBM xlc to '#' as part of its extensions to
digraphs.
* library:
+ rewrite wrapper for wcrtomb(), making it work on Solaris.
This is used in the form library to determine the length of
the buffer needed by field_buffer.
+ add/use configure script macro CF_SIG_ATOMIC_T, use the
corresponding type for data manipulated by signal handlers.
+ set locale in misc/ncurses-config.in since it uses a range
+ disable GPM mouse support when $TERM does not happen to
contain "linux", since Gpm_Open() no longer limits its
assertion to terminals that it might handle, e.g., within
"screen" in xterm.
+ reset mouse file-descriptor when unloading GPM library.
* test programs:
+ update test programs to build/work with various UNIX curses
for comparisons.
It also improves the Ada95 binding:
* fixes a longstanding portability problem with its use of the
[3]set_field_type function. Because that function uses
variable-length argument lists, its interface with gnat does not
work with certain platforms.
* improves configurability and portability, particularly when built
separately from the main ncurses tree. The 5.8 release introduced
scripts which can be used to construct separate tarballs for the
Ada95 and ncurses examples.
Those were a proof of concept. For the 5.9 release, those scripts
are augmented with rpm- and dpkg-scripts used in test builds
against a variety of gnat- and system ncurses versions as old as
gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
[4]here.
* additional improvements were made for portability of the ncurses
examples, adding rpm- and dpkg-scripts for test-builds. See
[5]this page for snapshots and other information.
Features of Ncurses
@ -274,15 +87,15 @@
* Support for mouse event reporting with X Window xterm and FreeBSD
and OS/2 console windows.
* Extended mouse support via Alessandro Rubini's gpm package.
* The function wresize() allows you to resize windows, preserving
* The function wresize allows you to resize windows, preserving
their data.
* The function use_default_colors() allows you to use the terminal's
* The function use_default_colors allows you to use the terminal's
default colors for the default color pair, achieving the effect of
transparent colors.
* The functions keyok() and define_key() 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.
* The functions keyok and define_key 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.
* Support for 256-color terminals, such as modern xterm, when
configured using the --enable-ext-colors option.
* Support for 16-color terminals, such as aixterm and modern xterm.
@ -293,7 +106,7 @@
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.
powerful than the 4.4BSD curses quickch routine.
* 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
@ -356,55 +169,55 @@
cdk
Curses Development Kit
[4]http://invisible-island.net/cdk/
[5]http://www.vexus.ca/products/CDK/
[6]http://invisible-island.net/cdk/
[7]http://www.vexus.ca/products/CDK/
ded
directory-editor
[6]http://invisible-island.net/ded/
[8]http://invisible-island.net/ded/
dialog
the underlying application used in Slackware's setup, and the
basis for similar applications on GNU/Linux.
[7]http://invisible-island.net/dialog/
[9]http://invisible-island.net/dialog/
lynx
the character-screen WWW browser
[8]http://lynx.isc.org/release/
[10]http://lynx.isc.org/release/
Midnight Commander
file manager
[9]http://www.ibiblio.org/mc/
[11]http://www.midnight-commander.org/
mutt
mail utility
[10]http://www.mutt.org/
[12]http://www.mutt.org/
ncftp
file-transfer utility
[11]http://www.ncftp.com/
[13]http://www.ncftp.com/
nvi
New vi versions 1.50 are able to use ncurses versions 1.9.7 and
later.
[12]http://www.bostic.com/vi/
[14]https://sites.google.com/a/bostic.com/keithbostic/nvi
pinfo
Lynx-like info browser.
[13]https://alioth.debian.org/projects/pinfo/
[15]https://alioth.debian.org/projects/pinfo/
tin
newsreader, supporting color, MIME [14]http://www.tin.org/
newsreader, supporting color, MIME [16]http://www.tin.org/
as well as some that use ncurses for the terminfo support alone:
minicom
terminal emulator
[15]http://alioth.debian.org/projects/minicom/
[17]http://alioth.debian.org/projects/minicom/
vile
vi-like-emacs
[16]http://invisible-island.net/vile/
[18]http://invisible-island.net/vile/
The ncurses distribution includes a selection of test programs
(including a few games).
@ -412,11 +225,11 @@
Who's Who and What's What
Zeyd Ben-Halim started it from a previous package pcurses, written by
Pavel Curtis. Eric S. Raymond continued development. Jürgen Pfeifer
Pavel Curtis. Eric S. Raymond continued development. Juergen Pfeifer
wrote most of the form and menu libraries. Ongoing work is being done
by [17]Thomas Dickey. Thomas Dickey acts as the maintainer for the
by [19]Thomas Dickey. Thomas Dickey acts as the maintainer for the
Free Software Foundation, which holds the copyright on ncurses.
Contact the current maintainers at [18]bug-ncurses@gnu.org.
Contact the current maintainers at [20]bug-ncurses@gnu.org.
To join the ncurses mailing list, please write email to
bug-ncurses-request@gnu.org containing the line:
@ -426,7 +239,7 @@ Who's Who and What's What
and testing of this package.
Beta versions of ncurses and patches to the current release are made
available at [19]ftp://invisible-island.net/ncurses/ .
available at [21]ftp://invisible-island.net/ncurses/ .
Future Plans
@ -440,34 +253,36 @@ Future Plans
Other Related Resources
The distribution provides a newer version of the terminfo-format
terminal description file once maintained by [20]Eric Raymond . Unlike
terminal description file once maintained by [22]Eric Raymond . Unlike
the older version, the termcap and terminfo data are provided in the
same file, and provides several user-definable extensions beyond the
X/Open specification.
You can find lots of information on terminal-related topics not
covered in the terminfo file at [21]Richard Shuford's archive .
covered in the terminfo file at [23]Richard Shuford's archive .
References
1. ftp://ftp.gnu.org/gnu/ncurses/
2. ftp://invisible-island.net/ncurses/
3. http://invisible-island.net/xterm/xterm.log.html#xterm_230
4. http://invisible-island.net/cdk/
5. http://www.vexus.ca/products/CDK/
6. http://invisible-island.net/ded/
7. http://invisible-island.net/dialog/
8. http://lynx.isc.org/release/
9. http://www.ibiblio.org/mc/
10. http://www.mutt.org/
11. http://www.ncftp.com/
12. http://www.bostic.com/vi/
13. https://alioth.debian.org/projects/pinfo/
14. http://www.tin.org/
15. http://alioth.debian.org/projects/minicom/
16. http://invisible-island.net/vile/
17. mailto:dickey@invisible-island.net
18. mailto:bug-ncurses@gnu.org
19. ftp://invisible-island.net/ncurses/
20. http://www.catb.org/~esr/terminfo/
21. http://www.cs.utk.edu/~shuford/terminal_index.html
3. http://invisible-island.net/ncurses/man/form_fieldtype.3x
4. http://invisible-island.net/ncurses/ncurses-Ada95.html
5. http://invisible-island.net/ncurses/ncurses-examples.html
6. http://invisible-island.net/cdk/
7. http://www.vexus.ca/products/CDK/
8. http://invisible-island.net/ded/
9. http://invisible-island.net/dialog/
10. http://lynx.isc.org/release/
11. http://www.midnight-commander.org/
12. http://www.mutt.org/
13. http://www.ncftp.com/
14. https://sites.google.com/a/bostic.com/keithbostic/nvi
15. https://alioth.debian.org/projects/pinfo/
16. http://www.tin.org/
17. http://alioth.debian.org/projects/minicom/
18. http://invisible-island.net/vile/
19. mailto:dickey@invisible-island.net
20. mailto:bug-ncurses@gnu.org
21. ftp://invisible-island.net/ncurses/
22. http://www.catb.org/~esr/terminfo/
23. http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. --
-- Copyright (c) 1998-2010,2011 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 --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.135 2008/11/02 21:13:51 tom Exp $
-- $Id: INSTALL,v 1.155 2011/03/31 08:27:24 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -39,9 +39,8 @@ d.d is the current version number. There should be several subdirectories,
including `c++', `form', `man', `menu', 'misc', `ncurses', `panel', `progs',
and `test'. See the README file for a roadmap to the package.
If you are a Linux or FreeBSD or NetBSD distribution integrator or packager,
please read and act on the section titled IF YOU ARE A SYSTEM INTEGRATOR
below.
If you are a distribution integrator or packager, please read and act on the
section titled IF YOU ARE A SYSTEM INTEGRATOR below.
If you are converting from BSD curses and do not have root access, be sure
to read the BSD CONVERSION NOTES section below.
@ -58,10 +57,6 @@ CROSS-COMPILER.
If you want to build the Ada95 binding, go to the Ada95 directory and
follow the instructions there. The Ada95 binding is not covered below.
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:
------------
@ -86,14 +81,14 @@ INSTALLATION PROCEDURE:
The --prefix option to configure changes the root directory for installing
ncurses. The default is normally in subdirectories of /usr/local, except
for systems where ncurses is normally installed as a system library, e.g.,
Linux, the various BSD systems and Cygwin. Use --prefix=/usr to replace
your default curses distribution.
for systems where ncurses is normally installed as a system library (see
"IF YOU ARE A SYSTEM INTEGRATOR"). Use --prefix=/usr to replace your
default curses distribution.
The package gets installed beneath the --prefix directory as follows:
In $(prefix)/bin: tic, infocmp, captoinfo, tset,
reset, clear, tput, toe
reset, clear, tput, toe, tabs
In $(prefix)/lib: libncurses*.* libcurses.a
In $(prefix)/share/terminfo: compiled terminal descriptions
In $(prefix)/include: C header files
@ -147,7 +142,7 @@ INSTALLATION PROCEDURE:
library interfaces are not binary-compatible with the non-wide-character
version. Building and running the wide-character code relies on a fairly
recent implementation of libiconv. We have built this configuration on
Linux using libiconv, sometimes requiring libutf8.
various systems using libiconv, sometimes requiring libutf8.
If you configure using the --with-pthread option, a "t" is appended to
the library names (e.g., libncursest.a, libncursestw.a).
@ -170,8 +165,8 @@ INSTALLATION PROCEDURE:
./configure --with-shared --without-normal --without-debug
Rules for generating shared libraries are highly dependent upon the choice
of host system and compiler. We've been testing shared libraries on Linux
and SunOS with gcc, but more work needs to be done to make shared libraries
of host system and compiler. We've been testing shared libraries on
several systems, but more work needs to be done to make shared libraries
work on other systems.
If you have libtool installed, you can type
@ -338,6 +333,17 @@ SUMMARY OF CONFIGURE OPTIONS:
--disable-largefile
Disable compiler flags needed to use large-file interfaces.
--disable-libtool-version
when using --with-libtool, control how the major/minor version numbers
are used for constructing the library name.
The default uses the -version-number feature of libtool, which makes
the library names compatible (though not identical) with the standard
build using --with-shared.
Use --disable-libtool-version to use the libtool -version-info feature.
This corresponds to the setting used before patch 20100515.
--disable-leaks
For testing, compile-in code that frees memory that normally would not
be freed, to simplify analysis of memory-leaks.
@ -389,6 +395,12 @@ SUMMARY OF CONFIGURE OPTIONS:
application. These are (for example $TERMINFO) those that allow the
search path for the terminfo or termcap entry to be customized.
--disable-rpath-hack
Normally the configure script helps link libraries found in unusual
places by adding an rpath option to the link command. If you are
building packages, this feature may be redundant. Use this option
to suppress the feature.
--disable-scroll-hints
Compile without scroll-hints code. This option is ignored when
hashmap scrolling is configured, which is the default.
@ -513,6 +525,10 @@ SUMMARY OF CONFIGURE OPTIONS:
may not be accurate, or that your stty settings have disabled the use
of tabs.
--enable-interop
Compile-in experimental interop bindings. These provide generic types
for the form-library.
--enable-mixed-case
Controls whether the filesystem on which the terminfo database resides
supports mixed-case filenames (normal for UNIX, but not on other
@ -525,6 +541,15 @@ SUMMARY OF CONFIGURE OPTIONS:
terminfo entries. This is the default, unless you have disabled the
extended functions.
--enable-pc-files
If pkg-config is found (see --with-pkg-config), generate ".pc" files
for each of the libraries, and install them in pkg-config's library
directory.
--enable-pthreads-eintr
add logic in threaded configuration to ensure that a read(2) system
call can be interrupted for SIGWINCH.
--enable-reentrant
Compile experimental configuration which improves reentrant use of the
library by reducing global and static variables. This option is also
@ -565,6 +590,11 @@ SUMMARY OF CONFIGURE OPTIONS:
is not strictly compatible. This option allows one to implement this
alteration without patching the source code.
--enable-sp-funcs
Compile-in support for extended functions which accept a SCREEN pointer,
reducing the need for juggling the global SP value with set_term() and
delscreen().
--enable-symlinks
If your system supports symbolic links, make tic use symbolic links
rather than hard links to save diskspace when writing aliases in the
@ -576,6 +606,11 @@ SUMMARY OF CONFIGURE OPTIONS:
capabilities as user-defined strings. This option is the default,
unless you have disabled the extended functions.
--enable-term-driver
Enable experimental terminal-driver. This is currently used for the
MinGW port, by providing a way to substitute the low-level terminfo
library with different terminal drivers.
--enable-termcap
Compile in support for reading terminal descriptions from termcap if no
match is found in the terminfo database. See also the --enable-getcap
@ -630,12 +665,23 @@ SUMMARY OF CONFIGURE OPTIONS:
--with-ada-objects=DIR
Tell where to install the Ada objects (default: PREFIX/lib/ada/adalib)
--with-ada-sharedlib
Build a shared library for Ada95 binding, if the compiler permits.
NOTE: You must also set the --with-shared option on some platforms
for a successful build. You need not use this option when you set
--with-shared, unless you want to use the Ada shared library.
--with-bool=TYPE
If --without-cxx is specified, override the type used for the "bool"
declared in curses.h (normally the type is automatically chosen to
correspond with that in <stdbool.h>, or defaults to platform-specific
sizes).
--with-build-cpp=XXX
This option is provided by the same macro used for $BUILD_CC, etc.,
but is not directly used by ncurses.
--with-build-cc=XXX
If cross-compiling, specify a host C compiler, which is needed to
compile a few utilities which generate source modules for ncurses.
@ -682,12 +728,17 @@ SUMMARY OF CONFIGURE OPTIONS:
to use a terminfo database which is compatible with the native
applications.
--with-ccharw-max=XXX
Override the size of the wide-character array in cchar_t structures.
Changing this will alter the binary interface. This defaults to 5.
--with-chtype=TYPE
Override type of chtype, which stores the video attributes and (if
--enable-widec is not given) a character. Prior to ncurses 5.5, this
was always unsigned long, but with ncurses 5.5, it may be unsigned.
Use this option if you need to preserve compatibility with 64-bit
executables.
executables, e.g., by setting "--with-chtype=long" (the configure
script supplies "unsigned").
--with-database=XXX
Specify the terminfo source file to install. Usually you will wish
@ -807,9 +858,9 @@ SUMMARY OF CONFIGURE OPTIONS:
--with-manpage-renames=XXX
Tell the configure script that you wish to rename the manpages while
installing. Currently the only distribution which does this is
the Linux Debian. The option value specifies the name of a file
that lists the renamed files, e.g., $srcdir/man/man_db.renames
installing. Currently the only distribution which does this is Debian.
The option value specifies the name of a file that lists the renamed
files, e.g., $srcdir/man/man_db.renames
--with-manpage-symlinks
Tell the configure script that you wish to make symbolic links in the
@ -850,6 +901,9 @@ SUMMARY OF CONFIGURE OPTIONS:
those using termcap, do not use the higher speeds. Your application
(or system, in general) may or may not.
--with-pkg-config=[DIR]
Check for pkg-config, optionally specifying its path.
--with-profile
Generate profile-libraries These are named by adding "_p" to the root,
e.g., libncurses_p.a
@ -887,6 +941,10 @@ SUMMARY OF CONFIGURE OPTIONS:
$LD_LIBRARY_PATH to point to the build tree, e.g.,
./misc/shlib make install
NOTE: If you use the --with-ada-sharedlib option, you should also
set this option, to ensure that C-language modules needed for the
Ada binding use appropriate compiler options.
--with-shlib-version=XXX
Specify whether to use the release or ABI version for shared libraries.
This is normally chosen automatically based on the type of system
@ -946,6 +1004,17 @@ SUMMARY OF CONFIGURE OPTIONS:
For testing, compile with debug option.
This also sets the --disable-leaks option.
--with-wrap-prefix=XXX
When using the --enable-reentrant option, ncurses redefines variables
that would be global in curses, e.g., LINES, as a macro that calls a
"wrapping" function which fetches the data from the current SCREEN
structure. Normally that function is named by prepending "_nc_" to the
variable's name. The function is technically private (since portable
applications would not refer directly to it). But according to one
line of reasoning, it is not the same type of "private" as functions
which applications should not call even via a macro. This configure
option lets you choose the prefix for these wrapped variables.
--without-ada
Suppress the configure script's check for Ada95, do not build the
Ada95 binding and related demo.
@ -975,11 +1044,18 @@ SUMMARY OF CONFIGURE OPTIONS:
--without-dlsym
Do not use dlsym() to load GPM dynamically.
--without-manpages
Tell the configure script to suppress the install of ncurses' manpages.
--without-progs
Tell the configure script to suppress the build of ncurses' application
programs (e.g., tic). The test applications will still be built if you
type "make", though not if you simply do "make install".
--without-tests
Tell the configure script to suppress the build of ncurses' test
programs.
--without-xterm-new
Tell the configure script to use "xterm-old" for the entry used in
the terminfo database. This will work with variations such as
@ -1001,6 +1077,60 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
you may encounter when building a system with different versions of
ncurses:
5.8 (Feb 26, 2011)
Interface changes:
+ add an alternate library configuration, i.e., "terminal driver" to
support port to Windows, built with MinGW. There are two drivers
(terminfo and Windows console). The terminfo driver works on other
platforms.
+ add a new set of functions which accept a SCREEN* parameter, in
contrast with the original set which use the global value "sp".
By default, these names end with "_sp", and are otherwise
functionally identical with the originals.
In addition to the "_sp" functions, there are a few new functions
associated with this feature: ceiling_panel, ground_panel,
new_prescr.
If the library is not built with the sp-funcs extension, there
are no related interface changes.
+ add tiparm function based on review of X/Open Curses Issue 7.
+ change internal _nc_has_mouse function to public has_mouse function
Added extensions:
+ add a few more functions to support the NCURSES_OPAQUE feature:
get_escdelay, is_pad, is_subwin
Added internal functions (other than "_sp" variants):
_nc_curscr_of
_nc_format_slks
_nc_get_alias_table
_nc_get_hash_info
_nc_insert_wch
_nc_newscr_of
_nc_outc_wrapper
_nc_retrace_char
_nc_retrace_int_attr_t
_nc_retrace_mmask_t
_nc_setup_tinfo
_nc_stdscr_of
_nc_tinfo_cmdch
Removed internal functions:
_nc_makenew (some configurations replace by _nc_makenew_sp)
Modified internal functions:
_nc_UpdateAttrs
_nc_get_hash_table
_nc_has_mouse
_nc_insert_ch
_nc_wgetch
5.7 (November 2, 2008)
Interface changes:
@ -1438,8 +1568,8 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
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
We bumped to version 4.0 because the newly released Linux dynamic
loader (ld.so.1.8.5) 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.
@ -1499,7 +1629,7 @@ IF YOU ARE A SYSTEM INTEGRATOR:
On platforms where ncurses is assumed to be installed in /usr/lib,
the configure script uses "/usr" as a default:
Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin
For other platforms, the default is "/usr/local". See the discussion
of the "--disable-overwrite" option.
@ -1562,7 +1692,7 @@ IF YOU ARE A SYSTEM INTEGRATOR:
bsdos -- BSD/OS
If you are responsible for integrating ncurses for one of these
distribution, please either use the recommended name or get back
distributions, please either use the recommended name or get back
to us explaining why you don't want to, so we can work out nomenclature
that will make users' lives easier rather than harder.
@ -1584,7 +1714,8 @@ CONFIGURING FALLBACK ENTRIES:
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
pre-fetched fallback entries. This must be done on a machine which
has ncurses' infocmp and terminfo database installed.
has ncurses' infocmp and terminfo database installed (as well as
ncurses' tic and infocmp programs).
These entries are checked by setupterm() only when the conventional
fetches from the terminfo tree and the termcap fallback (if configured)
@ -1689,8 +1820,8 @@ USING NCURSES WITH AFS:
with this by making tic use symbolic links.
USING NCURSES WITH GPM:
Ncurses 4.1 and up can be configured to use GPM (General Purpose
Mouse) which is used on Linux console. Be aware that GPM is commonly
Ncurses 4.1 and up can be configured to use GPM (General Purpose Mouse)
which is used with Linux console. Be aware that GPM is commonly
installed as a shared library which contains a wrapper for the curses
wgetch() function (libcurses.o). Some integrators have simplified
linking applications by combining all or part of libcurses.so into the
@ -1735,6 +1866,10 @@ BUILDING NCURSES WITH A CROSS-COMPILER
option), ncurses uses the development platform's tic to do the
"make install.data" portion.
The system's tic program is used to install the terminal database,
even for cross-compiles. For best results, the tic program should
be from the most current version of ncurses.
BUGS:
Send any feedback to the ncurses mailing list at
bug-ncurses@gnu.org. To subscribe send mail to

View File

@ -3,6 +3,10 @@
./Ada95/Makefile.in
./Ada95/README
./Ada95/TODO
./Ada95/aclocal.m4
./Ada95/configure
./Ada95/configure.in
./Ada95/doc/Makefile.in
./Ada95/gen/Makefile.in
./Ada95/gen/adacurses-config.in
./Ada95/gen/gen.c
@ -23,6 +27,21 @@
./Ada95/gen/terminal_interface-curses-trace.ads.m4
./Ada95/gen/terminal_interface-curses.adb.m4
./Ada95/gen/terminal_interface-curses.ads.m4
./Ada95/include/MKncurses_def.sh
./Ada95/include/Makefile.in
./Ada95/include/ncurses_cfg.hin
./Ada95/include/ncurses_defs
./Ada95/make-tar.sh
./Ada95/mk-1st.awk
./Ada95/package/AdaCurses-doc.spec
./Ada95/package/AdaCurses.spec
./Ada95/package/debian/compat
./Ada95/package/debian/control
./Ada95/package/debian/copyright
./Ada95/package/debian/docs
./Ada95/package/debian/rules
./Ada95/package/debian/source/format
./Ada95/package/debian/watch
./Ada95/samples/Makefile.in
./Ada95/samples/README
./Ada95/samples/explain.txt
@ -109,6 +128,11 @@
./Ada95/samples/tour.adb
./Ada95/samples/tour.ads
./Ada95/src/Makefile.in
./Ada95/src/c_varargs_to_ada.c
./Ada95/src/c_varargs_to_ada.h
./Ada95/src/library.gpr
./Ada95/src/modules
./Ada95/src/ncurses_compat.c
./Ada95/src/terminal_interface-curses-aux.adb
./Ada95/src/terminal_interface-curses-forms-field_types-alpha.adb
./Ada95/src/terminal_interface-curses-forms-field_types-alpha.ads
@ -172,6 +196,7 @@
./Makefile.os2
./NEWS
./README
./README.MinGW
./README.emx
./TO-DO
./aclocal.m4
@ -311,6 +336,7 @@
./doc/html/announce.html
./doc/html/hackguide.html
./doc/html/index.html
./doc/html/man/adacurses-config.1.html
./doc/html/man/captoinfo.1m.html
./doc/html/man/clear.1.html
./doc/html/man/curs_add_wch.3x.html
@ -350,6 +376,7 @@
./doc/html/man/curs_inwstr.3x.html
./doc/html/man/curs_kernel.3x.html
./doc/html/man/curs_legacy.3x.html
./doc/html/man/curs_memleaks.3x.html
./doc/html/man/curs_mouse.3x.html
./doc/html/man/curs_move.3x.html
./doc/html/man/curs_opaque.3x.html
@ -363,6 +390,7 @@
./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_sp_funcs.3x.html
./doc/html/man/curs_termattrs.3x.html
./doc/html/man/curs_termcap.3x.html
./doc/html/man/curs_terminfo.3x.html
@ -370,6 +398,7 @@
./doc/html/man/curs_touch.3x.html
./doc/html/man/curs_trace.3x.html
./doc/html/man/curs_util.3x.html
./doc/html/man/curs_variables.3x.html
./doc/html/man/curs_window.3x.html
./doc/html/man/default_colors.3x.html
./doc/html/man/define_key.3x.html
@ -395,6 +424,7 @@
./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_variables.3x.html
./doc/html/man/form_win.3x.html
./doc/html/man/index.html
./doc/html/man/infocmp.1m.html
@ -427,10 +457,13 @@
./doc/html/man/mitem_value.3x.html
./doc/html/man/mitem_visible.3x.html
./doc/html/man/ncurses.3x.html
./doc/html/man/ncurses5-config.1.html
./doc/html/man/panel.3x.html
./doc/html/man/resizeterm.3x.html
./doc/html/man/tabs.1.html
./doc/html/man/term.5.html
./doc/html/man/term.7.html
./doc/html/man/term_variables.3x.html
./doc/html/man/terminfo.5.html
./doc/html/man/tic.1m.html
./doc/html/man/toe.1m.html
@ -479,12 +512,15 @@
./form/fty_alnum.c
./form/fty_alpha.c
./form/fty_enum.c
./form/fty_generic.c
./form/fty_int.c
./form/fty_ipv4.c
./form/fty_num.c
./form/fty_regex.c
./form/headers
./form/llib-lform
./form/llib-lformt
./form/llib-lformtw
./form/llib-lformw
./form/modules
./include/Caps
@ -507,16 +543,20 @@
./include/hashed_db.h
./include/headers
./include/nc_alloc.h
./include/nc_mingw.h
./include/nc_panel.h
./include/nc_tparm.h
./include/ncurses_cfg.hin
./include/ncurses_defs
./include/ncurses_dll.h
./include/ncurses_dll.h.in
./include/ncurses_mingw.h
./include/term_entry.h
./include/termcap.h.in
./include/tic.h
./include/unctrl.h.in
./install-sh
./man/MKada_config.in
./man/MKncu_config.in
./man/MKterminfo.sh
./man/Makefile.in
./man/captoinfo.1m
@ -572,6 +612,7 @@
./man/curs_scr_dump.3x
./man/curs_scroll.3x
./man/curs_slk.3x
./man/curs_sp_funcs.3x
./man/curs_termattrs.3x
./man/curs_termcap.3x
./man/curs_terminfo.3x
@ -579,6 +620,7 @@
./man/curs_touch.3x
./man/curs_trace.3x
./man/curs_util.3x
./man/curs_variables.3x
./man/curs_window.3x
./man/default_colors.3x
./man/define_key.3x
@ -604,6 +646,7 @@
./man/form_post.3x
./man/form_requestname.3x
./man/form_userptr.3x
./man/form_variables.3x
./man/form_win.3x
./man/infocmp.1m
./man/infotocap.1m
@ -640,8 +683,10 @@
./man/ncurses.3x
./man/panel.3x
./man/resizeterm.3x
./man/tabs.1
./man/term.5
./man/term.7
./man/term_variables.3x
./man/terminfo.head
./man/terminfo.tail
./man/tic.1m
@ -654,6 +699,8 @@
./menu/eti.h
./menu/headers
./menu/llib-lmenu
./menu/llib-lmenut
./menu/llib-lmenutw
./menu/llib-lmenuw
./menu/m_attribs.c
./menu/m_cursor.c
@ -694,13 +741,12 @@
./misc/emx.src
./misc/form.def
./misc/form.ref
./misc/gen-pkgconfig.in
./misc/gen_edit.sh
./misc/jpf-indent
./misc/makedef.cmd
./misc/makellib
./misc/menu.def
./misc/menu.ref
./misc/ncu-indent
./misc/ncurses-config.in
./misc/ncurses.def
./misc/ncurses.ref
@ -718,8 +764,8 @@
./mk-0th.awk
./mk-1st.awk
./mk-2nd.awk
./mk-dlls.sh.in
./mk-hdr.awk
./mkdirs.sh
./ncurses/Makefile.in
./ncurses/README
./ncurses/README.IZ
@ -748,6 +794,7 @@
./ncurses/base/lib_delch.c
./ncurses/base/lib_delwin.c
./ncurses/base/lib_dft_fgbg.c
./ncurses/base/lib_driver.c
./ncurses/base/lib_echo.c
./ncurses/base/lib_endwin.c
./ncurses/base/lib_erase.c
@ -813,10 +860,12 @@
./ncurses/base/version.c
./ncurses/base/vsscanf.c
./ncurses/base/wresize.c
./ncurses/build.priv.h
./ncurses/curses.priv.h
./ncurses/fifo_defs.h
./ncurses/llib-lncurses
./ncurses/llib-lncursest
./ncurses/llib-lncursestw
./ncurses/llib-lncursesw
./ncurses/modules
./ncurses/tinfo/MKcaptab.awk
@ -863,6 +912,7 @@
./ncurses/tinfo/lib_tparm.c
./ncurses/tinfo/lib_tputs.c
./ncurses/tinfo/lib_ttyflags.c
./ncurses/tinfo/make_hash.c
./ncurses/tinfo/make_keys.c
./ncurses/tinfo/name_match.c
./ncurses/tinfo/parse_entry.c
@ -870,6 +920,7 @@
./ncurses/tinfo/read_termcap.c
./ncurses/tinfo/setbuf.c
./ncurses/tinfo/strings.c
./ncurses/tinfo/tinfo_driver.c
./ncurses/tinfo/trim_sgr0.c
./ncurses/tinfo/use_screen.c
./ncurses/tinfo/write_entry.c
@ -895,6 +946,7 @@
./ncurses/tty/tty_display.h
./ncurses/tty/tty_input.h
./ncurses/tty/tty_update.c
./ncurses/wcwidth.h
./ncurses/widechar/charable.c
./ncurses/widechar/lib_add_wch.c
./ncurses/widechar/lib_box_set.c
@ -915,9 +967,14 @@
./ncurses/widechar/lib_vline_set.c
./ncurses/widechar/lib_wacs.c
./ncurses/widechar/lib_wunctrl.c
./ncurses/win32con/gettimeofday.c
./ncurses/win32con/wcwidth.c
./ncurses/win32con/win_driver.c
./panel/Makefile.in
./panel/headers
./panel/llib-lpanel
./panel/llib-lpanelt
./panel/llib-lpaneltw
./panel/llib-lpanelw
./panel/modules
./panel/p_above.c
@ -947,11 +1004,12 @@
./progs/infocmp.c
./progs/modules
./progs/progs.priv.h
./progs/tabs.c
./progs/tic.c
./progs/toe.c
./progs/tput.c
./progs/transform.c
./progs/tset.c
./tar-copy.sh
./test/Makefile.in
./test/README
./test/aclocal.m4
@ -963,6 +1021,7 @@
./test/cardfile.c
./test/cardfile.dat
./test/chgat.c
./test/clip_printw.c
./test/color_set.c
./test/configure
./test/configure.in
@ -973,6 +1032,7 @@
./test/demo_menus.c
./test/demo_panels.c
./test/demo_termcap.c
./test/demo_terminfo.c
./test/ditto.c
./test/dots.c
./test/dots_mvcur.c
@ -990,19 +1050,30 @@
./test/inch_wide.c
./test/inchs.c
./test/ins_wide.c
./test/insdelln.c
./test/inserts.c
./test/key_names.c
./test/keynames.c
./test/knight.c
./test/linedata.h
./test/linux-color.dat
./test/listused.sh
./test/lrtest.c
./test/make-tar.sh
./test/mk-test.awk
./test/modules
./test/movewindow.c
./test/ncurses.c
./test/ncurses_tst.hin
./test/newdemo.c
./test/package/debian/compat
./test/package/debian/control
./test/package/debian/copyright
./test/package/debian/docs
./test/package/debian/rules
./test/package/debian/source/format
./test/package/debian/watch
./test/package/ncurses-examples.spec
./test/programs
./test/railroad.c
./test/rain.c
@ -1011,6 +1082,10 @@
./test/savescreen.sh
./test/tclock.c
./test/test.priv.h
./test/test_add_wchstr.c
./test/test_addchstr.c
./test/test_addstr.c
./test/test_addwstr.c
./test/test_arrays.c
./test/test_get_wstr.c
./test/test_getstr.c
@ -1026,4 +1101,5 @@
./test/worm.c
./test/xmas.c
./test/xterm-16color.dat
./test/xterm-256color.dat
./test/xterm-88color.dat

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.24 2005/01/29 19:30:06 tom Exp $
# $Id: Makefile.in,v 1.30 2010/11/27 21:45:27 tom Exp $
##############################################################################
# Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. #
# Copyright (c) 1998-2008,2010 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"), #
@ -32,6 +32,7 @@
# Master Makefile for ncurses library.
SHELL = /bin/sh
VPATH = @srcdir@
DESTDIR=@DESTDIR@
CF_MFLAGS = @cf_cv_makeflags@ DESTDIR="$(DESTDIR)"
@ -42,6 +43,9 @@ NCURSES_MAJOR = @NCURSES_MAJOR@
NCURSES_MINOR = @NCURSES_MINOR@
NCURSES_PATCH = @NCURSES_PATCH@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@ -83,6 +87,13 @@ preinstall :
fgrep NCURSES_VERSION $(includedir)/curses.h >/dev/null || \
echo '** Will overwrite non-ncurses curses.h'
dlls: libs
$(SHELL) $(srcdir)/mk-dlls.sh
distclean \
realclean ::
-rm -f mk-dlls.sh mingw_arch
# Put the common rules here so that we can easily construct the list of
# directories to visit.
all \

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,149 @@
-------------------------------------------------------------------------------
-- Copyright (c) 2008-2010,2011 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: README.MinGW,v 1.5 2011/02/26 16:57:17 tom Exp $
-- Author: Juergen Pfeifer
-------------------------------------------------------------------------------
This is work in progress, but it's in an state where one can see it
works at least on the Windows Console.
You should install the MSYS package, so that you've a shell environment that
allows you to run the scripts, especially configure etc. You can get that
from http://www.mingw.org
To build ncurses for native Windows, you need the MinGW toolchain. The
original MinGW toolchain from the above site is only for 32-Bit Windows. As
Windows Server - and also regular workstations - are moving to 64-Bit, it
seems to be reasonable to have a toolchain that supports both architectures.
I recommend to use the TDM gcc toolchain which you can find at
http://tdm-gcc.tdragon.net/download. Go to the download section and select
the bundle installer for tdm64 (MinGW-w64). This installs a multilib version
of the gcc toolchain that can compile for native 32- and 64-Bit Windows
versions. It also comes with a working pthread implementation.
The latest config and build scripts we use for MinGW have only been tested
for the gcc-4.4 compiler toolchain (or better).
Using MinGW is a pragmatic decision, it's the easiest way to port this
heavily UNIX based sourcebase to native Windows. The goal is of course
to provide the includes, libraries and DLLs to be used with the more
common traditional development environments on Windows, mainly with
Microsoft Visual Studio.
If you start a bash from the MSYS environment, please make sure that the
Microsoft Development tools are in your PATH right after the MinGW
tools. The LIB.EXE tool is the only one needed. You need this only if
you want to build DLLs that work with native Windows programs. If you
don't have any Microsoft Development tools on your machine, consider
at least to get the free "Visual C++ 2010 Express Edition".
It contains the LIB.EXE tool. You may also use this compiler to test
writing native Windows programs using the ncurses DLLs without using
MinGW then for writing apps.
It is necessary to unset the TERM environment variable, to activate the
Windows console-driver.
Please also make sure that MSYS links to the correct directory containing
your MinGW toolchain. For TDM this is usually C:\MinGW64. In your Windows
CMD.EXE command shell go to the MSYS root directory (most probably
C:\MSYS or C:\MSYS\1.0) and verify, that there is a junction point mingw
that points to the MinGW toolchain directory. If not, delete the mingw
directory and use the mklink command (or the linkd.exe utility on older
Windows) to create the junction point.
This code requires WindowsNT 5.1 or better, which means on the client
Windows XP or better, on the server Windows Server 2003 or better.
In order to build ncurses for the planned interop layer with .NET, we
recommend to use these options with configure
--disable-home-terminfo
--enable-reentrant
--enable-sp-funcs
--enable-term-driver
--enable-interop
--with-pthread (if using TDM toolchain as recommended)
This is the configuration commandline as I'm using it at the moment:
./configure \
--prefix=/mingw \
--without-cxx-binding \
--without-ada \
--enable-warnings \
--enable-assertions \
--enable-reentrant \
--with-debug \
--with-normal \
--disable-home-terminfo \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
--with-pthread
If you are on a 64-Bit Windows system and want to build a 32-Bit version
of ncurses, you may use this commandline for configuration (when using
the TDM toolchain):
CC="gcc -m32" LD="ld -m32" ./configure \
--prefix=/mingw \
--without-cxx-binding \
--without-ada \
--enable-warnings \
--enable-assertions \
--enable-reentrant \
--with-debug \
--with-normal \
--disable-home-terminfo \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
--with-pthread
All the options above are - like the whole Windows support -
experimental.
In order to build the DLLs, after your regular make you must call
make dlls
A lot is still TODO, e.g.:
- Wide Character support
The Win32Con driver should actually only use Unicode in the
future.
- Thread support (locking). If using TDM toolchain this is done by
configuring pthreads.
- A GUI console driver
- Support for Terminals attached via a serial port (via terminfo)
- Support for networked Terminal connections (via terminfo)
- Workarounds for MinGW's filesystem access are necessary to make infocmp
work (though tic works).
To support terminfo, we need to have an ioctl() simulation for the
serial and networked Terminals.

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. --
-- Copyright (c) 1998-2010,2011 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 --
@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: TO-DO,v 1.51 2008/10/11 19:22:27 tom Exp $
-- $Id: TO-DO,v 1.57 2011/03/28 00:23:02 tom Exp $
-------------------------------------------------------------------------------
SHORT-TERM TO-DO ITEMS:
@ -72,27 +72,28 @@ Known Problems:
Building those with libtool does not work either. (This is a problem with
the BSD platforms).
+ more work is needed to make the MinGW port support ordinary terminals.
Portability (or lack thereof):
+ Users of older System V UNIXes (but not Solaris, and probably not SVr4) may
trip over a known problem with the signal-handling code which causes abrupt
termination of ncurses applications following resume from a ^Z suspend (this
problem was first seen running lynx). You will not see this problem if you
are running Linux or one of the 4.4BSD derivatives like FreeBSD, NetBSD, or
BSDI. For details, see the analysis in the header comment of
ncurses/tty/lib_tstp.c .
are using one of the 4.4BSD derivatives like such as, NetBSD, or BSDI, or
systems using that convention. For details, see the analysis in the header
comment of ncurses/tty/lib_tstp.c .
+ In theory, vwprintw and vwscanf are supposed to use the older varargs.h
interface for handling variadic argument lists (and are deprecated by X/Open
for that reason). Linux doesn't have varargs.h, it has the newer
X/Open-standard stdargs.h equivalent. So these functions use stdargs
instead. This is unlikely to be a problem unless you're building ncurses on
a System V old enough to only have varargs.h. (Solaris 2.5.1 used the
stdarg.h binding as well).
for that reason). Many newer systems do no have varargs.h, instead they have
only the newer X/Open-standard stdargs.h equivalent. So these functions use
stdargs instead. This is unlikely to be a problem unless you're building
ncurses on a System V old enough to only have varargs.h. (Solaris 2.5.1 used
the stdarg.h binding as well).
+ If you're using a BSD earlier than 4.4BSD, or a Linux old enough not to have
a native vsscanf(3) in its library, vwscanw() will not work. You lose. (It
should work on any System V, however). If you want to fix this, add an
+ If you're using a system old enough not to have a native vsscanf(3) in its
library, vwscanw() will not work. If you want to fix this, add an
implementation to ncurses/vsscanf.c.
+ The C++ binding fails to build with a few C++ compilers.

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
$Id: announce.html.in,v 1.70 2008/11/02 01:03:05 tom Exp $
$Id: announce.html.in,v 1.85 2011/04/04 00:05:34 tom Exp $
****************************************************************************
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -29,560 +29,361 @@
* authorization. *
****************************************************************************
-->
<HTML>
<HEAD>
<TITLE>Announcing ncurses @VERSION@</TITLE>
<link rev=made href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<H1>Announcing ncurses @VERSION@</H1>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
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>
<title>Announcing ncurses @VERSION@</title>
<link rev="made" href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
</head>
In mid-June 1995, the maintainer of 4.4BSD curses declared that he
considered 4.4BSD curses obsolete, and encouraged the keepers of
Unix releases such as BSD/OS, FreeBSD and NetBSD to switch over to
ncurses.<P>
<body>
<h1>Announcing ncurses @VERSION@</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.
The ncurses code was developed under GNU/Linux.
It has been in use for some time with OpenBSD as the system curses library,
and on FreeBSD and NetBSD as an external package.
It should port easily to any ANSI/POSIX-conforming UNIX.
It has even been ported to OS/2 Warp!<P>
<p>In mid-June 1995, the maintainer of 4.4BSD curses declared
that he considered 4.4BSD curses obsolete, and encouraged the
keepers of Unix releases such as BSD/OS, FreeBSD and NetBSD to
switch over to ncurses.</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>
<p>The ncurses code was developed under GNU/Linux. It has been in
use for some time with OpenBSD as the system curses library, and
on FreeBSD and NetBSD as an external package. It should port
easily to any ANSI/POSIX-conforming UNIX. It has even been ported
to OS/2 Warp!</p>
The ncurses distribution is available via anonymous FTP at
the GNU distribution site
<A HREF="ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</A>&nbsp;.
<br>It is also available at
<A HREF="ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
<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>
<H1>Release Notes</H1>
<p>The ncurses distribution is available via anonymous FTP at the
GNU distribution site <a href=
"ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</a>&nbsp;.<br>
This release is designed to be upward compatible from ncurses 5.0 through 5.6;
very few applications will require recompilation, depending on the platform.
These are the highlights from the change-log since ncurses 5.6 release.
<p>
Interface changes:
<ul>
<li>generate linkable stubs for some macros:
<br>
getattrs
It is also available at <a href=
"ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a>&nbsp;.</p>
</ul>
New features and improvements:
<ul>
<li>library
<h1>Release Notes</h1>This release is designed to be upward
compatible from ncurses 5.0 through 5.8; very few applications
will require recompilation, depending on the platform. These are
the highlights from the change-log since ncurses 5.8 release.
<p>
This is a bug-fix release, correcting a small number of urgent problems
in the ncurses library from the 5.8 release.
<p>
It also improves the Ada95 binding:
<ul>
<li>new flavor of the ncurses library provides rudimentary
support for POSIX threads. Several functions are
reentrant, but most require either a window-level or
screen-level mutex.<br>
(This is <em>API</em>-compatible,
but not <em>ABI</em>-compatible with the normal library).
<li>add <code>NCURSES_OPAQUE</code> symbol to curses.h, will
use to make structs opaque in selected configurations.
<li>add <code>NCURSES_EXT_FUNCS</code> and
<code>NCURSES_EXT_COLORS</code> symbols to curses.h to make
it simpler to tell if the extended functions and/or colors
are declared.
<li>add wresize() to C++ binding
<li>eliminate fixed-buffer vsprintf() calls in C++ binding.
<li>add several functions to C++ binding which wrap C functions
that pass a WINDOW* parameter.
<li>adapt mouse-handling code from menu library in form-library
<li>improve tracing for form library, showing created forms,
fields, etc.
<li>make $NCURSES_NO_PADDING feature work for termcap interface .
<li>add check to trace-file open, if the given name is a
directory, add ".log" to the name and try again.
<li>several new manpages: curs_legacy.3x, curs_memleaks.3x,
curs_opaque.3x and curs_threads.3x
<li>fixes a longstanding portability problem with its use of the
<a href="http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
function. Because that function uses variable-length argument lists,
its interface with gnat does not work with certain platforms.
<li>improves configurability and portability, particularly when built
separately from the main ncurses tree. The 5.8 release introduced
scripts which can be used to construct separate tarballs for the
Ada95 and ncurses examples.
<p>Those were a proof of concept. For the 5.9 release, those
scripts are augmented with rpm- and dpkg-scripts used in test builds
against a variety of gnat- and system ncurses versions as old as
gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
<a href="http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.
<li>additional improvements were made for portability of the
ncurses examples, adding rpm- and dpkg-scripts for test-builds.
See
<a href="http://invisible-island.net/ncurses/ncurses-examples.html">this page</a>
for snapshots and other information.
</ul>
<li>programs:
<h1>Features of Ncurses</h1>The ncurses package is fully
compatible with SVr4 (System V Release 4) curses:
<ul>
<li>modified three test-programs to demonstrate the threading
support in this version: ditto, rain, worm.
<li>All 257 of the SVr4 calls have been implemented (and are
documented).</li>
<li>several new test-programs: demo_panels, dots_mvcur,
inch_wide, inchs, key_name, key_names, savescreen,
savescreen.sh test_arrays, test_get_wstr, test_getstr,
test_instr, test_inwstr and test_opaque.
<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>
<li>add <code>adacurses-config</code> to the Ada95 install.
<li>An emulation of the SVr4 panels library, supporting a stack
of windows with backing store, is included.</li>
<li>modify tic <code>-f</code> option to format spaces as
<code>\s</code> to prevent them from being lost when that
is read back in unformatted strings.
<li>An emulation of the SVr4 menus library, supporting a
uniform but flexible interface for menu programming, is
included.</li>
<li>The <code>tack</code> program is now distributed separately
from ncurses.
<li>An emulation of the SVr4 form library, supporting data
collection through on-screen forms, is included.</li>
<li>Binary terminfo entries generated by the ncurses tic(1)
implementation are bit-for-bit-compatible with the entry format
SVr4 curses uses.</li>
<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.</li>
</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, and most EXTENDED features). It
includes many function calls not supported under SVr4 curses
(but portability of all calls is documented so you can use the
SVr4 subset only).</li>
<li>Unlike SVr3 curses, ncurses can write to the
rightmost-bottommost corner of the screen if your terminal has
an insert-character capability.</li>
<li>Ada95 and C++ bindings.</li>
<li>Support for mouse event reporting with X Window xterm and
FreeBSD and OS/2 console windows.</li>
<li>Extended mouse support via Alessandro Rubini's gpm
package.</li>
<li>The function <code>wresize</code> allows you to resize
windows, preserving their data.</li>
<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>
<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>
<li>Support for 256-color terminals, such as modern xterm, when
configured using the <code>--enable-ext-colors</code>
option.</li>
<li>Support for 16-color terminals, such as <em>aixterm</em>
and <em>modern xterm</em>.</li>
<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>
<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 <code>quickch</code>
routine.</li>
<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>
<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>
<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>
<li>A BSD-like tset(1) utility is provided.</li>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<li>An HTML "Introduction to Programming with NCURSES" document
provides a narrative introduction to the curses programming
interface.</li>
</ul>
<li>terminal database
<ul>
<li>added entries:
<ul>
<li><code>Eterm-256color</code>,
<code>Eterm-88color</code> and
<code>rxvt-88color</code>
<li><code>aterm</code>
<li><code>konsole-256color</code>
<li><code>mrxvt</code>
<li><code>screen.mlterm</code>
<li><code>screen.rxvt</code>
<li><code>teraterm4.59</code> is now the primary primary
teraterm entry, renamed original to
<code>teraterm2.3</code>
<li><code>9term</code> terminal
<li>Newbury Data entries
</ul>
<li>updated/improved entries:
<ul>
<li><code>gnome</code> to version 2.22.3
<li><code>h19</code>, <code>z100</code>
<li><code>konsole</code> to version 1.6.6
<li><code>mlterm</code>, <code>mlterm+pcfkeys</code>
<li><code>xterm</code>, and building-blocks for function-keys
to <a href="http://invisible-island.net/xterm/xterm.log.html#xterm_230">xterm patch #230</a>.
</ul>
</ul>
</ul>
Major bug fixes:
<ul>
<li>add logic to tic for cancelling strings in user-defined
capabilities
(this is <em>needed</em> for
current <code>konsole</code> terminfo entry).
<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.
<li>modify <code>mk-1st.awk</code> so the generated makefile rules for
linking or installing shared libraries do not first remove the
library, in case it is in use, e.g., <code>libncurses.so</code> by
<code>/bin/sh</code>.
<p>The ncurses code has been tested with a wide variety of
applications including (versions starting with those noted):</p>
<li>correct check for notimeout() in wgetch().
<li>fix a sign-extension bug in infocmp's repair_acsc() function.
<li>change winnstr() to stop at the end of the line.
<li>make Ada95 demo_panels() example work.
<li>fix for adding a non-spacing character at the beginning of a line.
<li>fill in extended-color pair to make colors work
for wide-characters using extended-colors.
<li>improve refresh of window on top of multi-column characters,
taking into account split characters on left/right window
boundaries.
<li>modify <code>win_wchnstr()</code> to ensure that only a base cell
is returned for each multi-column character.
<li>improve <code>waddch()</code> and <code>winsch()</code> handling of
EILSEQ from <code>mbrtowc()</code> by using <code>unctrl()</code>
to display illegal bytes rather than trying to append further bytes
to make up a valid sequence.
<li>restore <code>curs_set()</code> state after
<code>endwin()</code>/<code>refresh()</code>
<li>modify <code>keyname()</code> to use "^X" form only if
<code>meta()</code> has been called, or if <code>keyname()</code>
is called without initializing curses, e.g., via
<code>initscr()</code> or <code>newterm()</code>.
<li>modify <code>unctrl()</code> to check codes in 128-255 range versus
<code>isprint()</code>.
If they are not printable, and locale was set, use a "M-" or "~"
sequence.
<li>improve <code>resizeterm()</code> by moving ripped-off lines, and
repainting the soft-keys.
<li>modify form library to accept control characters such as newline
in set_field_buffer(), which is compatible with Solaris.
<li>use <code>NCURSES_MOUSE_MASK()</code> in definition of
<code>BUTTON_RELEASE()</code>, etc., to make those work properly
with the <code>--enable-ext-mouse</code> configuration
<li>correct some functions in Ada95 binding which were using return
value from C where none was returned.
<li>reviewed/fixed issues reported by Coverity and Klocwork tools.
</ul>
Portability:
<ul>
<li>configure script:
<ul>
<li>new options:
<dl>
<dt>cdk</dt>
<dt>--disable-big-strings
<dd>control whether static string tables are generated as single
large strings (to improve startup performance), or as array
of individual strings.
<dd>Curses Development Kit<br>
<a href=
"http://invisible-island.net/cdk/">http://invisible-island.net/cdk/</a><br>
<dt>--disable-relink
<dd>control whether shared libraries are relinked (during install)
when rpath is enabled.
<a href=
"http://www.vexus.ca/products/CDK/">http://www.vexus.ca/products/CDK/</a></dd>
<dt>--disable-tic-depends
<dd>make explicit whether tic library depends on ncurses/ncursesw
library.
<dt>ded</dt>
<dt>--enable-mixed-case
<dd>override the configure script's check if the filesystem
supports mixed-case filenames.
This allows one to control how the terminal database
maps to the filesystem.
For filesystems that do not support mixed-case, the library
uses generate 2-character (hexadecimal) codes for the
lower-level of the filesystem terminfo database
<dd>directory-editor<br>
<a href=
"http://invisible-island.net/ded/">http://invisible-island.net/ded/</a></dd>
<dt>--enable-reentrant
<dd>builds a different flavor of the ncurses library (ncursest)
which improves reentrant use of the
library by reducing global and static variables
(see the "--with-pthread" option for the threaded support).
<dt>dialog</dt>
<dt>--enable-weak-symbols
<dd>use weak-symbols for linking to the POSIX thread library,
and use the same soname for the ncurses shared library
as the normal library (caveat: the ABI is for the threaded
library, which makes global data accessed via functions).
<dd>the underlying application used in Slackware's setup, and
the basis for similar applications on GNU/Linux.<br>
<a href=
"http://invisible-island.net/dialog/">http://invisible-island.net/dialog/</a></dd>
<dt>--with-pthread
<dd>build with the POSIX thread library (tested with AIX,
Linux, FreeBSD, OpenBSD, HPUX, IRIX64, Solaris, Tru64).
<dt>lynx</dt>
<dt>--with-ticlib
<dd>build/install the tic-support functions in a separate library
<dd>the character-screen WWW browser<br>
<a href=
"http://lynx.isc.org/release/">http://lynx.isc.org/release/</a></dd>
<dt>Midnight Commander</dt>
<dd>file manager<br>
<a href=
"http://www.midnight-commander.org/">http://www.midnight-commander.org/</a></dd>
<dt>mutt</dt>
<dd>mail utility<br>
<a href="http://www.mutt.org/">http://www.mutt.org/</a></dd>
<dt>ncftp</dt>
<dd>file-transfer utility<br>
<a href="http://www.ncftp.com/">http://www.ncftp.com/</a></dd>
<dt>nvi</dt>
<dd>New vi versions 1.50 are able to use ncurses versions 1.9.7
and later.<br>
<a href=
"https://sites.google.com/a/bostic.com/keithbostic/nvi">https://sites.google.com/a/bostic.com/keithbostic/nvi</a><br>
</dd>
<dt>pinfo</dt>
<dd>Lynx-like info browser. <a href=
"https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</a></dd>
<dt>tin</dt>
<dd>newsreader, supporting color, MIME <a href=
"http://www.tin.org/">http://www.tin.org/</a></dd>
</dl>as well as some that use ncurses for the terminfo support
alone:
<dl>
<dt>minicom</dt>
<dd>terminal emulator<br>
<a href=
"http://alioth.debian.org/projects/minicom/">http://alioth.debian.org/projects/minicom/</a></dd>
<dt>vile</dt>
<dd>vi-like-emacs<br>
<a href=
"http://invisible-island.net/vile/">http://invisible-island.net/vile/</a></dd>
</dl>
<li>improved options:
<dl>
<p>The ncurses distribution includes a selection of test programs
(including a few games).</p>
<dt>--enable-ext-colors
<dd>requires the wide-character configuration.
<h2>Who's Who and What's What</h2>Zeyd Ben-Halim started it from
a previous package pcurses, written by Pavel Curtis. Eric S.
Raymond continued development. J&uuml;rgen Pfeifer wrote most of
the form and menu libraries. Ongoing work is being done by
<a href="mailto:dickey@invisible-island.net">Thomas Dickey</a>.
Thomas Dickey 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>.
<dt>--with-chtype
<dd>ignore option value "unsigned" is always added to
the type in curses.h; do the same for --with-mmask-t.
<dt>--with-dmalloc
<dd>build-fix for redefinition of <code>strndup</code>.
<dt>--with-hashed-db
<dd>accepts a parameter which is the install-prefix of a given
Berkeley Database.
<dt>--with-hashed-db
<dd>the $LIBS environment variable overrides the search for the db
library.
<dt>--without-hashed-db
<dd>assumed when "--disable-database" is used.
</dl>
</ul>
<li>other configure/build issues:
<ul>
<li>build-fixes for LynxOS
<li>modify shared-library rules to allow FreeBSD 3.x to use rpath.
<li>build-fix for FreeBSD "contemporary" TTY interface.
<li>build-fixes for AIX with libtool.
<li>build-fixes for Darwin and libtool.
<li>modify BeOS-specific ifdef's to build on Haiku.
<li>corrected gcc options for building shared libraries on Solaris
and IRIX64.
<li>change shared-library configuration for OpenBSD, make rpath work.
<li>build-fixes for using libutf8, e.g., on OpenBSD 3.7
<li>add "-e" option in ncurses/Makefile.in when generating source-files
to force earlier exit if the build environment fails unexpectedly.
<li>add support for shared libraries for QNX.
<li>change delimiter in <code>MKlib_gen.sh</code> from '%' to '@', to
avoid substitution by IBM xlc to '#' as part of its extensions to
digraphs.
</ul>
<li>library:
<ul>
<li>rewrite wrapper for <code>wcrtomb()</code>, making it work on
Solaris. This is used in the form library to determine the length
of the buffer needed by <code>field_buffer</code>.
<li>add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding
type for data manipulated by signal handlers.
<li>set locale in misc/ncurses-config.in since it uses a range
<li>disable GPM mouse support when $TERM does not happen to contain
"linux", since Gpm_Open() no longer limits its assertion to terminals
that it might handle, e.g., within "screen" in xterm.
<li>reset mouse file-descriptor when unloading GPM library.
</ul>
<li>test programs:
<ul>
<li>update test programs to build/work with various UNIX curses for
comparisons.
</ul>
</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,
and most EXTENDED features).
It includes 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 FreeBSD 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 256-color terminals, such as modern xterm, when configured
using the <code>--enable-ext-colors</code> option.
<LI>Support for 16-color terminals, such as aixterm and modern 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://invisible-island.net/cdk/">http://invisible-island.net/cdk/</A>
<br>
<A HREF="http://www.vexus.ca/products/CDK/">http://www.vexus.ca/products/CDK/</a>
<DT> ded
<DD> directory-editor
<br>
<A HREF="http://invisible-island.net/ded/">http://invisible-island.net/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://invisible-island.net/dialog/">http://invisible-island.net/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
<DD> file manager
<br>
<A HREF="http://www.ibiblio.org/mc/">http://www.ibiblio.org/mc/</A>
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org/">http://www.mutt.org/</A>
<DT> ncftp
<DD> file-transfer utility
<br>
<A HREF="http://www.ncftp.com/">http://www.ncftp.com/</A>
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
<br>
<A HREF="http://www.bostic.com/vi/">http://www.bostic.com/vi/</A>
<br>
<DT> pinfo
<DD> Lynx-like info browser.
<A HREF="https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</A>
<DT> tin
<DD> newsreader, supporting color, MIME
<A HREF="http://www.tin.org/">http://www.tin.org/</A>
</DL>
as well as some that use ncurses for the terminfo support alone:
<DL>
<DT> minicom
<DD> terminal emulator
<br>
<A HREF="http://alioth.debian.org/projects/minicom/">
http://alioth.debian.org/projects/minicom/</A>
<DT> vile
<DD> vi-like-emacs
<br>
<A HREF="http://invisible-island.net/vile/">http://invisible-island.net/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>
Zeyd Ben-Halim
started it from a previous package pcurses, written by Pavel Curtis.
Eric S. Raymond
continued development.
J&uuml;rgen Pfeifer wrote most of the form and menu libraries.
Ongoing work is being done by
<A HREF="mailto:dickey@invisible-island.net">Thomas Dickey</A>.
Thomas Dickey
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>
<p>To join the ncurses mailing list, please write email to
<code>bug-ncurses-request@gnu.org</code> containing the line:</p>
<pre>
subscribe &lt;name&gt;@&lt;host.domain&gt;
</PRE>
</pre>
This list is open to anyone interested in helping with the development and
testing of this package.<P>
<p>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://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
<p>Beta versions of ncurses and patches to the current release
are made available at <a href=
"ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a>&nbsp;.</p>
<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>Future Plans</h2>
<H2>Other Related Resources</H2>
<ul>
<li>Extended-level XPG4 conformance, with internationalization
support.</li>
The distribution provides a newer version of the terminfo-format
terminal description file once maintained by
<A HREF="http://www.catb.org/~esr/terminfo/">Eric Raymond</A>&nbsp;.
Unlike the older version, the termcap and terminfo data are provided
in the same file, and provides several user-definable extensions
beyond the X/Open specification.<P>
<li>Ports to more systems, including DOS and Windows.</li>
</ul>We need people to help with these projects. If you are
interested in working on them, please join the ncurses list.
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>&nbsp;.
</BODY>
</HTML>
<!--
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:html
# case-fold-search:nil
# fill-column:70
# End:
-->
<h2>Other Related Resources</h2>The distribution provides a newer
version of the terminfo-format terminal description file once
maintained by <a href="http://www.catb.org/~esr/terminfo/">Eric
Raymond</a>&nbsp;. Unlike the older version, the termcap and
terminfo data are provided in the same file, and provides several
user-definable extensions beyond the X/Open specification.
<p>You can find lots of information on terminal-related topics
not covered in the terminfo file at <a href=
"http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">
Richard Shuford's archive</a>&nbsp;.</p>
</body>
</html>

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2008-04-14'
timestamp='2010-09-24'
# 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
@ -27,16 +27,16 @@ timestamp='2008-04-14'
# the same distribution terms that you use for the rest of that program.
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# Originally written by Per Bothner. Please send patches (context
# diff format) to <config-patches@gnu.org> and include a ChangeLog
# entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
# don't specify an explicit build system type.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@ -56,8 +56,9 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -91,7 +92,7 @@ if test $# != 0; then
exit 1
fi
trap 'exit 1' 1 2 15
trap 'exit 1' HUP INT TERM
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
@ -105,7 +106,7 @@ trap 'exit 1' 1 2 15
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@ -170,7 +171,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@ -324,14 +325,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux${UNAME_RELEASE}
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
eval $set_cc_for_build
SUN_ARCH="i386"
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH="x86_64"
fi
fi
echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
@ -532,7 +552,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[456])
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@ -640,7 +660,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
grep __LP64__ >/dev/null
grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@ -791,12 +811,12 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
*:Interix*:[3456]*)
*:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@ -806,6 +826,9 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
8664:Windows_NT:*)
echo x86_64-pc-mks
exit ;;
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
@ -835,10 +858,24 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null | \
grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
@ -857,6 +894,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
LIBC=gnu
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@ -866,74 +914,33 @@ EOF
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
mips:Linux:*:*)
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips
#undef mipsel
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mipsel
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
#undef mips64
#undef mips64el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=mips64el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=mips64
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
@ -943,8 +950,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@ -958,6 +968,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
tile*:Linux:*:*)
echo ${UNAME_MACHINE}-tilera-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
@ -967,66 +980,6 @@ EOF
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# 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.
# Set LC_ALL=C to ensure ld outputs messages in English.
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
| sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
s/.*supported targets: *//
s/ .*//
p'`
case "$ld_supported_targets" in
elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <features.h>
#ifdef __ELF__
# ifdef __GLIBC__
# if __GLIBC__ >= 2
LIBC=gnu
# else
LIBC=gnulibc1
# endif
# else
LIBC=gnulibc1
# endif
#else
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
#endif
#endif
#ifdef __dietlibc__
LIBC=dietlibc
#endif
EOF
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
}
test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
@ -1055,7 +1008,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@ -1099,8 +1052,11 @@ EOF
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
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configury will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
@ -1138,6 +1094,16 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit ;;
@ -1150,7 +1116,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@ -1243,6 +1209,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
i386)
eval $set_cc_for_build
if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
UNAME_PROCESSOR="x86_64"
fi
fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@ -1258,6 +1234,9 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
NSE-?:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
@ -1324,6 +1303,9 @@ EOF
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2

View File

@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
# Free Software Foundation, Inc.
timestamp='2008-06-16'
timestamp='2010-09-11'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@ -32,13 +32,16 @@ timestamp='2008-06-16'
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
# diff and a properly formatted GNU ChangeLog entry.
#
# 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.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
@ -72,8 +75,9 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@ -120,8 +124,10 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@ -148,10 +154,13 @@ 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 | -axis | -knuth | -cray)
-apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@ -249,6 +258,7 @@ case $basic_machine in
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
@ -270,28 +280,41 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be\
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| rx \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@ -322,7 +345,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@ -331,9 +354,10 @@ case $basic_machine in
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@ -355,27 +379,30 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile-* | tilegx-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
@ -443,6 +470,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
aux)
basic_machine=m68k-apple
os=-aux
@ -459,6 +490,19 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
@ -711,6 +755,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
microblaze)
basic_machine=microblaze-xilinx
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@ -815,6 +862,12 @@ case $basic_machine in
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@ -1049,17 +1102,10 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
# This must be matched before tile*.
tilegx*)
basic_machine=tilegx-unknown
os=-linux-gnu
;;
tile*)
basic_machine=tile-unknown
@ -1140,6 +1186,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
z80-*-coff)
basic_machine=z80-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
@ -1178,7 +1228,7 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@ -1228,6 +1278,9 @@ case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@ -1248,10 +1301,11 @@ case $os in
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
@ -1262,7 +1316,8 @@ case $os in
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@ -1270,7 +1325,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@ -1403,6 +1458,8 @@ case $os in
-dicos*)
os=-dicos
;;
-nacl*)
;;
-none)
;;
*)
@ -1443,6 +1500,15 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@ -1600,7 +1666,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
-aix*)
-cnk*|-aix*)
vendor=ibm
;;
-beos*)

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
dnl***************************************************************************
dnl Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
dnl Copyright (c) 1998-2010,2011 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,14 +28,14 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.454 2008/10/18 14:53:32 tom Exp $
dnl $Id: configure.in,v 1.520 2011/03/28 00:22:26 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.13.20020210)
AC_REVISION($Revision: 1.454 $)
AC_REVISION($Revision: 1.520 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -122,6 +122,13 @@ AC_ARG_WITH(ada,
[cf_with_ada=yes])
AC_MSG_RESULT($cf_with_ada)
AC_MSG_CHECKING(if you want to install manpages)
AC_ARG_WITH(manpages,
[ --without-manpages suppress install of manpages],
[cf_with_manpages=$withval],
[cf_with_manpages=yes])
AC_MSG_RESULT($cf_with_manpages)
AC_MSG_CHECKING(if you want to build programs such as tic)
AC_ARG_WITH(progs,
[ --without-progs suppress build with programs (e.g., tic)],
@ -129,6 +136,13 @@ AC_ARG_WITH(progs,
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
AC_MSG_CHECKING(if you want to build test-programs)
AC_ARG_WITH(tests,
[ --without-tests suppress build with test-programs],
[cf_with_tests=$withval],
[cf_with_tests=yes])
AC_MSG_RESULT($cf_with_tests)
AC_MSG_CHECKING(if you wish to install curses.h)
AC_ARG_WITH(curses-h,
[ --without-curses-h install curses.h as ncurses.h only],
@ -148,10 +162,35 @@ CF_PROG_AWK
CF_PROG_EGREP
CF_PROG_INSTALL
CF_PROG_LINT
AC_PROG_LN_S
CF_PROG_LN_S
AC_SYS_LONG_FILE_NAMES
# if we find pkg-config, check if we should install the ".pc" files.
CF_PKG_CONFIG
if test "$PKG_CONFIG" != no ; then
AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
# Leave this as something that can be overridden in the environment.
if test -z "$PKG_CONFIG_LIBDIR" ; then
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig
fi
PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
AC_ARG_ENABLE(pc-files,
[ --enable-pc-files generate and install .pc files for pkg-config],
[enable_pc_files=$enableval],
[enable_pc_files=no])
AC_MSG_RESULT($enable_pc_files)
else
AC_MSG_RESULT(no)
AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR)
enable_pc_files=no
fi
fi
AC_SUBST(PKG_CONFIG_LIBDIR)
AC_MSG_CHECKING(if we should assume mixed-case filenames)
AC_ARG_ENABLE(mixed-case,
[ --enable-mixed-case tic should assume mixed-case filenames],
@ -176,7 +215,7 @@ dnl These are standard among *NIX systems, but not when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, ':')
AC_CHECK_TOOL(LD, ld, ld)
AC_CHECK_TOOL(AR, ar, ar)
CF_SUBST(archiver options,AR_OPTS,rv)
CF_AR_FLAGS
dnl Special option for use by system-builders: the install-prefix is used to
dnl adjust the location into which the actual install is done, so that an
@ -327,6 +366,7 @@ if test "$with_gpm" != no ; then
SHLIB_LIST="-ldl $SHLIB_LIST"
else
SHLIB_LIST="-lgpm $SHLIB_LIST"
CF_ADD_LIB(gpm,TEST_LIBS)
fi
AC_DEFINE(HAVE_LIBGPM)
CF_CHECK_GPM_WGETCH
@ -380,6 +420,11 @@ if test "$CC_SHARED_OPTS" = "unknown"; then
done
fi
### If we're building with rpath, try to link non-standard libs that way too.
if test "$DFT_LWR_MODEL" = "shared"; then
CF_DISABLE_RPATH_HACK
fi
###############################################################################
CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
@ -413,7 +458,7 @@ if test "$use_database" != no ; then
AC_DEFINE(USE_DATABASE)
AC_MSG_CHECKING(which terminfo source-file will be installed)
AC_ARG_ENABLE(database,
AC_ARG_WITH(database,
[ --with-database=XXX specify terminfo source to install],
[TERMINFO_SRC=$withval])
AC_MSG_RESULT($TERMINFO_SRC)
@ -618,7 +663,7 @@ 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-no}])
[with_broken_linker=${BROKEN_LINKER:-no}])
AC_MSG_RESULT($with_broken_linker)
BROKEN_LINKER=0
@ -655,7 +700,7 @@ NCURSES_WCHAR_T=0
NCURSES_WINT_T=0
# Check to define _XOPEN_SOURCE "automatically"
CF_XOPEN_SOURCE
CF_XOPEN_SOURCE(500)
# Work around breakage on OS X
CF_SIGWINCH
@ -676,7 +721,15 @@ AC_MSG_RESULT($with_widec)
if test "$with_widec" = yes ; then
LIB_SUFFIX="w${LIB_SUFFIX}"
AC_DEFINE(USE_WIDEC_SUPPORT)
case "$CFLAGS $CPPFLAGS" in #(vi
*-D_XOPEN_SOURCE=500) #(vi
;;
*)
CF_PREDEFINE(_XOPEN_SOURCE_EXTENDED)
;;
esac
# with_overwrite=no
NCURSES_CH_T=cchar_t
AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
@ -797,6 +850,15 @@ AC_ARG_WITH(mmask-t,
[NCURSES_MMASK_T=auto])
AC_MSG_RESULT($NCURSES_MMASK_T)
### use option --with-ccharw-max to override CCHARW_MAX size
AC_MSG_CHECKING(for size CCHARW_MAX)
AC_ARG_WITH(ccharw-max,
[ --with-ccharw-max=XXX override size CCHARW_MAX],
[NCURSES_CCHARW_MAX="$withval"],
[NCURSES_CCHARW_MAX=5])
AC_MSG_RESULT($NCURSES_CCHARW_MAX)
AC_SUBST(NCURSES_CCHARW_MAX)
### Enable compiling-in rcs id's
AC_MSG_CHECKING(if RCS identifiers should be compiled-in)
AC_ARG_WITH(rcs-ids,
@ -807,7 +869,7 @@ AC_MSG_RESULT($with_rcs_ids)
test "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS)
###############################################################################
CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
CF_MAN_PAGES([ captoinfo clear infocmp infotocap tabs tic toe tput tset ])
###############################################################################
CF_HELP_MESSAGE(Extensions:)
@ -825,13 +887,47 @@ if test "$with_ext_funcs" = yes ; then
AC_DEFINE(HAVE_HAS_KEY)
AC_DEFINE(HAVE_RESIZETERM)
AC_DEFINE(HAVE_RESIZE_TERM)
AC_DEFINE(HAVE_TERM_ENTRY_H)
AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
AC_DEFINE(HAVE_WRESIZE)
AC_DEFINE(NCURSES_EXT_FUNCS)
GENERATED_EXT_FUNCS=generated
else
NCURSES_EXT_FUNCS=0
GENERATED_EXT_FUNCS=
fi
AC_SUBST(NCURSES_EXT_FUNCS)
AC_SUBST(GENERATED_EXT_FUNCS)
AC_MSG_CHECKING(if you want to build with experimental SCREEN extensions)
AC_ARG_ENABLE(sp-funcs,
[ --enable-sp-funcs enable experimental SCREEN-extensions],
[with_sp_funcs=$enableval],
[with_sp_funcs=no])
AC_MSG_RESULT($with_sp_funcs)
if test "$with_sp_funcs" = yes ; then
NCURSES_SP_FUNCS=1
AC_DEFINE(NCURSES_SP_FUNCS)
GENERATED_SP_FUNCS=generated
else
NCURSES_SP_FUNCS=0
GENERATED_SP_FUNCS=
fi
AC_SUBST(NCURSES_SP_FUNCS)
AC_SUBST(GENERATED_SP_FUNCS)
AC_MSG_CHECKING(if you want to build with experimental terminal-driver)
AC_ARG_ENABLE(term-driver,
[ --enable-term-driver enable experimental terminal-driver],
[with_term_driver=$enableval],
[with_term_driver=no])
AC_MSG_RESULT($with_term_driver)
if test "$with_term_driver" = yes ; then
AC_DEFINE(USE_TERM_DRIVER)
if test "$with_sp_funcs" != yes ; then
AC_MSG_ERROR(The term-driver option relies upon sp-funcs)
fi
fi
### use option --enable-const to turn on use of const beyond that in XSI.
AC_MSG_CHECKING(for extended use of const keyword)
@ -973,30 +1069,55 @@ test "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP)
### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
AC_MSG_CHECKING(if you want colorfgbg code)
AC_ARG_ENABLE(colorfgbg,
[ --enable-colorfgbg compile with $COLORFGBG code],
[ --enable-colorfgbg compile-in experimental $COLORFGBG code],
[with_colorfgbg=$enableval],
[with_colorfgbg=no])
AC_MSG_RESULT($with_colorfgbg)
test "$with_colorfgbg" = yes && AC_DEFINE(USE_COLORFGBG)
### use option --enable-interop to turn on use of bindings used for interop
AC_MSG_CHECKING(if you want interop bindings)
AC_ARG_ENABLE(interop,
[ --enable-interop compile-in experimental interop bindings],
[with_exp_interop=$enableval],
[with_exp_interop=no])
AC_MSG_RESULT($with_exp_interop)
NCURSES_INTEROP_FUNCS=0
test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
AC_SUBST(NCURSES_INTEROP_FUNCS)
# This is still experimental (20080329), but should ultimately be moved to
# the script-block --with-normal, etc.
CF_WITH_PTHREAD
AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
AC_ARG_ENABLE(weak-symbols,
[ --enable-weak-symbols enable weak-symbols for pthreads],
[use_weak_symbols=$withval],
[use_weak_symbols=no])
AC_MSG_RESULT($use_weak_symbols)
if test "$use_weak_symbols" = yes ; then
CF_WEAK_SYMBOLS
else
cf_cv_weak_symbols=no
fi
if test "x$with_pthread" != xno; then
AC_CHECK_FUNC(pthread_kill,[
AC_MSG_CHECKING(if you want to allow EINTR in wgetch with pthreads)
AC_ARG_ENABLE(pthreads-eintr,
[ --enable-pthreads-eintr enable EINTR in wgetch with pthreads],
[use_pthreads_eintr=$enableval],
[use_pthreads_eintr=no])
AC_MSG_RESULT($use_pthreads_eintr)
if test $use_pthreads_eintr = yes ; then
AC_DEFINE(USE_PTHREADS_EINTR)
fi])
if test $cf_cv_weak_symbols = yes ; then
AC_MSG_CHECKING(if you want to use weak-symbols for pthreads)
AC_ARG_ENABLE(weak-symbols,
[ --enable-weak-symbols enable weak-symbols for pthreads],
[use_weak_symbols=$enableval],
[use_weak_symbols=no])
AC_MSG_RESULT($use_weak_symbols)
if test "$use_weak_symbols" = yes ; then
CF_WEAK_SYMBOLS
else
cf_cv_weak_symbols=no
fi
if test $cf_cv_weak_symbols = yes ; then
AC_DEFINE(USE_WEAK_SYMBOLS)
fi
fi
PTHREAD=
@ -1026,6 +1147,8 @@ if test "$with_reentrant" = yes ; then
NCURSES_SIZE_T=int
if test $cf_cv_weak_symbols = yes ; then
CF_REMOVE_LIB(LIBS,$LIBS,pthread)
CF_ADD_LIB(pthread,TEST_LIBS)
CF_ADD_LIB(pthread,TEST_LIBS2)
else
LIB_SUFFIX="t${LIB_SUFFIX}"
fi
@ -1042,6 +1165,20 @@ AC_SUBST(cf_cv_enable_opaque)
AC_SUBST(NCURSES_OPAQUE)
AC_SUBST(NCURSES_SIZE_T)
### Allow using a different wrap-prefix
if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
AC_MSG_CHECKING(for prefix used to wrap public variables)
AC_ARG_WITH(wrap-prefix,
[ --with-wrap-prefix=XXX override prefix used for public variables],
[NCURSES_WRAP_PREFIX=$withval],
[NCURSES_WRAP_PREFIX=_nc_])
AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
else
NCURSES_WRAP_PREFIX=_nc_
fi
AC_SUBST(NCURSES_WRAP_PREFIX)
AC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX")
AC_MSG_CHECKING(if you want experimental safe-sprintf code)
AC_ARG_ENABLE(safe-sprintf,
[ --enable-safe-sprintf compile with experimental safe-sprintf code],
@ -1097,7 +1234,7 @@ AC_ARG_ENABLE(warnings,
AC_MSG_RESULT($with_warnings)
if test "x$with_warnings" = "xyes"; then
ADAFLAGS="$ADAFLAGS -gnatg"
CF_ADD_ADAFLAGS(-gnatg)
CF_GCC_WARNINGS(Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum)
if test "$cf_with_cxx" = yes ; then
CF_GXX_WARNINGS(Wno-unused)
@ -1119,7 +1256,7 @@ then
AC_DEFINE(NDEBUG)
CPPFLAGS="$CPPFLAGS -DNDEBUG"
else
ADAFLAGS="$ADAFLAGS -gnata"
CF_ADD_ADAFLAGS(-gnata)
fi
fi
@ -1165,12 +1302,18 @@ fi
AC_SUBST(ADA_TRACE)
### Checks for libraries.
case $cf_cv_system_name in #(vi
*mingw32*) #(vi
;;
*)
AC_CHECK_FUNC(gettimeofday,
AC_DEFINE(HAVE_GETTIMEOFDAY),[
AC_CHECK_LIB(bsd, gettimeofday,
AC_DEFINE(HAVE_GETTIMEOFDAY)
LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday
CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday
;;
esac
CF_MATH_LIB(MATH_LIB,sin(x))
AC_SUBST(MATH_LIB)
@ -1187,6 +1330,7 @@ fcntl.h \
getopt.h \
limits.h \
locale.h \
math.h \
poll.h \
sys/bsdtypes.h \
sys/ioctl.h \
@ -1204,7 +1348,7 @@ wctype.h \
# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
if test "$ISC" = yes ; then
AC_CHECK_LIB(cposix,main)
AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()'
AC_CHECK_LIB(inet,bzero,CF_ADD_LIB(inet))dnl also 'select()'
fi
CF_SYS_TIME_SELECT
@ -1287,6 +1431,8 @@ CF_TYPE_SIGACTION
CF_SIZECHANGE
CF_FUNC_MEMMOVE
CF_FUNC_POLL
CF_VA_COPY
AC_FUNC_VFORK
# special check for test/ditto.c
CF_FUNC_OPENPTY
@ -1294,10 +1440,11 @@ if test "$cf_cv_func_openpty" != no ; then
AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>)
AC_DEFINE(USE_XTERM_PTY)
if test "$cf_cv_lib_util" = yes ; then
TEST_LIBS="-lutil $TEST_LIBS"
CF_ADD_LIB(util,TEST_LIBS)
fi
fi
AC_SUBST(TEST_LIBS)
AC_SUBST(TEST_LIBS2)
if test "$with_hashed_db" != no ; then
AC_DEFINE(USE_HASHED_DB)
@ -1354,12 +1501,12 @@ cerr << "testing" << endl;
CF_CPP_STATIC_CAST
CXX_AR='$(AR)'
CXX_AR_OPTS='$(AR_OPTS)'
CXX_ARFLAGS='$(ARFLAGS)'
case $cf_cv_system_name in #(vi
irix*) #(vi
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
CXX_AR_OPTS='-ar -o'
CXX_ARFLAGS='-ar -o'
fi
;;
sco3.2v5*) #(vi
@ -1368,13 +1515,13 @@ cerr << "testing" << endl;
solaris2*)
if test "$GXX" != yes ; then
CXX_AR='$(CXX)'
CXX_AR_OPTS='-xar -o'
CXX_ARFLAGS='-xar -o'
fi
;;
esac
AC_SUBST(CXXLDFLAGS)
AC_SUBST(CXX_AR)
AC_SUBST(CXX_AR_OPTS)
AC_SUBST(CXX_ARFLAGS)
else
cf_cxx_library=no
cf_cv_builtin_bool=1
@ -1435,97 +1582,47 @@ if test -f "${srcdir}/Ada95/Makefile.in" ; then
dnl libtool does not know anything about GNAT, though a change made in 1998
dnl provided for it "someday". Disable the ada subtree if we are using
dnl libtool -TD 20070714
if test "$cf_with_ada" != "no" ; then
if test "$cf_with_ada" != "no" ; then
if test "$with_libtool" != "no"; then
AC_MSG_WARN(libtool does not support Ada - disabling feature)
cf_with_ada=no
fi
fi
fi
dnl Check for availability of GNU Ada Translator (GNAT).
dnl At the moment we support no other Ada95 compiler.
if test "$cf_with_ada" != "no" ; then
cf_ada_make=gnatmake
AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
if test "$ac_cv_prog_gnat_exists" = no; then
cf_ada_make=
else
CF_GNAT_VERSION
AC_CHECK_PROG(M4_exists, m4, yes, no)
if test "$ac_cv_prog_M4_exists" = no; then
cf_cv_prog_gnat_correct=no
echo Ada95 binding required program m4 not found. Ada95 binding disabled.
fi
if test "$cf_with_ada" != "no" ; then
CF_PROG_GNAT
if test "$cf_cv_prog_gnat_correct" = yes; then
AC_MSG_CHECKING(if GNAT works)
CF_GNAT_TRY_RUN([procedure conftest;],
[with Text_IO;
with GNAT.OS_Lib;
procedure conftest is
begin
Text_IO.Put ("Hello World");
Text_IO.New_Line;
GNAT.OS_Lib.OS_Exit (0);
end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no])
AC_MSG_RESULT($cf_cv_prog_gnat_correct)
fi
fi
if test "$cf_cv_prog_gnat_correct" = yes; then
ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
CF_ADD_ADAFLAGS(-gnatpn)
AC_MSG_CHECKING(if GNAT pragma Unreferenced works)
CF_GNAT_TRY_LINK([procedure conftest;],
[with Text_IO;
with GNAT.OS_Lib;
procedure conftest is
test : Integer;
pragma Unreferenced (test);
begin
test := 1;
Text_IO.Put ("Hello World");
Text_IO.New_Line;
GNAT.OS_Lib.OS_Exit (0);
end conftest;],[cf_cv_pragma_unreferenced=yes],[cf_cv_pragma_unreferenced=no])
AC_MSG_RESULT($cf_cv_pragma_unreferenced)
# make ADAFLAGS consistent with CFLAGS
case "$CFLAGS" in
*-g*)
CF_ADD_ADAFLAGS(-g)
;;
esac
case "$CFLAGS" in
*-O*)
CF_ADD_ADAFLAGS(-O3)
;;
esac
# if the pragma is supported, use it (needed in the Trace code).
if test $cf_cv_pragma_unreferenced = yes ; then
PRAGMA_UNREF=TRUE
else
PRAGMA_UNREF=FALSE
fi
CF_GNAT_GENERICS
CF_GNAT_SIGINT
CF_GNAT_PRAGMA_UNREF
CF_GNAT_PROJECTS
AC_ARG_WITH(ada-compiler,
[ --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
[cf_ada_compiler=$withval],
[cf_ada_compiler=gnatmake])
CF_WITH_ADA_COMPILER
cf_ada_package=terminal_interface
AC_SUBST(cf_ada_make)
AC_SUBST(cf_ada_compiler)
AC_SUBST(cf_ada_package)
AC_SUBST(ADAFLAGS)
AC_SUBST(cf_compile_generics)
AC_SUBST(cf_generic_objects)
AC_SUBST(PRAGMA_UNREF)
CF_WITH_PATH(ada-include,
[ --with-ada-include=DIR Ada includes are in DIR],
ADA_INCLUDE,
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/ada/adalib,
[$]prefix/lib/ada/adalib)
AC_SUBST(ADA_OBJECTS)
fi
fi
CF_WITH_ADA_INCLUDE
CF_WITH_ADA_OBJECTS
CF_WITH_ADA_SHAREDLIB
fi
fi
else
cf_with_ada=no
fi
@ -1554,6 +1651,7 @@ fi
LIB_SUBSETS="${LIB_SUBSETS}termlib"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
if test "$with_termlib" != no ; then
LIB_SUBSETS="${LIB_SUBSETS} "
else
@ -1561,6 +1659,21 @@ else
fi
LIB_SUBSETS="${LIB_SUBSETS}base"
# Most term-driver calls are to tinfo, but some like init_pair are to the
# base library (so it resides in base).
if test "$with_term_driver" != no ; then
LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
case $cf_cv_system_name in #(vi
*mingw32*) #(vi
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
;;
*) #(vi
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
;;
esac
fi
test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
@ -1656,6 +1769,8 @@ if test "$with_termlib" != no ; then
TEST_ARGS="${TEST_DEPS}"
TEST_ARG2="${TEST_DEP2}"
TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
TICS_LIST="$SHLIB_LIST $TEST_ARGS"
SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
else
TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
@ -1723,6 +1838,7 @@ if test "$NCURSES_LIBUTF8" = 1 ; then
AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h)
fi
fi
WITH_OVERWRITE=$with_overwrite
AC_SUBST(WITH_OVERWRITE)
AC_SUBST(TICS_LIST)
@ -1742,40 +1858,91 @@ AC_DEFINE(HAVE_SLK_COLOR)
CF_SRC_MODULES($modules_to_build)
if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
fi
CF_DIRS_TO_MAKE
AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATHSEP')
# symbols that differ when compiling Ada95 by itself.
NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
AC_SUBST(NCURSES_SHLIB2)
# values to use as strings
AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR')
AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}")
### Now that we're done running tests, add the compiler-warnings, if any
CF_ADD_CFLAGS($EXTRA_CFLAGS)
### If we're building with rpath, try to link non-standard libs that way too.
if test "$DFT_LWR_MODEL" = "shared"; then
CF_RPATH_HACK
fi
### Define substitutions for header files to avoid name-pollution
CF_SUBST_IF(["$cf_cv_have_tcgetattr" = yes], HAVE_TCGETATTR, 1, 0)
CF_SUBST_IF(["$ac_cv_header_termio_h" = yes], HAVE_TERMIO_H, 1, 0)
CF_SUBST_IF(["$ac_cv_header_termios_h" = yes], HAVE_TERMIOS_H, 1, 0)
################################################################################
test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
test "$use_database" = yes && \
SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
if test x"$enable_pc_files" = xyes ; then \
SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
MAKE_PC_FILES=
else
MAKE_PC_FILES="#"
fi
AC_SUBST(MAKE_PC_FILES)
AC_SUBST(cross_compiling)
AC_PATH_PROG(TIC_PATH,tic,unknown,$PATH:/usr/local/ncurses/bin)
if test -n "$FALLBACK_LIST"
then
if test "$TIC_PATH" = unknown
then
AC_MSG_WARN(no tic program found for fallbacks)
fi
fi
AC_SUBST(TIC_PATH)
if test "x$cf_with_tests" != xno ; then
MAKE_TESTS=
else
MAKE_TESTS="#"
fi
AC_SUBST(MAKE_TESTS)
ADAHTML_DIR=../../doc/html/ada
AC_SUBST(ADAHTML_DIR)
SUB_SCRIPTS=
case $cf_cv_system_name in #(vi
*mingw32*) #(vi
SUB_SCRIPTS="mk-dlls.sh"
;;
esac
AC_OUTPUT( \
include/MKterm.h.awk \
include/curses.head:include/curses.h.in \
include/ncurses_dll.h \
include/termcap.h \
include/unctrl.h \
$SUB_SCRIPTS \
$SUB_MAKEFILES \
Makefile,[
CF_PRG_RULES([$srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK"], test)
if test "x$cf_with_tests" != xno ; then
CF_PRG_RULES([$srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK"], test)
fi
CF_LIB_RULES($SRC_SUBDIRS)
if test "x$cf_with_ada" != xno ; then
if test -z "$USE_OLD_MAKERULES" ; then
$AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
fi
fi
],[
### Special initialization commands, used to pass information from the
### configuration-run into config.status
@ -1785,10 +1952,12 @@ DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
ECHO_LINK="$ECHO_LINK"
LDCONFIG="$LDCONFIG"
LIBTOOL_VERSION="$LIBTOOL_VERSION"
LIB_NAME="$LIB_NAME"
LIB_SUBSETS="$LIB_SUBSETS"
LIB_SUFFIX="$LIB_SUFFIX"
LIB_TRACING="$LIB_TRACING"
LN_S="$LN_S"
MAKE_TERMINFO="$MAKE_TERMINFO"
NCURSES_MAJOR="$NCURSES_MAJOR"
NCURSES_MINOR="$NCURSES_MINOR"
@ -1796,13 +1965,15 @@ NCURSES_OSPEED="$NCURSES_OSPEED"
NCURSES_PATCH="$NCURSES_PATCH"
SRC_SUBDIRS="$SRC_SUBDIRS"
TERMINFO="$TERMINFO"
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
TICS_NAME="$TICS_NAME"
TIC_PATH="$TIC_PATH"
TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
TINFO_NAME="$TINFO_NAME"
TINFO_SUFFIX="$TINFO_SUFFIX"
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
TICS_NAME="$TICS_NAME"
USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
WITH_CURSES_H="$with_curses_h"
WITH_ECHO="$with_echo"
WITH_OVERWRITE="$with_overwrite"
@ -1820,9 +1991,12 @@ cf_cv_shared_soname='$cf_cv_shared_soname'
cf_cv_shlib_version="$cf_cv_shlib_version"
cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
cf_cv_system_name="$cf_cv_system_name"
cf_with_ada="$cf_with_ada"
cf_with_cxx_binding="$cf_with_cxx_binding"
cf_with_manpages="$cf_with_manpages"
cf_with_tests="$cf_with_tests"
host="$host"
target="$target"
],cat)dnl
${MAKE-make} preinstall
${MAKE:-make} preinstall

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. #
# Copyright (c) 1998-2010,2011 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"), #
@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.671 2008/11/02 00:58:38 tom Exp $
# $Id: dist.mk,v 1.810 2011/04/04 22:42:20 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -36,8 +36,8 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
NCURSES_PATCH = 20081102
NCURSES_MINOR = 9
NCURSES_PATCH = 20110404
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@ -57,8 +57,7 @@ GNATHTML= `type -p gnathtml || type -p gnathtml.pl`
# 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). Newer
# versions of 'man' on Linux leave no margin (and make it harder to sync with
# pages).
# versions of 'man' leave no margin (and make it harder to sync with pages).
MAN2HTML= man2html -botm=0 -topm=0 -cgiurl '$$title.$$section$$subsection.html'
ALL = ANNOUNCE doc/html/announce.html doc/ncurses-intro.doc doc/hackguide.doc manhtml adahtml

View File

@ -1,8 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
$Id: announce.html,v 1.52 2008/11/02 01:05:08 tom Exp $
$Id: announce.html,v 1.55 2011/04/04 09:46:33 tom Exp $
****************************************************************************
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -29,560 +29,361 @@
* authorization. *
****************************************************************************
-->
<HTML>
<HEAD>
<TITLE>Announcing ncurses 5.7</TITLE>
<link rev=made href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<H1>Announcing ncurses 5.7</H1>
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
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>
<title>Announcing ncurses 5.9</title>
<link rev="made" href="mailto:bug-ncurses@gnu.org">
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii">
</head>
In mid-June 1995, the maintainer of 4.4BSD curses declared that he
considered 4.4BSD curses obsolete, and encouraged the keepers of
Unix releases such as BSD/OS, FreeBSD and NetBSD to switch over to
ncurses.<P>
<body>
<h1>Announcing ncurses 5.9</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.
The ncurses code was developed under GNU/Linux.
It has been in use for some time with OpenBSD as the system curses library,
and on FreeBSD and NetBSD as an external package.
It should port easily to any ANSI/POSIX-conforming UNIX.
It has even been ported to OS/2 Warp!<P>
<p>In mid-June 1995, the maintainer of 4.4BSD curses declared
that he considered 4.4BSD curses obsolete, and encouraged the
keepers of Unix releases such as BSD/OS, FreeBSD and NetBSD to
switch over to ncurses.</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>
<p>The ncurses code was developed under GNU/Linux. It has been in
use for some time with OpenBSD as the system curses library, and
on FreeBSD and NetBSD as an external package. It should port
easily to any ANSI/POSIX-conforming UNIX. It has even been ported
to OS/2 Warp!</p>
The ncurses distribution is available via anonymous FTP at
the GNU distribution site
<A HREF="ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</A>&nbsp;.
<br>It is also available at
<A HREF="ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
<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>
<H1>Release Notes</H1>
<p>The ncurses distribution is available via anonymous FTP at the
GNU distribution site <a href=
"ftp://ftp.gnu.org/gnu/ncurses/">ftp://ftp.gnu.org/gnu/ncurses/</a>&nbsp;.<br>
This release is designed to be upward compatible from ncurses 5.0 through 5.6;
very few applications will require recompilation, depending on the platform.
These are the highlights from the change-log since ncurses 5.6 release.
<p>
Interface changes:
<ul>
<li>generate linkable stubs for some macros:
<br>
getattrs
It is also available at <a href=
"ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a>&nbsp;.</p>
</ul>
New features and improvements:
<ul>
<li>library
<h1>Release Notes</h1>This release is designed to be upward
compatible from ncurses 5.0 through 5.8; very few applications
will require recompilation, depending on the platform. These are
the highlights from the change-log since ncurses 5.8 release.
<p>
This is a bug-fix release, correcting a small number of urgent problems
in the ncurses library from the 5.8 release.
<p>
It also improves the Ada95 binding:
<ul>
<li>new flavor of the ncurses library provides rudimentary
support for POSIX threads. Several functions are
reentrant, but most require either a window-level or
screen-level mutex.<br>
(This is <em>API</em>-compatible,
but not <em>ABI</em>-compatible with the normal library).
<li>add <code>NCURSES_OPAQUE</code> symbol to curses.h, will
use to make structs opaque in selected configurations.
<li>add <code>NCURSES_EXT_FUNCS</code> and
<code>NCURSES_EXT_COLORS</code> symbols to curses.h to make
it simpler to tell if the extended functions and/or colors
are declared.
<li>add wresize() to C++ binding
<li>eliminate fixed-buffer vsprintf() calls in C++ binding.
<li>add several functions to C++ binding which wrap C functions
that pass a WINDOW* parameter.
<li>adapt mouse-handling code from menu library in form-library
<li>improve tracing for form library, showing created forms,
fields, etc.
<li>make $NCURSES_NO_PADDING feature work for termcap interface .
<li>add check to trace-file open, if the given name is a
directory, add ".log" to the name and try again.
<li>several new manpages: curs_legacy.3x, curs_memleaks.3x,
curs_opaque.3x and curs_threads.3x
<li>fixes a longstanding portability problem with its use of the
<a href="http://invisible-island.net/ncurses/man/form_fieldtype.3x">set_field_type</a>
function. Because that function uses variable-length argument lists,
its interface with gnat does not work with certain platforms.
<li>improves configurability and portability, particularly when built
separately from the main ncurses tree. The 5.8 release introduced
scripts which can be used to construct separate tarballs for the
Ada95 and ncurses examples.
<p>Those were a proof of concept. For the 5.9 release, those
scripts are augmented with rpm- and dpkg-scripts used in test builds
against a variety of gnat- and system ncurses versions as old as
gnat 3.15 and ncurses 5.4 (see snapshots and systems tested
<a href="http://invisible-island.net/ncurses/ncurses-Ada95.html">here</a>.
<li>additional improvements were made for portability of the
ncurses examples, adding rpm- and dpkg-scripts for test-builds.
See
<a href="http://invisible-island.net/ncurses/ncurses-examples.html">this page</a>
for snapshots and other information.
</ul>
<li>programs:
<h1>Features of Ncurses</h1>The ncurses package is fully
compatible with SVr4 (System V Release 4) curses:
<ul>
<li>modified three test-programs to demonstrate the threading
support in this version: ditto, rain, worm.
<li>All 257 of the SVr4 calls have been implemented (and are
documented).</li>
<li>several new test-programs: demo_panels, dots_mvcur,
inch_wide, inchs, key_name, key_names, savescreen,
savescreen.sh test_arrays, test_get_wstr, test_getstr,
test_instr, test_inwstr and test_opaque.
<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>
<li>add <code>adacurses-config</code> to the Ada95 install.
<li>An emulation of the SVr4 panels library, supporting a stack
of windows with backing store, is included.</li>
<li>modify tic <code>-f</code> option to format spaces as
<code>\s</code> to prevent them from being lost when that
is read back in unformatted strings.
<li>An emulation of the SVr4 menus library, supporting a
uniform but flexible interface for menu programming, is
included.</li>
<li>The <code>tack</code> program is now distributed separately
from ncurses.
<li>An emulation of the SVr4 form library, supporting data
collection through on-screen forms, is included.</li>
<li>Binary terminfo entries generated by the ncurses tic(1)
implementation are bit-for-bit-compatible with the entry format
SVr4 curses uses.</li>
<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.</li>
</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, and most EXTENDED features). It
includes many function calls not supported under SVr4 curses
(but portability of all calls is documented so you can use the
SVr4 subset only).</li>
<li>Unlike SVr3 curses, ncurses can write to the
rightmost-bottommost corner of the screen if your terminal has
an insert-character capability.</li>
<li>Ada95 and C++ bindings.</li>
<li>Support for mouse event reporting with X Window xterm and
FreeBSD and OS/2 console windows.</li>
<li>Extended mouse support via Alessandro Rubini's gpm
package.</li>
<li>The function <code>wresize</code> allows you to resize
windows, preserving their data.</li>
<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>
<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>
<li>Support for 256-color terminals, such as modern xterm, when
configured using the <code>--enable-ext-colors</code>
option.</li>
<li>Support for 16-color terminals, such as <em>aixterm</em>
and <em>modern xterm</em>.</li>
<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>
<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 <code>quickch</code>
routine.</li>
<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>
<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>
<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>
<li>A BSD-like tset(1) utility is provided.</li>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<li>An HTML "Introduction to Programming with NCURSES" document
provides a narrative introduction to the curses programming
interface.</li>
</ul>
<li>terminal database
<ul>
<li>added entries:
<ul>
<li><code>Eterm-256color</code>,
<code>Eterm-88color</code> and
<code>rxvt-88color</code>
<li><code>aterm</code>
<li><code>konsole-256color</code>
<li><code>mrxvt</code>
<li><code>screen.mlterm</code>
<li><code>screen.rxvt</code>
<li><code>teraterm4.59</code> is now the primary primary
teraterm entry, renamed original to
<code>teraterm2.3</code>
<li><code>9term</code> terminal
<li>Newbury Data entries
</ul>
<li>updated/improved entries:
<ul>
<li><code>gnome</code> to version 2.22.3
<li><code>h19</code>, <code>z100</code>
<li><code>konsole</code> to version 1.6.6
<li><code>mlterm</code>, <code>mlterm+pcfkeys</code>
<li><code>xterm</code>, and building-blocks for function-keys
to <a href="http://invisible-island.net/xterm/xterm.log.html#xterm_230">xterm patch #230</a>.
</ul>
</ul>
</ul>
Major bug fixes:
<ul>
<li>add logic to tic for cancelling strings in user-defined
capabilities
(this is <em>needed</em> for
current <code>konsole</code> terminfo entry).
<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.
<li>modify <code>mk-1st.awk</code> so the generated makefile rules for
linking or installing shared libraries do not first remove the
library, in case it is in use, e.g., <code>libncurses.so</code> by
<code>/bin/sh</code>.
<p>The ncurses code has been tested with a wide variety of
applications including (versions starting with those noted):</p>
<li>correct check for notimeout() in wgetch().
<li>fix a sign-extension bug in infocmp's repair_acsc() function.
<li>change winnstr() to stop at the end of the line.
<li>make Ada95 demo_panels() example work.
<li>fix for adding a non-spacing character at the beginning of a line.
<li>fill in extended-color pair to make colors work
for wide-characters using extended-colors.
<li>improve refresh of window on top of multi-column characters,
taking into account split characters on left/right window
boundaries.
<li>modify <code>win_wchnstr()</code> to ensure that only a base cell
is returned for each multi-column character.
<li>improve <code>waddch()</code> and <code>winsch()</code> handling of
EILSEQ from <code>mbrtowc()</code> by using <code>unctrl()</code>
to display illegal bytes rather than trying to append further bytes
to make up a valid sequence.
<li>restore <code>curs_set()</code> state after
<code>endwin()</code>/<code>refresh()</code>
<li>modify <code>keyname()</code> to use "^X" form only if
<code>meta()</code> has been called, or if <code>keyname()</code>
is called without initializing curses, e.g., via
<code>initscr()</code> or <code>newterm()</code>.
<li>modify <code>unctrl()</code> to check codes in 128-255 range versus
<code>isprint()</code>.
If they are not printable, and locale was set, use a "M-" or "~"
sequence.
<li>improve <code>resizeterm()</code> by moving ripped-off lines, and
repainting the soft-keys.
<li>modify form library to accept control characters such as newline
in set_field_buffer(), which is compatible with Solaris.
<li>use <code>NCURSES_MOUSE_MASK()</code> in definition of
<code>BUTTON_RELEASE()</code>, etc., to make those work properly
with the <code>--enable-ext-mouse</code> configuration
<li>correct some functions in Ada95 binding which were using return
value from C where none was returned.
<li>reviewed/fixed issues reported by Coverity and Klocwork tools.
</ul>
Portability:
<ul>
<li>configure script:
<ul>
<li>new options:
<dl>
<dt>cdk</dt>
<dt>--disable-big-strings
<dd>control whether static string tables are generated as single
large strings (to improve startup performance), or as array
of individual strings.
<dd>Curses Development Kit<br>
<a href=
"http://invisible-island.net/cdk/">http://invisible-island.net/cdk/</a><br>
<dt>--disable-relink
<dd>control whether shared libraries are relinked (during install)
when rpath is enabled.
<a href=
"http://www.vexus.ca/products/CDK/">http://www.vexus.ca/products/CDK/</a></dd>
<dt>--disable-tic-depends
<dd>make explicit whether tic library depends on ncurses/ncursesw
library.
<dt>ded</dt>
<dt>--enable-mixed-case
<dd>override the configure script's check if the filesystem
supports mixed-case filenames.
This allows one to control how the terminal database
maps to the filesystem.
For filesystems that do not support mixed-case, the library
uses generate 2-character (hexadecimal) codes for the
lower-level of the filesystem terminfo database
<dd>directory-editor<br>
<a href=
"http://invisible-island.net/ded/">http://invisible-island.net/ded/</a></dd>
<dt>--enable-reentrant
<dd>builds a different flavor of the ncurses library (ncursest)
which improves reentrant use of the
library by reducing global and static variables
(see the "--with-pthread" option for the threaded support).
<dt>dialog</dt>
<dt>--enable-weak-symbols
<dd>use weak-symbols for linking to the POSIX thread library,
and use the same soname for the ncurses shared library
as the normal library (caveat: the ABI is for the threaded
library, which makes global data accessed via functions).
<dd>the underlying application used in Slackware's setup, and
the basis for similar applications on GNU/Linux.<br>
<a href=
"http://invisible-island.net/dialog/">http://invisible-island.net/dialog/</a></dd>
<dt>--with-pthread
<dd>build with the POSIX thread library (tested with AIX,
Linux, FreeBSD, OpenBSD, HPUX, IRIX64, Solaris, Tru64).
<dt>lynx</dt>
<dt>--with-ticlib
<dd>build/install the tic-support functions in a separate library
<dd>the character-screen WWW browser<br>
<a href=
"http://lynx.isc.org/release/">http://lynx.isc.org/release/</a></dd>
<dt>Midnight Commander</dt>
<dd>file manager<br>
<a href=
"http://www.midnight-commander.org/">http://www.midnight-commander.org/</a></dd>
<dt>mutt</dt>
<dd>mail utility<br>
<a href="http://www.mutt.org/">http://www.mutt.org/</a></dd>
<dt>ncftp</dt>
<dd>file-transfer utility<br>
<a href="http://www.ncftp.com/">http://www.ncftp.com/</a></dd>
<dt>nvi</dt>
<dd>New vi versions 1.50 are able to use ncurses versions 1.9.7
and later.<br>
<a href=
"https://sites.google.com/a/bostic.com/keithbostic/nvi">https://sites.google.com/a/bostic.com/keithbostic/nvi</a><br>
</dd>
<dt>pinfo</dt>
<dd>Lynx-like info browser. <a href=
"https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</a></dd>
<dt>tin</dt>
<dd>newsreader, supporting color, MIME <a href=
"http://www.tin.org/">http://www.tin.org/</a></dd>
</dl>as well as some that use ncurses for the terminfo support
alone:
<dl>
<dt>minicom</dt>
<dd>terminal emulator<br>
<a href=
"http://alioth.debian.org/projects/minicom/">http://alioth.debian.org/projects/minicom/</a></dd>
<dt>vile</dt>
<dd>vi-like-emacs<br>
<a href=
"http://invisible-island.net/vile/">http://invisible-island.net/vile/</a></dd>
</dl>
<li>improved options:
<dl>
<p>The ncurses distribution includes a selection of test programs
(including a few games).</p>
<dt>--enable-ext-colors
<dd>requires the wide-character configuration.
<h2>Who's Who and What's What</h2>Zeyd Ben-Halim started it from
a previous package pcurses, written by Pavel Curtis. Eric S.
Raymond continued development. J&uuml;rgen Pfeifer wrote most of
the form and menu libraries. Ongoing work is being done by
<a href="mailto:dickey@invisible-island.net">Thomas Dickey</a>.
Thomas Dickey 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>.
<dt>--with-chtype
<dd>ignore option value "unsigned" is always added to
the type in curses.h; do the same for --with-mmask-t.
<dt>--with-dmalloc
<dd>build-fix for redefinition of <code>strndup</code>.
<dt>--with-hashed-db
<dd>accepts a parameter which is the install-prefix of a given
Berkeley Database.
<dt>--with-hashed-db
<dd>the $LIBS environment variable overrides the search for the db
library.
<dt>--without-hashed-db
<dd>assumed when "--disable-database" is used.
</dl>
</ul>
<li>other configure/build issues:
<ul>
<li>build-fixes for LynxOS
<li>modify shared-library rules to allow FreeBSD 3.x to use rpath.
<li>build-fix for FreeBSD "contemporary" TTY interface.
<li>build-fixes for AIX with libtool.
<li>build-fixes for Darwin and libtool.
<li>modify BeOS-specific ifdef's to build on Haiku.
<li>corrected gcc options for building shared libraries on Solaris
and IRIX64.
<li>change shared-library configuration for OpenBSD, make rpath work.
<li>build-fixes for using libutf8, e.g., on OpenBSD 3.7
<li>add "-e" option in ncurses/Makefile.in when generating source-files
to force earlier exit if the build environment fails unexpectedly.
<li>add support for shared libraries for QNX.
<li>change delimiter in <code>MKlib_gen.sh</code> from '%' to '@', to
avoid substitution by IBM xlc to '#' as part of its extensions to
digraphs.
</ul>
<li>library:
<ul>
<li>rewrite wrapper for <code>wcrtomb()</code>, making it work on
Solaris. This is used in the form library to determine the length
of the buffer needed by <code>field_buffer</code>.
<li>add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding
type for data manipulated by signal handlers.
<li>set locale in misc/ncurses-config.in since it uses a range
<li>disable GPM mouse support when $TERM does not happen to contain
"linux", since Gpm_Open() no longer limits its assertion to terminals
that it might handle, e.g., within "screen" in xterm.
<li>reset mouse file-descriptor when unloading GPM library.
</ul>
<li>test programs:
<ul>
<li>update test programs to build/work with various UNIX curses for
comparisons.
</ul>
</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,
and most EXTENDED features).
It includes 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 FreeBSD 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 256-color terminals, such as modern xterm, when configured
using the <code>--enable-ext-colors</code> option.
<LI>Support for 16-color terminals, such as aixterm and modern 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://invisible-island.net/cdk/">http://invisible-island.net/cdk/</A>
<br>
<A HREF="http://www.vexus.ca/products/CDK/">http://www.vexus.ca/products/CDK/</a>
<DT> ded
<DD> directory-editor
<br>
<A HREF="http://invisible-island.net/ded/">http://invisible-island.net/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://invisible-island.net/dialog/">http://invisible-island.net/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
<DD> file manager
<br>
<A HREF="http://www.ibiblio.org/mc/">http://www.ibiblio.org/mc/</A>
<DT> mutt
<DD> mail utility
<br>
<A HREF="http://www.mutt.org/">http://www.mutt.org/</A>
<DT> ncftp
<DD> file-transfer utility
<br>
<A HREF="http://www.ncftp.com/">http://www.ncftp.com/</A>
<DT> nvi
<DD> New vi versions 1.50 are able to use ncurses versions 1.9.7 and later.
<br>
<A HREF="http://www.bostic.com/vi/">http://www.bostic.com/vi/</A>
<br>
<DT> pinfo
<DD> Lynx-like info browser.
<A HREF="https://alioth.debian.org/projects/pinfo/">https://alioth.debian.org/projects/pinfo/</A>
<DT> tin
<DD> newsreader, supporting color, MIME
<A HREF="http://www.tin.org/">http://www.tin.org/</A>
</DL>
as well as some that use ncurses for the terminfo support alone:
<DL>
<DT> minicom
<DD> terminal emulator
<br>
<A HREF="http://alioth.debian.org/projects/minicom/">
http://alioth.debian.org/projects/minicom/</A>
<DT> vile
<DD> vi-like-emacs
<br>
<A HREF="http://invisible-island.net/vile/">http://invisible-island.net/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>
Zeyd Ben-Halim
started it from a previous package pcurses, written by Pavel Curtis.
Eric S. Raymond
continued development.
J&uuml;rgen Pfeifer wrote most of the form and menu libraries.
Ongoing work is being done by
<A HREF="mailto:dickey@invisible-island.net">Thomas Dickey</A>.
Thomas Dickey
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>
<p>To join the ncurses mailing list, please write email to
<code>bug-ncurses-request@gnu.org</code> containing the line:</p>
<pre>
subscribe &lt;name&gt;@&lt;host.domain&gt;
</PRE>
</pre>
This list is open to anyone interested in helping with the development and
testing of this package.<P>
<p>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://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</A>&nbsp;.
<p>Beta versions of ncurses and patches to the current release
are made available at <a href=
"ftp://invisible-island.net/ncurses/">ftp://invisible-island.net/ncurses/</a>&nbsp;.</p>
<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>Future Plans</h2>
<H2>Other Related Resources</H2>
<ul>
<li>Extended-level XPG4 conformance, with internationalization
support.</li>
The distribution provides a newer version of the terminfo-format
terminal description file once maintained by
<A HREF="http://www.catb.org/~esr/terminfo/">Eric Raymond</A>&nbsp;.
Unlike the older version, the termcap and terminfo data are provided
in the same file, and provides several user-definable extensions
beyond the X/Open specification.<P>
<li>Ports to more systems, including DOS and Windows.</li>
</ul>We need people to help with these projects. If you are
interested in working on them, please join the ncurses list.
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>&nbsp;.
</BODY>
</HTML>
<!--
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:html
# case-fold-search:nil
# fill-column:70
# End:
-->
<h2>Other Related Resources</h2>The distribution provides a newer
version of the terminfo-format terminal description file once
maintained by <a href="http://www.catb.org/~esr/terminfo/">Eric
Raymond</a>&nbsp;. Unlike the older version, the termcap and
terminfo data are provided in the same file, and provides several
user-definable extensions beyond the X/Open specification.
<p>You can find lots of information on terminal-related topics
not covered in the terminfo file at <a href=
"http://web.archive.org/web/*/http://www.cs.utk.edu/~shuford/terminal">
Richard Shuford's archive</a>&nbsp;.</p>
</body>
</html>

View File

@ -1,8 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
$Id: hackguide.html,v 1.27 2005/12/24 15:37:13 tom Exp $
$Id: hackguide.html,v 1.28 2010/12/04 16:44:21 tom Exp $
****************************************************************************
* Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2005,2010 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 *

View File

@ -1,8 +1,8 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
$Id: ncurses-intro.html,v 1.43 2007/03/03 19:31:50 tom Exp $
$Id: ncurses-intro.html,v 1.44 2010/12/04 16:46:22 tom Exp $
****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2010 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 *

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.47 2007/04/28 14:56:11 tom Exp $
# $Id: Makefile.in,v 1.53 2010/11/27 21:45:27 tom Exp $
##############################################################################
# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
# Copyright (c) 1998-2009,2010 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"), #
@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@ -63,6 +64,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@ -70,11 +72,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
AR_OPTS = @AR_OPTS@
ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@ -124,7 +129,7 @@ sources : $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
sh $(srcdir)/../mkdirs.sh $@
mkdir -p $@
# make copies to simplify include-paths while still keeping form's include
# file in this directory.
@ -132,7 +137,7 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/form.h $@
FORM_PRIV_H = \
HEADER_DEPS = \
$(srcdir)/form.priv.h \
$(srcdir)/form.h \
../include/mf_common.h \
@ -140,10 +145,10 @@ FORM_PRIV_H = \
../include/eti.h
tags:
ctags *.[ch]
$(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
@MAKE_UPPER_TAGS@ etags *.[ch]
@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2004 Free Software Foundation, Inc. *
* Copyright (c) 2004,2010 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 *
@ -32,33 +32,33 @@
#include "form.priv.h"
MODULE_ID("$Id: f_trace.c,v 1.1 2004/12/25 23:28:49 tom Exp $")
MODULE_ID("$Id: f_trace.c,v 1.2 2010/01/23 21:14:36 tom Exp $")
NCURSES_EXPORT(FIELD **)
_nc_retrace_field_ptr(FIELD **code)
{
T((T_RETURN("%p"), code));
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELD *)
_nc_retrace_field(FIELD *code)
{
T((T_RETURN("%p"), code));
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELDTYPE *)
_nc_retrace_field_type(FIELDTYPE *code)
{
T((T_RETURN("%p"), code));
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FORM *)
_nc_retrace_form(FORM *code)
{
T((T_RETURN("%p"), code));
T((T_RETURN("%p"), (void *)code));
return code;
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_arg.c,v 1.11 2004/12/25 22:20:18 tom Exp $")
MODULE_ID("$Id: fld_arg.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -67,7 +67,7 @@ set_fieldtype_arg(FIELDTYPE *typ,
void (*const free_arg) (void *))
{
T((T_CALLED("set_fieldtype_arg(%p,%p,%p,%p)"),
typ, make_arg, copy_arg, free_arg));
(void *)typ, make_arg, copy_arg, free_arg));
if (typ != 0 && make_arg != (void *)0)
{
@ -91,7 +91,7 @@ set_fieldtype_arg(FIELDTYPE *typ,
NCURSES_EXPORT(void *)
field_arg(const FIELD *field)
{
T((T_CALLED("field_arg(%p)"), field));
T((T_CALLED("field_arg(%p)"), (const void *)field));
returnVoidPtr(Normalize_Field(field)->arg);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_attr.c,v 1.10 2004/12/11 21:33:15 tom Exp $")
MODULE_ID("$Id: fld_attr.c,v 1.11 2010/01/23 21:12:08 tom Exp $")
/*----------------------------------------------------------------------------
Field-Attribute manipulation routines
@ -66,7 +66,7 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
#define GEN_FIELD_ATTR_GET_FCT( name ) \
NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
{\
T((T_CALLED("field_" #name "(%p)"), field));\
T((T_CALLED("field_" #name "(%p)"), (const void *) field));\
returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_current.c,v 1.11 2004/12/25 22:40:13 tom Exp $")
MODULE_ID("$Id: fld_current.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -52,7 +52,7 @@ set_current_field(FORM *form, FIELD *field)
{
int err = E_OK;
T((T_CALLED("set_current_field(%p,%p)"), form, field));
T((T_CALLED("set_current_field(%p,%p)"), (void *)form, (void *)field));
if (form == 0 || field == 0)
{
RETURN(E_BAD_ARGUMENT);
@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field)
NCURSES_EXPORT(FIELD *)
current_field(const FORM *form)
{
T((T_CALLED("current_field(%p)"), form));
T((T_CALLED("current_field(%p)"), (const void *)form));
returnField(Normalize_Form(form)->current);
}
@ -130,7 +130,7 @@ current_field(const FORM *form)
NCURSES_EXPORT(int)
field_index(const FIELD *field)
{
T((T_CALLED("field_index(%p)"), field));
T((T_CALLED("field_index(%p)"), (const void *)field));
returnCode((field != 0 && field->form != 0) ? (int)field->index : -1);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2005,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_def.c,v 1.36 2007/10/13 19:29:58 tom Exp $")
MODULE_ID("$Id: fld_def.c,v 1.38 2010/01/23 21:14:35 tom Exp $")
/* this can't be readonly */
static FIELD default_field =
@ -252,8 +252,8 @@ _nc_Free_Type(FIELD *field)
if (field->type != 0)
{
field->type->ref--;
}
_nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
}
}
/*---------------------------------------------------------------------------
@ -291,7 +291,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */
(New_Field = typeMalloc(FIELD, 1)) != 0)
{
T((T_CREATE("field %p"), New_Field));
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = default_field;
New_Field->rows = rows;
New_Field->cols = cols;
@ -355,7 +355,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
NCURSES_EXPORT(int)
free_field(FIELD *field)
{
T((T_CALLED("free_field(%p)"), field));
T((T_CALLED("free_field(%p)"), (void *)field));
if (!field)
{
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_dup.c,v 1.12 2007/10/13 19:30:21 tom Exp $")
MODULE_ID("$Id: fld_dup.c,v 1.13 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -53,12 +53,12 @@ dup_field(FIELD *field, int frow, int fcol)
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
T((T_CALLED("dup_field(%p,%d,%d)"), field, frow, fcol));
T((T_CALLED("dup_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (field && (frow >= 0) && (fcol >= 0) &&
((err = E_SYSTEM_ERROR) != 0) && /* trick : this resets the default error */
(New_Field = typeMalloc(FIELD, 1)))
{
T((T_CREATE("field %p"), New_Field));
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = frow;
New_Field->fcol = fcol;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftchoice.c,v 1.9 2004/12/11 21:44:57 tom Exp $")
MODULE_ID("$Id: fld_ftchoice.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -51,14 +51,19 @@ set_fieldtype_choice(FIELDTYPE *typ,
bool (*const next_choice) (FIELD *, const void *),
bool (*const prev_choice) (FIELD *, const void *))
{
T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), typ, next_choice, prev_choice));
T((T_CALLED("set_fieldtype_choice(%p,%p,%p)"), (void *)typ, next_choice, prev_choice));
if (!typ || !next_choice || !prev_choice)
RETURN(E_BAD_ARGUMENT);
typ->status |= _HAS_CHOICE;
#if NCURSES_INTEROP_FUNCS
typ->enum_next.onext = next_choice;
typ->enum_prev.oprev = prev_choice;
#else
typ->next = next_choice;
typ->prev = prev_choice;
#endif
RETURN(E_OK);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftlink.c,v 1.13 2007/10/13 19:30:35 tom Exp $")
MODULE_ID("$Id: fld_ftlink.c,v 1.14 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -53,14 +53,14 @@ link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2)
{
FIELDTYPE *nftyp = (FIELDTYPE *)0;
T((T_CALLED("link_fieldtype(%p,%p)"), type1, type2));
T((T_CALLED("link_fieldtype(%p,%p)"), (void *)type1, (void *)type2));
if (type1 && type2)
{
nftyp = typeMalloc(FIELDTYPE, 1);
if (nftyp)
{
T((T_CREATE("fieldtype %p"), nftyp));
T((T_CREATE("fieldtype %p"), (void *)nftyp));
*nftyp = *_nc_Default_FieldType;
nftyp->status |= _LINKED_TYPE;
if ((type1->status & _HAS_ARGS) || (type2->status & _HAS_ARGS))

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_info.c,v 1.10 2004/12/11 22:24:57 tom Exp $")
MODULE_ID("$Id: fld_info.c,v 1.11 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -53,10 +53,10 @@ field_info(const FIELD *field,
int *nrow, int *nbuf)
{
T((T_CALLED("field_info(%p,%p,%p,%p,%p,%p,%p)"),
field,
rows, cols,
frow, fcol,
nrow, nbuf));
(const void *)field,
(void *)rows, (void *)cols,
(void *)frow, (void *)fcol,
(void *)nrow, (void *)nbuf));
if (!field)
RETURN(E_BAD_ARGUMENT);
@ -91,7 +91,11 @@ field_info(const FIELD *field,
NCURSES_EXPORT(int)
dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow)
{
T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"), field, drows, dcols, maxgrow));
T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"),
(const void *)field,
(void *)drows,
(void *)dcols,
(void *)maxgrow));
if (!field)
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_just.c,v 1.11 2004/12/11 22:55:48 tom Exp $")
MODULE_ID("$Id: fld_just.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -49,7 +49,7 @@ set_field_just(FIELD *field, int just)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("set_field_just(%p,%d)"), field, just));
T((T_CALLED("set_field_just(%p,%d)"), (void *)field, just));
if ((just == NO_JUSTIFICATION) ||
(just == JUSTIFY_LEFT) ||
@ -79,7 +79,7 @@ set_field_just(FIELD *field, int just)
NCURSES_EXPORT(int)
field_just(const FIELD *field)
{
T((T_CALLED("field_just(%p)"), field));
T((T_CALLED("field_just(%p)"), (const void *)field));
returnCode(Normalize_Field(field)->just);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_link.c,v 1.11 2007/10/13 19:30:43 tom Exp $")
MODULE_ID("$Id: fld_link.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -54,12 +54,12 @@ link_field(FIELD *field, int frow, int fcol)
FIELD *New_Field = (FIELD *)0;
int err = E_BAD_ARGUMENT;
T((T_CALLED("link_field(%p,%d,%d)"), field, frow, fcol));
T((T_CALLED("link_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (field && (frow >= 0) && (fcol >= 0) &&
((err = E_SYSTEM_ERROR) != 0) && /* trick: this resets the default error */
(New_Field = typeMalloc(FIELD, 1)))
{
T((T_CREATE("field %p"), New_Field));
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = frow;
New_Field->fcol = fcol;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_max.c,v 1.9 2004/12/11 21:51:54 tom Exp $")
MODULE_ID("$Id: fld_max.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_max.c,v 1.9 2004/12/11 21:51:54 tom Exp $")
NCURSES_EXPORT(int)
set_max_field(FIELD *field, int maxgrow)
{
T((T_CALLED("set_max_field(%p,%d)"), field, maxgrow));
T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow));
if (!field || (maxgrow < 0))
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_move.c,v 1.9 2004/12/11 21:52:44 tom Exp $")
MODULE_ID("$Id: fld_move.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_move.c,v 1.9 2004/12/11 21:52:44 tom Exp $")
NCURSES_EXPORT(int)
move_field(FIELD *field, int frow, int fcol)
{
T((T_CALLED("move_field(%p,%d,%d)"), field, frow, fcol));
T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol));
if (!field || (frow < 0) || (fcol < 0))
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 *
@ -32,9 +32,9 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_newftyp.c,v 1.15 2007/10/13 19:30:55 tom Exp $")
MODULE_ID("$Id: fld_newftyp.c,v 1.19 2010/01/23 21:14:36 tom Exp $")
static FIELDTYPE const default_fieldtype =
static FIELDTYPE default_fieldtype =
{
0, /* status */
0L, /* reference count */
@ -43,13 +43,16 @@ static FIELDTYPE const default_fieldtype =
NULL, /* makearg function */
NULL, /* copyarg function */
NULL, /* freearg function */
NULL, /* field validation function */
NULL, /* Character check function */
NULL, /* enumerate next function */
NULL /* enumerate previous function */
INIT_FT_FUNC(NULL), /* field validation function */
INIT_FT_FUNC(NULL), /* Character check function */
INIT_FT_FUNC(NULL), /* enumerate next function */
INIT_FT_FUNC(NULL), /* enumerate previous function */
#if NCURSES_INTEROP_FUNCS
NULL /* generic callback alternative to makearg */
#endif
};
NCURSES_EXPORT_VAR(const FIELDTYPE *)
NCURSES_EXPORT_VAR(FIELDTYPE *)
_nc_Default_FieldType = &default_fieldtype;
/*---------------------------------------------------------------------------
@ -80,10 +83,15 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
if (nftyp)
{
T((T_CREATE("fieldtype %p"), nftyp));
T((T_CREATE("fieldtype %p"), (void *)nftyp));
*nftyp = default_fieldtype;
#if NCURSES_INTEROP_FUNCS
nftyp->fieldcheck.ofcheck = field_check;
nftyp->charcheck.occheck = char_check;
#else
nftyp->fcheck = field_check;
nftyp->ccheck = char_check;
#endif
}
else
{
@ -110,7 +118,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
NCURSES_EXPORT(int)
free_fieldtype(FIELDTYPE *typ)
{
T((T_CALLED("free_fieldtype(%p)"), typ));
T((T_CALLED("free_fieldtype(%p)"), (void *)typ));
if (!typ)
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_opts.c,v 1.11 2004/12/11 21:55:46 tom Exp $")
MODULE_ID("$Id: fld_opts.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*----------------------------------------------------------------------------
Field-Options manipulation routines
@ -55,7 +55,7 @@ set_field_opts(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("set_field_opts(%p,%d)"), field, opts));
T((T_CALLED("set_field_opts(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
@ -74,7 +74,7 @@ set_field_opts(FIELD *field, Field_Options opts)
NCURSES_EXPORT(Field_Options)
field_opts(const FIELD *field)
{
T((T_CALLED("field_opts(%p)"), field));
T((T_CALLED("field_opts(%p)"), (const void *)field));
returnCode(ALL_FIELD_OPTS & Normalize_Field(field)->opts);
}
@ -96,7 +96,7 @@ field_opts_on(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("field_opts_on(%p,%d)"), field, opts));
T((T_CALLED("field_opts_on(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))
@ -124,7 +124,7 @@ field_opts_off(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("field_opts_off(%p,%d)"), field, opts));
T((T_CALLED("field_opts_off(%p,%d)"), (void *)field, opts));
opts &= ALL_FIELD_OPTS;
if (!(opts & ~ALL_FIELD_OPTS))

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_pad.c,v 1.9 2004/12/11 21:56:49 tom Exp $")
MODULE_ID("$Id: fld_pad.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -50,7 +50,7 @@ set_field_pad(FIELD *field, int ch)
{
int res = E_BAD_ARGUMENT;
T((T_CALLED("set_field_pad(%p,%d)"), field, ch));
T((T_CALLED("set_field_pad(%p,%d)"), (void *)field, ch));
Normalize_Field(field);
if (isprint(UChar(ch)))
@ -77,7 +77,7 @@ set_field_pad(FIELD *field, int ch)
NCURSES_EXPORT(int)
field_pad(const FIELD *field)
{
T((T_CALLED("field_pad(%p)"), field));
T((T_CALLED("field_pad(%p)"), (const void *)field));
returnCode(Normalize_Field(field)->pad);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_page.c,v 1.9 2004/12/11 21:58:19 tom Exp $")
MODULE_ID("$Id: fld_page.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_page.c,v 1.9 2004/12/11 21:58:19 tom Exp $")
NCURSES_EXPORT(int)
set_new_page(FIELD *field, bool new_page_flag)
{
T((T_CALLED("set_new_page(%p,%d)"), field, new_page_flag));
T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag));
Normalize_Field(field);
if (field->form)
@ -74,7 +74,7 @@ set_new_page(FIELD *field, bool new_page_flag)
NCURSES_EXPORT(bool)
new_page(const FIELD *field)
{
T((T_CALLED("new_page(%p)"), field));
T((T_CALLED("new_page(%p)"), (const void *)field));
returnBool((Normalize_Field(field)->status & _NEWPAGE) ? TRUE : FALSE);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
MODULE_ID("$Id: fld_stat.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_stat.c,v 1.11 2004/12/11 22:28:00 tom Exp $")
NCURSES_EXPORT(int)
set_field_status(FIELD *field, bool status)
{
T((T_CALLED("set_field_status(%p,%d)"), field, status));
T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
Normalize_Field(field);
@ -71,7 +71,7 @@ set_field_status(FIELD *field, bool status)
NCURSES_EXPORT(bool)
field_status(const FIELD *field)
{
T((T_CALLED("field_status(%p)"), field));
T((T_CALLED("field_status(%p)"), (const void *)field));
returnBool((Normalize_Field(field)->status & _CHANGED) ? TRUE : FALSE);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_type.c,v 1.15 2004/12/25 22:24:10 tom Exp $")
MODULE_ID("$Id: fld_type.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -52,7 +52,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
int res = E_SYSTEM_ERROR;
int err = 0;
T((T_CALLED("set_field_type(%p,%p)"), field, type));
T((T_CALLED("set_field_type(%p,%p)"), (void *)field, (void *)type));
va_start(ap, type);
@ -90,7 +90,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
NCURSES_EXPORT(FIELDTYPE *)
field_type(const FIELD *field)
{
T((T_CALLED("field_type(%p)"), field));
T((T_CALLED("field_type(%p)"), (const void *)field));
returnFieldType(Normalize_Field(field)->type);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_user.c,v 1.15 2004/12/25 22:24:50 tom Exp $")
MODULE_ID("$Id: fld_user.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_user.c,v 1.15 2004/12/25 22:24:50 tom Exp $")
NCURSES_EXPORT(int)
set_field_userptr(FIELD *field, void *usrptr)
{
T((T_CALLED("set_field_userptr(%p,%p)"), field, usrptr));
T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr));
Normalize_Field(field)->usrptr = usrptr;
RETURN(E_OK);
@ -65,7 +65,7 @@ set_field_userptr(FIELD *field, void *usrptr)
NCURSES_EXPORT(void *)
field_userptr(const FIELD *field)
{
T((T_CALLED("field_userptr(%p)"), field));
T((T_CALLED("field_userptr(%p)"), (const void *)field));
returnVoidPtr(Normalize_Field(field)->usrptr);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2009 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 *
@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.h,v 0.20 2004/12/04 22:22:10 tom Exp $ */
/* $Id: form.h,v 0.21 2009/11/07 19:31:11 tom Exp $ */
#ifndef FORM_H
#define FORM_H
@ -105,27 +105,6 @@ typedef struct fieldnode {
NCURSES_FIELD_INTERNALS
} FIELD;
/**************
* FIELDTYPE *
**************/
typedef struct typenode {
unsigned short status; /* flags */
long ref; /* reference count */
struct typenode * left; /* ptr to operand for | */
struct typenode * right; /* ptr to operand for | */
void* (*makearg)(va_list *); /* make fieldtype arg */
void* (*copyarg)(const void *); /* copy fieldtype arg */
void (*freearg)(void *); /* free fieldtype arg */
bool (*fcheck)(FIELD *,const void *); /* field validation */
bool (*ccheck)(int,const void *); /* character validation */
bool (*next)(FIELD *,const void *); /* enumerate next value */
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
} FIELDTYPE;
/*********
* FORM *
@ -158,6 +137,49 @@ typedef struct formnode {
} FORM;
/**************
* FIELDTYPE *
**************/
typedef struct typenode {
unsigned short status; /* flags */
long ref; /* reference count */
struct typenode * left; /* ptr to operand for | */
struct typenode * right; /* ptr to operand for | */
void* (*makearg)(va_list *); /* make fieldtype arg */
void* (*copyarg)(const void *); /* copy fieldtype arg */
void (*freearg)(void *); /* free fieldtype arg */
#if NCURSES_INTEROP_FUNCS
union {
bool (*ofcheck)(FIELD *,const void *); /* field validation */
bool (*gfcheck)(FORM*,FIELD *,const void*); /* generic field validation */
} fieldcheck;
union {
bool (*occheck)(int,const void *); /* character validation */
bool (*gccheck)(int,FORM*,
FIELD*,const void*); /* generic char validation */
} charcheck;
union {
bool (*onext)(FIELD *,const void *); /* enumerate next value */
bool (*gnext)(FORM*,FIELD*,const void*); /* generic enumerate next */
} enum_next;
union {
bool (*oprev)(FIELD *,const void *); /* enumerate prev value */
bool (*gprev)(FORM*,FIELD*,const void*); /* generic enumerate prev */
} enum_prev;
void* (*genericarg)(void*); /* Alternate Arg method */
#else
bool (*fcheck)(FIELD *,const void *); /* field validation */
bool (*ccheck)(int,const void *); /* character validation */
bool (*next)(FIELD *,const void *); /* enumerate next value */
bool (*prev)(FIELD *,const void *); /* enumerate prev value */
#endif
} FIELDTYPE;
typedef void (*Form_Hook)(FORM *);
/***************************
@ -278,13 +300,6 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
************************************/
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
/***********************
* Default objects *
***********************/
extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
/***********************
* FIELDTYPE routines *
***********************/
@ -396,6 +411,10 @@ extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *);
extern NCURSES_EXPORT(bool) data_ahead (const FORM *);
extern NCURSES_EXPORT(bool) data_behind (const FORM *);
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,2009 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 *
@ -30,7 +30,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.priv.h,v 0.27 2008/09/08 20:29:05 tom Exp $ */
/* $Id: form.priv.h,v 0.32 2009/11/07 21:26:43 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
@ -62,6 +62,13 @@
#include "form.h"
/***********************
* Default objects *
***********************/
extern NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form;
extern NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
/* form status values */
#define _OVLMODE (0x04U) /* Form is in overlay mode */
#define _WINDOW_MODIFIED (0x10U) /* Current field window has been modified */
@ -78,6 +85,7 @@
#define _HAS_ARGS (0x02U) /* Type has arguments */
#define _HAS_CHOICE (0x04U) /* Type has choice methods */
#define _RESIDENT (0x08U) /* Type is built-in */
#define _GENERIC (0x10U) /* A generic field type */
/* This are the field options required to be a selectable field in field
navigation requests */
@ -91,9 +99,20 @@
#define Normalize_Field(field) \
((field) = (field != 0) ? (field) : _nc_Default_Field)
#if NCURSES_SP_FUNCS
#define Get_Form_Screen(form) \
((form)->win ? _nc_screen_of((form->win)):CURRENT_SCREEN)
#else
#define Get_Form_Screen(form) CURRENT_SCREEN
#endif
/* Retrieve forms window */
#define Get_Form_Window(form) \
((form)->sub?(form)->sub:((form)->win?(form)->win:stdscr))
((form)->sub \
? (form)->sub \
: ((form)->win \
? (form)->win \
: StdScreen(Get_Form_Screen(form))))
/* Calculate the size for a single buffer for this field */
#define Buffer_Length(field) ((field)->drows * (field)->dcols)
@ -144,8 +163,6 @@ TypeArgument;
#define C_ZEROS '\0'
extern NCURSES_EXPORT_VAR(const FIELDTYPE *) _nc_Default_FieldType;
extern NCURSES_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
extern NCURSES_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
extern NCURSES_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
@ -161,6 +178,36 @@ extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*);
extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
#if NCURSES_INTEROP_FUNCS
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
extern NCURSES_EXPORT(FIELDTYPE *)
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
FIELD *,
const void *),
bool (*const char_check) (int,
FORM*,
FIELD*,
const void *),
bool (*const next)(FORM*,FIELD*,const void*),
bool (*const prev)(FORM*,FIELD*,const void*),
void (*freecallback)(void*));
extern NCURSES_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**));
extern NCURSES_EXPORT(WINDOW*) _nc_form_cursor(const FORM* , int* , int* );
#define INIT_FT_FUNC(func) {func}
#else
#define INIT_FT_FUNC(func) func
#endif
extern NCURSES_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*);
#if USE_WIDEC_SUPPORT
extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
#endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_cursor.c,v 1.9 2004/12/11 22:01:03 tom Exp $")
MODULE_ID("$Id: frm_cursor.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -53,7 +53,7 @@ pos_form_cursor(FORM *form)
{
int res;
T((T_CALLED("pos_form_cursor(%p)"), form));
T((T_CALLED("pos_form_cursor(%p)"), (void *)form));
if (!form)
res = E_BAD_ARGUMENT;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2005,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_data.c,v 1.14 2005/11/26 15:34:01 tom Exp $")
MODULE_ID("$Id: frm_data.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -49,7 +49,7 @@ data_behind(const FORM *form)
{
bool result = FALSE;
T((T_CALLED("data_behind(%p)"), form));
T((T_CALLED("data_behind(%p)"), (const void *)form));
if (form && (form->status & _POSTED) && form->current)
{
@ -136,7 +136,7 @@ data_ahead(const FORM *form)
{
bool result = FALSE;
T((T_CALLED("data_ahead(%p)"), form));
T((T_CALLED("data_ahead(%p)"), (const void *)form));
if (form && (form->status & _POSTED) && form->current)
{

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_def.c,v 1.23 2008/08/04 00:07:55 tom Exp $")
MODULE_ID("$Id: frm_def.c,v 1.25 2010/01/23 21:14:36 tom Exp $")
/* this can't be readonly */
static FORM default_form =
@ -160,7 +160,7 @@ Connect_Fields(FORM *form, FIELD **fields)
int maximum_row_in_field, maximum_col_in_field;
_PAGE *pg;
T((T_CALLED("Connect_Fields(%p,%p)"), form, fields));
T((T_CALLED("Connect_Fields(%p,%p)"), (void *)form, (void *)fields));
assert(form);
@ -188,7 +188,7 @@ Connect_Fields(FORM *form, FIELD **fields)
/* allocate page structures */
if ((pg = typeMalloc(_PAGE, page_nr)) != (_PAGE *) 0)
{
T((T_CREATE("_PAGE %p"), pg));
T((T_CREATE("_PAGE %p"), (void *)pg));
form->page = pg;
}
else
@ -283,7 +283,7 @@ Associate_Fields(FORM *form, FIELD **fields)
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FORM *new_form( FIELD **fields )
| Function : FORM *new_form_sp(SCREEN* sp, FIELD** fields )
|
| Description : Create new form with given array of fields.
|
@ -295,23 +295,33 @@ Associate_Fields(FORM *form, FIELD **fields)
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FORM *)
new_form(FIELD **fields)
NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
{
int err = E_SYSTEM_ERROR;
FORM *form = (FORM *)0;
FORM *form = typeMalloc(FORM, 1);
T((T_CALLED("new_form(%p,%p)"), (void *)SP_PARM, (void *)fields));
if (IsValidScreen(SP_PARM))
{
form = typeMalloc(FORM, 1);
T((T_CALLED("new_form(%p)"), fields));
if (form)
{
T((T_CREATE("form %p"), form));
T((T_CREATE("form %p"), (void *)form));
*form = *_nc_Default_Form;
/* This ensures win and sub are always non-null,
so we can derive always the SCREEN that this form is
running on. */
form->win = StdScreen(SP_PARM);
form->sub = StdScreen(SP_PARM);
if ((err = Associate_Fields(form, fields)) != E_OK)
{
free_form(form);
form = (FORM *)0;
}
}
}
if (!form)
SET_ERROR(err);
@ -319,6 +329,27 @@ new_form(FIELD **fields)
returnForm(form);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FORM* new_form(FIELD** fields )
|
| Description : Create new form with given array of fields.
|
| Return Values : Pointer to form. NULL if error occurred.
! Set errno:
| E_OK - success
| E_BAD_ARGUMENT - Invalid form pointer or field array
| E_CONNECTED - a field is already connected
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(FORM *)
new_form(FIELD **fields)
{
return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields);
}
#endif
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int free_form( FORM *form )
@ -332,7 +363,7 @@ new_form(FIELD **fields)
NCURSES_EXPORT(int)
free_form(FORM *form)
{
T((T_CALLED("free_form(%p)"), form));
T((T_CALLED("free_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -366,7 +397,7 @@ set_form_fields(FORM *form, FIELD **fields)
FIELD **old;
int res;
T((T_CALLED("set_form_fields(%p,%p)"), form, fields));
T((T_CALLED("set_form_fields(%p,%p)"), (void *)form, (void *)fields));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -394,7 +425,7 @@ set_form_fields(FORM *form, FIELD **fields)
NCURSES_EXPORT(FIELD **)
form_fields(const FORM *form)
{
T((T_CALLED("form_field(%p)"), form));
T((T_CALLED("form_field(%p)"), (const void *)form));
returnFieldPtr(Normalize_Form(form)->field);
}
@ -409,7 +440,7 @@ form_fields(const FORM *form)
NCURSES_EXPORT(int)
field_count(const FORM *form)
{
T((T_CALLED("field_count(%p)"), form));
T((T_CALLED("field_count(%p)"), (const void *)form));
returnCode(Normalize_Form(form)->maxfield);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_driver.c,v 1.88 2008/10/18 16:25:00 tom Exp $")
MODULE_ID("$Id: frm_driver.c,v 1.98 2010/05/01 21:11:43 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@ -188,7 +188,7 @@ static int FE_Delete_Previous(FORM *);
/* Macro to set the attributes for a fields window */
#define Set_Field_Window_Attributes(field,win) \
( wbkgdset((win),(chtype)((field)->pad | (field)->back)), \
wattrset((win),(field)->fore) )
(void) wattrset((win),(field)->fore) )
/* Logic to decide whether or not a field really appears on the form */
#define Field_Really_Appears(field) \
@ -512,9 +512,10 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void Window_To_Buffer(
| Function : void _nc_get_fieldbuffer(
| WINDOW * win,
| FIELD * field)
| FIELD * field,
| FIELD_CELL * buf)
|
| Description : Copy the content of the window into the buffer.
| The multiple lines of a window are simply
@ -523,18 +524,22 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
|
| Return Values : -
+--------------------------------------------------------------------------*/
static void
Window_To_Buffer(WINDOW *win, FIELD *field)
NCURSES_EXPORT(void)
_nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf)
{
int pad;
int len = 0;
FIELD_CELL *p;
int row, height;
WINDOW *win;
assert(win && field && field->buf);
assert(form && field && buf);
win = form->w;
assert(win);
pad = field->pad;
p = field->buf;
p = buf;
height = getmaxy(win);
for (row = 0; (row < height) && (row < field->drows); row++)
@ -561,6 +566,25 @@ Window_To_Buffer(WINDOW *win, FIELD *field)
}
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void Window_To_Buffer(
| FORM * form,
| FIELD * field)
|
| Description : Copy the content of the window into the buffer.
| The multiple lines of a window are simply
| concatenated into the buffer. Pad characters in
| the window will be replaced by blanks in the buffer.
|
| Return Values : -
+--------------------------------------------------------------------------*/
static void
Window_To_Buffer(FORM *form, FIELD *field)
{
_nc_get_fieldbuffer(form, field, field->buf);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void Synchronize_Buffer(FORM * form)
@ -579,7 +603,7 @@ Synchronize_Buffer(FORM *form)
{
form->status &= ~_WINDOW_MODIFIED;
form->status |= _FCHECK_REQUIRED;
Window_To_Buffer(form->w, form->current);
Window_To_Buffer(form, form->current);
wmove(form->w, form->currow, form->curcol);
}
}
@ -663,7 +687,7 @@ Field_Grown(FIELD *field, int amount)
result = TRUE; /* allow sharing of recovery on failure */
T((T_CREATE("fieldcell %p"), newbuf));
T((T_CREATE("fieldcell %p"), (void *)newbuf));
field->buf = newbuf;
for (i = 0; i <= field->nbuf; i++)
{
@ -752,7 +776,7 @@ Field_Grown(FIELD *field, int amount)
static int
Field_encloses(FIELD *field, int ry, int rx)
{
T((T_CALLED("Field_encloses(%p)"), field));
T((T_CALLED("Field_encloses(%p)"), (void *)field));
if (field != 0
&& field->frow <= ry
&& (field->frow + field->rows) > ry
@ -825,7 +849,7 @@ _nc_Refresh_Current_Field(FORM *form)
WINDOW *formwin;
FIELD *field;
T((T_CALLED("_nc_Refresh_Current_Field(%p)"), form));
T((T_CALLED("_nc_Refresh_Current_Field(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -1010,7 +1034,8 @@ Undo_Justification(FIELD *field, WINDOW *win)
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static bool Check_Char(
| Function : static bool Check_Char(FORM *form,
| FIELD *field,
| FIELDTYPE * typ,
| int ch,
| TypeArgument *argp)
@ -1022,7 +1047,11 @@ Undo_Justification(FIELD *field, WINDOW *win)
| FALSE - Character is invalid
+--------------------------------------------------------------------------*/
static bool
Check_Char(FIELDTYPE *typ, int ch, TypeArgument *argp)
Check_Char(FORM *form,
FIELD *field,
FIELDTYPE *typ,
int ch,
TypeArgument *argp)
{
if (typ)
{
@ -1030,13 +1059,23 @@ Check_Char(FIELDTYPE *typ, int ch, TypeArgument *argp)
{
assert(argp);
return (
Check_Char(typ->left, ch, argp->left) ||
Check_Char(typ->right, ch, argp->right));
Check_Char(form, field, typ->left, ch, argp->left) ||
Check_Char(form, field, typ->right, ch, argp->right));
}
else
{
#if NCURSES_INTEROP_FUNCS
if (typ->charcheck.occheck)
{
if (typ->status & _GENERIC)
return typ->charcheck.gccheck(ch, form, field, (void *)argp);
else
return typ->charcheck.occheck(ch, (void *)argp);
}
#else
if (typ->ccheck)
return typ->ccheck(ch, (void *)argp);
#endif
}
}
return (!iscntrl(UChar(ch)) ? TRUE : FALSE);
@ -1073,9 +1112,13 @@ Display_Or_Erase_Field(FIELD *field, bool bEraseFlag)
else
{
if (field->opts & O_VISIBLE)
{
Set_Field_Window_Attributes(field, win);
}
else
wattrset(win, WINDOW_ATTRS(fwin));
{
(void)wattrset(win, WINDOW_ATTRS(fwin));
}
werase(win);
}
@ -1197,7 +1240,7 @@ _nc_Synchronize_Attributes(FIELD *field)
int res = E_OK;
WINDOW *formwin;
T((T_CALLED("_nc_Synchronize_Attributes(%p)"), field));
T((T_CALLED("_nc_Synchronize_Attributes(%p)"), (void *)field));
if (!field)
returnCode(E_BAD_ARGUMENT);
@ -1264,7 +1307,7 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
FORM *form;
int res = E_OK;
T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), field, newopts));
T((T_CALLED("_nc_Synchronize_Options(%p,%#x)"), (void *)field, newopts));
if (!field)
returnCode(E_BAD_ARGUMENT);
@ -1275,15 +1318,14 @@ _nc_Synchronize_Options(FIELD *field, Field_Options newopts)
form = field->form;
if (form)
{
if (form->status & _POSTED)
{
if (form->current == field)
{
field->opts = oldopts;
returnCode(E_CURRENT);
}
if (form->status & _POSTED)
{
if ((form->curpage == field->page))
{
if (changed_opts & O_VISIBLE)
@ -1365,7 +1407,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
FIELD *field;
WINDOW *new_window;
T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), form, newfield));
T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield));
if (!form || !newfield || !form->current || (newfield->form != form))
returnCode(E_BAD_ARGUMENT);
@ -1399,7 +1441,7 @@ _nc_Set_Current_Field(FORM *form, FIELD *newfield)
{
if (Justification_Allowed(field))
{
Window_To_Buffer(form->w, field);
Window_To_Buffer(form, field);
werase(form->w);
Perform_Justification(field, form->w);
wsyncup(form->w);
@ -1472,7 +1514,7 @@ IFN_Next_Character(FORM *form)
FIELD *field = form->current;
int step = myWCWIDTH(form->w, form->currow, form->curcol);
T((T_CALLED("IFN_Next_Character(%p)"), form));
T((T_CALLED("IFN_Next_Character(%p)"), (void *)form));
if ((form->curcol += step) == field->dcols)
{
if ((++(form->currow)) == field->drows)
@ -1514,7 +1556,7 @@ IFN_Previous_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
int oldcol = form->curcol;
T((T_CALLED("IFN_Previous_Character(%p)"), form));
T((T_CALLED("IFN_Previous_Character(%p)"), (void *)form));
if ((form->curcol -= amount) < 0)
{
if ((--(form->currow)) < 0)
@ -1542,7 +1584,7 @@ IFN_Next_Line(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("IFN_Next_Line(%p)"), form));
T((T_CALLED("IFN_Next_Line(%p)"), (void *)form));
if ((++(form->currow)) == field->drows)
{
#if GROW_IF_NAVIGATE
@ -1568,7 +1610,7 @@ IFN_Next_Line(FORM *form)
static int
IFN_Previous_Line(FORM *form)
{
T((T_CALLED("IFN_Previous_Line(%p)"), form));
T((T_CALLED("IFN_Previous_Line(%p)"), (void *)form));
if ((--(form->currow)) < 0)
{
form->currow++;
@ -1595,7 +1637,7 @@ IFN_Next_Word(FORM *form)
FIELD_CELL *s;
FIELD_CELL *t;
T((T_CALLED("IFN_Next_Word(%p)"), form));
T((T_CALLED("IFN_Next_Word(%p)"), (void *)form));
/* We really need access to the data, so we have to synchronize */
Synchronize_Buffer(form);
@ -1638,7 +1680,7 @@ IFN_Previous_Word(FORM *form)
FIELD_CELL *t;
bool again = FALSE;
T((T_CALLED("IFN_Previous_Word(%p)"), form));
T((T_CALLED("IFN_Previous_Word(%p)"), (void *)form));
/* We really need access to the data, so we have to synchronize */
Synchronize_Buffer(form);
@ -1688,7 +1730,7 @@ IFN_Beginning_Of_Field(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("IFN_Beginning_Of_Field(%p)"), form));
T((T_CALLED("IFN_Beginning_Of_Field(%p)"), (void *)form));
Synchronize_Buffer(form);
Adjust_Cursor_Position(form,
Get_Start_Of_Data(field->buf, Buffer_Length(field)));
@ -1712,7 +1754,7 @@ IFN_End_Of_Field(FORM *form)
FIELD *field = form->current;
FIELD_CELL *pos;
T((T_CALLED("IFN_End_Of_Field(%p)"), form));
T((T_CALLED("IFN_End_Of_Field(%p)"), (void *)form));
Synchronize_Buffer(form);
pos = After_End_Of_Data(field->buf, Buffer_Length(field));
if (pos == (field->buf + Buffer_Length(field)))
@ -1735,7 +1777,7 @@ IFN_Beginning_Of_Line(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("IFN_Beginning_Of_Line(%p)"), form));
T((T_CALLED("IFN_Beginning_Of_Line(%p)"), (void *)form));
Synchronize_Buffer(form);
Adjust_Cursor_Position(form,
Get_Start_Of_Data(Address_Of_Current_Row_In_Buffer(form),
@ -1761,7 +1803,7 @@ IFN_End_Of_Line(FORM *form)
FIELD_CELL *pos;
FIELD_CELL *bp;
T((T_CALLED("IFN_End_Of_Line(%p)"), form));
T((T_CALLED("IFN_End_Of_Line(%p)"), (void *)form));
Synchronize_Buffer(form);
bp = Address_Of_Current_Row_In_Buffer(form);
pos = After_End_Of_Data(bp, field->dcols);
@ -1787,7 +1829,7 @@ IFN_Left_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol - 1);
int oldcol = form->curcol;
T((T_CALLED("IFN_Left_Character(%p)"), form));
T((T_CALLED("IFN_Left_Character(%p)"), (void *)form));
if ((form->curcol -= amount) < 0)
{
form->curcol = oldcol;
@ -1812,7 +1854,7 @@ IFN_Right_Character(FORM *form)
int amount = myWCWIDTH(form->w, form->currow, form->curcol);
int oldcol = form->curcol;
T((T_CALLED("IFN_Right_Character(%p)"), form));
T((T_CALLED("IFN_Right_Character(%p)"), (void *)form));
if ((form->curcol += amount) >= form->current->dcols)
{
#if GROW_IF_NAVIGATE
@ -1840,7 +1882,7 @@ IFN_Right_Character(FORM *form)
static int
IFN_Up_Character(FORM *form)
{
T((T_CALLED("IFN_Up_Character(%p)"), form));
T((T_CALLED("IFN_Up_Character(%p)"), (void *)form));
if ((--(form->currow)) < 0)
{
form->currow++;
@ -1864,7 +1906,7 @@ IFN_Down_Character(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("IFN_Down_Character(%p)"), form));
T((T_CALLED("IFN_Down_Character(%p)"), (void *)form));
if ((++(form->currow)) == field->drows)
{
#if GROW_IF_NAVIGATE
@ -1973,7 +2015,7 @@ Vertical_Scrolling(int (*const fct) (FORM *), FORM *form)
static int
VSC_Scroll_Line_Forward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), form));
T((T_CALLED("VSC_Scroll_Line_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, 1));
}
@ -1989,7 +2031,7 @@ VSC_Scroll_Line_Forward(FORM *form)
static int
VSC_Scroll_Line_Backward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), form));
T((T_CALLED("VSC_Scroll_Line_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -1));
}
@ -2005,7 +2047,7 @@ VSC_Scroll_Line_Backward(FORM *form)
static int
VSC_Scroll_Page_Forward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), form));
T((T_CALLED("VSC_Scroll_Page_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, form->current->rows));
}
@ -2021,7 +2063,7 @@ VSC_Scroll_Page_Forward(FORM *form)
static int
VSC_Scroll_Half_Page_Forward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), form));
T((T_CALLED("VSC_Scroll_Half_Page_Forward(%p)"), (void *)form));
returnCode(VSC_Generic(form, (form->current->rows + 1) / 2));
}
@ -2037,7 +2079,7 @@ VSC_Scroll_Half_Page_Forward(FORM *form)
static int
VSC_Scroll_Page_Backward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), form));
T((T_CALLED("VSC_Scroll_Page_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -(form->current->rows)));
}
@ -2053,7 +2095,7 @@ VSC_Scroll_Page_Backward(FORM *form)
static int
VSC_Scroll_Half_Page_Backward(FORM *form)
{
T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), form));
T((T_CALLED("VSC_Scroll_Half_Page_Backward(%p)"), (void *)form));
returnCode(VSC_Generic(form, -((form->current->rows + 1) / 2)));
}
/*----------------------------------------------------------------------------
@ -2147,7 +2189,7 @@ Horizontal_Scrolling(int (*const fct) (FORM *), FORM *form)
static int
HSC_Scroll_Char_Forward(FORM *form)
{
T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), form));
T((T_CALLED("HSC_Scroll_Char_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, 1));
}
@ -2163,7 +2205,7 @@ HSC_Scroll_Char_Forward(FORM *form)
static int
HSC_Scroll_Char_Backward(FORM *form)
{
T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), form));
T((T_CALLED("HSC_Scroll_Char_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -1));
}
@ -2179,7 +2221,7 @@ HSC_Scroll_Char_Backward(FORM *form)
static int
HSC_Horizontal_Line_Forward(FORM *form)
{
T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), form));
T((T_CALLED("HSC_Horizontal_Line_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, form->current->cols));
}
@ -2195,7 +2237,7 @@ HSC_Horizontal_Line_Forward(FORM *form)
static int
HSC_Horizontal_Half_Line_Forward(FORM *form)
{
T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), form));
T((T_CALLED("HSC_Horizontal_Half_Line_Forward(%p)"), (void *)form));
returnCode(HSC_Generic(form, (form->current->cols + 1) / 2));
}
@ -2211,7 +2253,7 @@ HSC_Horizontal_Half_Line_Forward(FORM *form)
static int
HSC_Horizontal_Line_Backward(FORM *form)
{
T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), form));
T((T_CALLED("HSC_Horizontal_Line_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -(form->current->cols)));
}
@ -2227,7 +2269,7 @@ HSC_Horizontal_Line_Backward(FORM *form)
static int
HSC_Horizontal_Half_Line_Backward(FORM *form)
{
T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), form));
T((T_CALLED("HSC_Horizontal_Half_Line_Backward(%p)"), (void *)form));
returnCode(HSC_Generic(form, -((form->current->cols + 1) / 2)));
}
@ -2406,7 +2448,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form)
return E_SYSTEM_ERROR;
}
bp = Address_Of_Current_Row_In_Buffer(form);
Window_To_Buffer(form->w, field);
Window_To_Buffer(form, field);
split = After_Last_Whitespace_Character(bp, field->dcols);
/* split points to the first character of the sequence to be brought
on the next line */
@ -2432,7 +2474,7 @@ Wrapping_Not_Necessary_Or_Wrapping_Ok(FORM *form)
if (result != E_OK)
{
DeleteChar(form);
Window_To_Buffer(form->w, field);
Window_To_Buffer(form, field);
result = E_REQUEST_DENIED;
}
}
@ -2523,7 +2565,7 @@ FE_New_Line(FORM *form)
FIELD_CELL *bp, *t;
bool Last_Row = ((field->drows - 1) == form->currow);
T((T_CALLED("FE_New_Line(%p)"), form));
T((T_CALLED("FE_New_Line(%p)"), (void *)form));
if (form->status & _OVLMODE)
{
if (Last_Row &&
@ -2606,8 +2648,9 @@ FE_Insert_Character(FORM *form)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
T((T_CALLED("FE_Insert_Character(%p)"), form));
if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
T((T_CALLED("FE_Insert_Character(%p)"), (void *)form));
if (Check_Char(form, field, field->type, (int)C_BLANK,
(TypeArgument *)(field->arg)))
{
bool There_Is_Room = Is_There_Room_For_A_Char_In_Line(form);
@ -2641,8 +2684,9 @@ FE_Insert_Line(FORM *form)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
T((T_CALLED("FE_Insert_Line(%p)"), form));
if (Check_Char(field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
T((T_CALLED("FE_Insert_Line(%p)"), (void *)form));
if (Check_Char(form, field,
field->type, (int)C_BLANK, (TypeArgument *)(field->arg)))
{
bool Maybe_Done = (form->currow != (field->drows - 1)) &&
Is_There_Room_For_A_Line(form);
@ -2674,7 +2718,7 @@ FE_Insert_Line(FORM *form)
static int
FE_Delete_Character(FORM *form)
{
T((T_CALLED("FE_Delete_Character(%p)"), form));
T((T_CALLED("FE_Delete_Character(%p)"), (void *)form));
DeleteChar(form);
returnCode(E_OK);
}
@ -2697,7 +2741,7 @@ FE_Delete_Previous(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("FE_Delete_Previous(%p)"), form));
T((T_CALLED("FE_Delete_Previous(%p)"), (void *)form));
if (First_Position_In_Current_Field(form))
returnCode(E_REQUEST_DENIED);
@ -2765,7 +2809,7 @@ FE_Delete_Previous(FORM *form)
static int
FE_Delete_Line(FORM *form)
{
T((T_CALLED("FE_Delete_Line(%p)"), form));
T((T_CALLED("FE_Delete_Line(%p)"), (void *)form));
form->curcol = 0;
wdeleteln(form->w);
returnCode(E_OK);
@ -2789,7 +2833,7 @@ FE_Delete_Word(FORM *form)
FIELD_CELL *cp = bp + form->curcol;
FIELD_CELL *s;
T((T_CALLED("FE_Delete_Word(%p)"), form));
T((T_CALLED("FE_Delete_Word(%p)"), (void *)form));
Synchronize_Buffer(form);
if (ISBLANK(*cp))
returnCode(E_REQUEST_DENIED); /* not in word */
@ -2823,7 +2867,7 @@ FE_Delete_Word(FORM *form)
static int
FE_Clear_To_End_Of_Line(FORM *form)
{
T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), form));
T((T_CALLED("FE_Clear_To_End_Of_Line(%p)"), (void *)form));
wmove(form->w, form->currow, form->curcol);
wclrtoeol(form->w);
returnCode(E_OK);
@ -2840,7 +2884,7 @@ FE_Clear_To_End_Of_Line(FORM *form)
static int
FE_Clear_To_End_Of_Field(FORM *form)
{
T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), form));
T((T_CALLED("FE_Clear_To_End_Of_Field(%p)"), (void *)form));
wmove(form->w, form->currow, form->curcol);
wclrtobot(form->w);
returnCode(E_OK);
@ -2857,7 +2901,7 @@ FE_Clear_To_End_Of_Field(FORM *form)
static int
FE_Clear_Field(FORM *form)
{
T((T_CALLED("FE_Clear_Field(%p)"), form));
T((T_CALLED("FE_Clear_Field(%p)"), (void *)form));
form->currow = form->curcol = 0;
werase(form->w);
returnCode(E_OK);
@ -2881,7 +2925,7 @@ FE_Clear_Field(FORM *form)
static int
EM_Overlay_Mode(FORM *form)
{
T((T_CALLED("EM_Overlay_Mode(%p)"), form));
T((T_CALLED("EM_Overlay_Mode(%p)"), (void *)form));
form->status |= _OVLMODE;
returnCode(E_OK);
}
@ -2897,7 +2941,7 @@ EM_Overlay_Mode(FORM *form)
static int
EM_Insert_Mode(FORM *form)
{
T((T_CALLED("EM_Insert_Mode(%p)"), form));
T((T_CALLED("EM_Insert_Mode(%p)"), (void *)form));
form->status &= ~_OVLMODE;
returnCode(E_OK);
}
@ -2912,7 +2956,7 @@ EM_Insert_Mode(FORM *form)
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static bool Next_Choice(
| Function : static bool Next_Choice(FORM * form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument *argp)
@ -2924,7 +2968,7 @@ EM_Insert_Mode(FORM *form)
| FALSE - couldn't retrieve next choice
+--------------------------------------------------------------------------*/
static bool
Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
Next_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (!typ || !(typ->status & _HAS_CHOICE))
return FALSE;
@ -2933,19 +2977,27 @@ Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
Next_Choice(typ->left, field, argp->left) ||
Next_Choice(typ->right, field, argp->right));
Next_Choice(form, typ->left, field, argp->left) ||
Next_Choice(form, typ->right, field, argp->right));
}
else
{
#if NCURSES_INTEROP_FUNCS
assert(typ->enum_next.onext);
if (typ->status & _GENERIC)
return typ->enum_next.gnext(form, field, (void *)argp);
else
return typ->enum_next.onext(field, (void *)argp);
#else
assert(typ->next);
return typ->next(field, (void *)argp);
#endif
}
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static bool Previous_Choice(
| Function : static bool Previous_Choice(FORM * form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument *argp)
@ -2957,7 +3009,7 @@ Next_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
| FALSE - couldn't retrieve previous choice
+--------------------------------------------------------------------------*/
static bool
Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
Previous_Choice(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (!typ || !(typ->status & _HAS_CHOICE))
return FALSE;
@ -2966,13 +3018,21 @@ Previous_Choice(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
Previous_Choice(typ->left, field, argp->left) ||
Previous_Choice(typ->right, field, argp->right));
Previous_Choice(form, typ->left, field, argp->left) ||
Previous_Choice(form, typ->right, field, argp->right));
}
else
{
#if NCURSES_INTEROP_FUNCS
assert(typ->enum_prev.oprev);
if (typ->status & _GENERIC)
return typ->enum_prev.gprev(form, field, (void *)argp);
else
return typ->enum_prev.oprev(field, (void *)argp);
#else
assert(typ->prev);
return typ->prev(field, (void *)argp);
#endif
}
}
/*----------------------------------------------------------------------------
@ -2997,9 +3057,9 @@ CR_Next_Choice(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("CR_Next_Choice(%p)"), form));
T((T_CALLED("CR_Next_Choice(%p)"), (void *)form));
Synchronize_Buffer(form);
returnCode((Next_Choice(field->type, field, (TypeArgument *)(field->arg)))
returnCode((Next_Choice(form, field->type, field, (TypeArgument *)(field->arg)))
? E_OK
: E_REQUEST_DENIED);
}
@ -3018,9 +3078,9 @@ CR_Previous_Choice(FORM *form)
{
FIELD *field = form->current;
T((T_CALLED("CR_Previous_Choice(%p)"), form));
T((T_CALLED("CR_Previous_Choice(%p)"), (void *)form));
Synchronize_Buffer(form);
returnCode((Previous_Choice(field->type, field, (TypeArgument *)(field->arg)))
returnCode((Previous_Choice(form, field->type, field, (TypeArgument *)(field->arg)))
? E_OK
: E_REQUEST_DENIED);
}
@ -3034,7 +3094,7 @@ CR_Previous_Choice(FORM *form)
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static bool Check_Field(
| Function : static bool Check_Field(FORM* form,
| FIELDTYPE * typ,
| FIELD * field,
| TypeArgument * argp)
@ -3047,7 +3107,7 @@ CR_Previous_Choice(FORM *form)
| FALSE - field is invalid.
+--------------------------------------------------------------------------*/
static bool
Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
if (typ)
{
@ -3068,13 +3128,23 @@ Check_Field(FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
{
assert(argp);
return (
Check_Field(typ->left, field, argp->left) ||
Check_Field(typ->right, field, argp->right));
Check_Field(form, typ->left, field, argp->left) ||
Check_Field(form, typ->right, field, argp->right));
}
else
{
#if NCURSES_INTEROP_FUNCS
if (typ->fieldcheck.ofcheck)
{
if (typ->status & _GENERIC)
return typ->fieldcheck.gfcheck(form, field, (void *)argp);
else
return typ->fieldcheck.ofcheck(field, (void *)argp);
}
#else
if (typ->fcheck)
return typ->fcheck(field, (void *)argp);
#endif
}
}
return TRUE;
@ -3100,7 +3170,7 @@ _nc_Internal_Validation(FORM *form)
if ((form->status & _FCHECK_REQUIRED) ||
(!(field->opts & O_PASSOK)))
{
if (!Check_Field(field->type, field, (TypeArgument *)(field->arg)))
if (!Check_Field(form, field->type, field, (TypeArgument *)(field->arg)))
return FALSE;
form->status &= ~_FCHECK_REQUIRED;
field->status |= _CHANGED;
@ -3128,7 +3198,7 @@ _nc_Internal_Validation(FORM *form)
static int
FV_Validation(FORM *form)
{
T((T_CALLED("FV_Validation(%p)"), form));
T((T_CALLED("FV_Validation(%p)"), (void *)form));
if (_nc_Internal_Validation(form))
returnCode(E_OK);
else
@ -3506,7 +3576,7 @@ Inter_Field_Navigation(int (*const fct) (FORM *), FORM *form)
static int
FN_Next_Field(FORM *form)
{
T((T_CALLED("FN_Next_Field(%p)"), form));
T((T_CALLED("FN_Next_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Next_Field_On_Page(form->current)));
}
@ -3524,7 +3594,7 @@ FN_Next_Field(FORM *form)
static int
FN_Previous_Field(FORM *form)
{
T((T_CALLED("FN_Previous_Field(%p)"), form));
T((T_CALLED("FN_Previous_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Previous_Field_On_Page(form->current)));
}
@ -3541,7 +3611,7 @@ FN_Previous_Field(FORM *form)
static int
FN_First_Field(FORM *form)
{
T((T_CALLED("FN_First_Field(%p)"), form));
T((T_CALLED("FN_First_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Next_Field_On_Page(form->field[form->page[form->curpage].pmax])));
}
@ -3558,7 +3628,7 @@ FN_First_Field(FORM *form)
static int
FN_Last_Field(FORM *form)
{
T((T_CALLED("FN_Last_Field(%p)"), form));
T((T_CALLED("FN_Last_Field(%p)"), (void *)form));
returnCode(
_nc_Set_Current_Field(form,
Previous_Field_On_Page(form->field[form->page[form->curpage].pmin])));
@ -3577,7 +3647,7 @@ FN_Last_Field(FORM *form)
static int
FN_Sorted_Next_Field(FORM *form)
{
T((T_CALLED("FN_Sorted_Next_Field(%p)"), form));
T((T_CALLED("FN_Sorted_Next_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Next_Field(form->current)));
}
@ -3595,7 +3665,7 @@ FN_Sorted_Next_Field(FORM *form)
static int
FN_Sorted_Previous_Field(FORM *form)
{
T((T_CALLED("FN_Sorted_Previous_Field(%p)"), form));
T((T_CALLED("FN_Sorted_Previous_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Previous_Field(form->current)));
}
@ -3613,7 +3683,7 @@ FN_Sorted_Previous_Field(FORM *form)
static int
FN_Sorted_First_Field(FORM *form)
{
T((T_CALLED("FN_Sorted_First_Field(%p)"), form));
T((T_CALLED("FN_Sorted_First_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Next_Field(form->field[form->page[form->curpage].smax])));
}
@ -3631,7 +3701,7 @@ FN_Sorted_First_Field(FORM *form)
static int
FN_Sorted_Last_Field(FORM *form)
{
T((T_CALLED("FN_Sorted_Last_Field(%p)"), form));
T((T_CALLED("FN_Sorted_Last_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Sorted_Previous_Field(form->field[form->page[form->curpage].smin])));
}
@ -3649,7 +3719,7 @@ FN_Sorted_Last_Field(FORM *form)
static int
FN_Left_Field(FORM *form)
{
T((T_CALLED("FN_Left_Field(%p)"), form));
T((T_CALLED("FN_Left_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Left_Neighbor_Field(form->current)));
}
@ -3667,7 +3737,7 @@ FN_Left_Field(FORM *form)
static int
FN_Right_Field(FORM *form)
{
T((T_CALLED("FN_Right_Field(%p)"), form));
T((T_CALLED("FN_Right_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Right_Neighbor_Field(form->current)));
}
@ -3687,7 +3757,7 @@ FN_Right_Field(FORM *form)
static int
FN_Up_Field(FORM *form)
{
T((T_CALLED("FN_Up_Field(%p)"), form));
T((T_CALLED("FN_Up_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Upper_Neighbor_Field(form->current)));
}
@ -3707,7 +3777,7 @@ FN_Up_Field(FORM *form)
static int
FN_Down_Field(FORM *form)
{
T((T_CALLED("FN_Down_Field(%p)"), form));
T((T_CALLED("FN_Down_Field(%p)"), (void *)form));
returnCode(_nc_Set_Current_Field(form,
Down_Neighbor_Field(form->current)));
}
@ -3851,7 +3921,7 @@ Page_Navigation(int (*const fct) (FORM *), FORM *form)
static int
PN_Next_Page(FORM *form)
{
T((T_CALLED("PN_Next_Page(%p)"), form));
T((T_CALLED("PN_Next_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, Next_Page_Number(form), (FIELD *)0));
}
@ -3867,7 +3937,7 @@ PN_Next_Page(FORM *form)
static int
PN_Previous_Page(FORM *form)
{
T((T_CALLED("PN_Previous_Page(%p)"), form));
T((T_CALLED("PN_Previous_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, Previous_Page_Number(form), (FIELD *)0));
}
@ -3883,7 +3953,7 @@ PN_Previous_Page(FORM *form)
static int
PN_First_Page(FORM *form)
{
T((T_CALLED("PN_First_Page(%p)"), form));
T((T_CALLED("PN_First_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, 0, (FIELD *)0));
}
@ -3899,7 +3969,7 @@ PN_First_Page(FORM *form)
static int
PN_Last_Page(FORM *form)
{
T((T_CALLED("PN_Last_Page(%p)"), form));
T((T_CALLED("PN_Last_Page(%p)"), (void *)form));
returnCode(_nc_Set_Form_Page(form, form->maxpage - 1, (FIELD *)0));
}
@ -3928,7 +3998,7 @@ Data_Entry(FORM *form, int c)
FIELD *field = form->current;
int result = E_REQUEST_DENIED;
T((T_CALLED("Data_Entry(%p,%s)"), form, _tracechtype((chtype)c)));
T((T_CALLED("Data_Entry(%p,%s)"), (void *)form, _tracechtype((chtype)c)));
if ((field->opts & O_EDIT)
#if FIX_FORM_INACTIVE_BUG
&& (field->opts & O_ACTIVE)
@ -4129,7 +4199,7 @@ form_driver(FORM *form, int c)
const Binding_Info *BI = (Binding_Info *) 0;
int res = E_UNKNOWN_COMMAND;
T((T_CALLED("form_driver(%p,%d)"), form, c));
T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -4194,7 +4264,7 @@ form_driver(FORM *form, int c)
else if (KEY_MOUSE == c)
{
MEVENT event;
WINDOW *win = form->win ? form->win : stdscr;
WINDOW *win = form->win ? form->win : StdScreen(Get_Form_Screen(form));
WINDOW *sub = form->sub ? form->sub : win;
getmouse(&event);
@ -4281,7 +4351,7 @@ form_driver(FORM *form, int c)
if (!iscntrl(UChar(c)))
#else
if (isprint(UChar(c)) &&
Check_Char(form->current->type, c,
Check_Char(form, form->current, form->current->type, c,
(TypeArgument *)(form->current->arg)))
#endif
res = Data_Entry(form, c);
@ -4326,7 +4396,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
FIELD_CELL *widevalue = 0;
#endif
T((T_CALLED("set_field_buffer(%p,%d,%s)"), field, buffer, _nc_visbuf(value)));
T((T_CALLED("set_field_buffer(%p,%d,%s)"), (void *)field, buffer, _nc_visbuf(value)));
if (!field || !value || ((buffer < 0) || (buffer > field->nbuf)))
RETURN(E_BAD_ARGUMENT);
@ -4347,7 +4417,9 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
* field->cols))))
RETURN(E_SYSTEM_ERROR);
#if !USE_WIDEC_SUPPORT
len = vlen;
#endif
}
}
@ -4360,14 +4432,15 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
* and other special cases that we really do not want to handle here.
*/
#if NCURSES_EXT_FUNCS
if (wresize(field->working, field->drows, field->dcols) == ERR)
if (wresize(field->working, 1, Buffer_Length(field) + 1) == ERR)
#endif
{
delwin(field->working);
field->working = newpad(field->drows, field->dcols);
field->working = newpad(1, Buffer_Length(field) + 1);
}
len = Buffer_Length(field);
wclear(field->working);
mvwaddstr(field->working, 0, 0, value);
(void)mvwaddstr(field->working, 0, 0, value);
if ((widevalue = typeCalloc(FIELD_CELL, len + 1)) == 0)
{
@ -4377,7 +4450,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
{
for (i = 0; i < (unsigned)field->drows; ++i)
{
mvwin_wchnstr(field->working, i, 0,
(void)mvwin_wchnstr(field->working, 0, i * field->dcols,
widevalue + (i * field->dcols),
field->dcols);
}
@ -4433,7 +4506,7 @@ field_buffer(const FIELD *field, int buffer)
{
char *result = 0;
T((T_CALLED("field_buffer(%p,%d)"), field, buffer));
T((T_CALLED("field_buffer(%p,%d)"), (const void *)field, buffer));
if (field && (buffer >= 0) && (buffer <= field->nbuf))
{
@ -4446,7 +4519,7 @@ field_buffer(const FIELD *field, int buffer)
/* determine the number of bytes needed to store the expanded string */
for (n = 0; n < size; ++n)
{
if (!isWidecExt(data[n]))
if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0')
{
mbstate_t state;
size_t next;
@ -4463,12 +4536,25 @@ field_buffer(const FIELD *field, int buffer)
free(field->expanded[buffer]);
field->expanded[buffer] = typeMalloc(char, need + 1);
/* expand the multibyte data */
/*
* Expand the multibyte data.
*
* It may also be multi-column data. In that case, the data for a row
* may be null-padded to align to the dcols/drows layout (or it may
* contain embedded wide-character extensions). Change the null-padding
* to blanks as needed.
*/
if ((result = field->expanded[buffer]) != 0)
{
wclear(field->working);
mvwadd_wchnstr(field->working, 0, 0, data, size);
mvwinnstr(field->working, 0, 0, result, (int)need);
wmove(field->working, 0, 0);
for (n = 0; n < size; ++n)
{
if (!isWidecExt(data[n]) && data[n].chars[0] != L'\0')
wadd_wch(field->working, &data[n]);
}
wmove(field->working, 0, 0);
winnstr(field->working, result, (int)need);
}
#else
result = Address_Of_Nth_Buffer(field, buffer);
@ -4479,22 +4565,6 @@ field_buffer(const FIELD *field, int buffer)
#if USE_WIDEC_SUPPORT
/* FIXME: see lib_get_wch.c */
#if HAVE_MBTOWC && HAVE_MBLEN
#define reset_mbytes(state) mblen(NULL, 0), mbtowc(NULL, NULL, 0)
#define count_mbytes(buffer,length,state) mblen(buffer,length)
#define trans_mbytes(wch,buffer,length,state) \
(int) mbtowc(&wch, buffer, length)
#elif HAVE_MBRTOWC && HAVE_MBRLEN
#define NEED_STATE
#define reset_mbytes(state) init_mb(state)
#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
#define trans_mbytes(wch,buffer,length,state) \
(int) mbrtowc(&wch, buffer, length, &state)
#else
make an error
#endif
/*---------------------------------------------------------------------------
| Convert a multibyte string to a wide-character string. The result must be
| freed by the caller.
@ -4509,7 +4579,7 @@ _nc_Widen_String(char *source, int *lengthp)
int pass;
int status;
#ifdef NEED_STATE
#ifndef state_unused
mbstate_t state;
#endif
@ -4528,8 +4598,8 @@ _nc_Widen_String(char *source, int *lengthp)
source[passed + tries] = 0;
reset_mbytes(state);
status = trans_mbytes(wch, source + passed, tries, state);
source[passed + tries] = save;
status = check_mbytes(wch, source + passed, tries, state);
source[passed + tries] = (char)save;
if (status > 0)
{

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_hook.c,v 1.14 2004/12/25 22:37:27 tom Exp $")
MODULE_ID("$Id: frm_hook.c,v 1.15 2010/01/23 21:12:08 tom Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
{\
T((T_CALLED(#typ "_" #name "(%p)"), form));\
T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\
returnFormHook( Normalize_Form( form ) -> typ ## name );\
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2005,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_opts.c,v 1.14 2005/04/16 16:59:18 tom Exp $")
MODULE_ID("$Id: frm_opts.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_opts.c,v 1.14 2005/04/16 16:59:18 tom Exp $")
NCURSES_EXPORT(int)
set_form_opts(FORM *form, Form_Options opts)
{
T((T_CALLED("set_form_opts(%p,%d)"), form, opts));
T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
@ -70,7 +70,7 @@ set_form_opts(FORM *form, Form_Options opts)
NCURSES_EXPORT(Form_Options)
form_opts(const FORM *form)
{
T((T_CALLED("form_opts(%p)"), form));
T((T_CALLED("form_opts(%p)"), (const void *)form));
returnCode((int)(Normalize_Form(form)->opts & ALL_FORM_OPTS));
}
@ -87,7 +87,7 @@ form_opts(const FORM *form)
NCURSES_EXPORT(int)
form_opts_on(FORM *form, Form_Options opts)
{
T((T_CALLED("form_opts_on(%p,%d)"), form, opts));
T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)
@ -112,7 +112,7 @@ form_opts_on(FORM *form, Form_Options opts)
NCURSES_EXPORT(int)
form_opts_off(FORM *form, Form_Options opts)
{
T((T_CALLED("form_opts_off(%p,%d)"), form, opts));
T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts));
opts &= ALL_FORM_OPTS;
if (opts & ~ALL_FORM_OPTS)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_page.c,v 1.10 2004/12/11 22:08:21 tom Exp $")
MODULE_ID("$Id: frm_page.c,v 1.11 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -51,7 +51,7 @@ set_form_page(FORM *form, int page)
{
int err = E_OK;
T((T_CALLED("set_form_page(%p,%d)"), form, page));
T((T_CALLED("set_form_page(%p,%d)"), (void *)form, page));
if (!form || (page < 0) || (page >= form->maxpage))
RETURN(E_BAD_ARGUMENT);
@ -98,7 +98,7 @@ set_form_page(FORM *form, int page)
NCURSES_EXPORT(int)
form_page(const FORM *form)
{
T((T_CALLED("form_page(%p)"), form));
T((T_CALLED("form_page(%p)"), (const void *)form));
returnCode(Normalize_Form(form)->curpage);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_post.c,v 1.9 2004/12/11 22:19:06 tom Exp $")
MODULE_ID("$Id: frm_post.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -54,7 +54,7 @@ post_form(FORM *form)
int err;
int page;
T((T_CALLED("post_form(%p)"), form));
T((T_CALLED("post_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);
@ -100,7 +100,7 @@ post_form(FORM *form)
NCURSES_EXPORT(int)
unpost_form(FORM *form)
{
T((T_CALLED("unpost_form(%p)"), form));
T((T_CALLED("unpost_form(%p)"), (void *)form));
if (!form)
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,2009 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 *
@ -37,7 +37,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_req_name.c,v 1.16 2008/07/05 23:22:08 tom Exp $")
MODULE_ID("$Id: frm_req_name.c,v 1.17 2009/10/10 16:17:01 tom Exp $")
static const char *request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
{
@ -154,14 +154,14 @@ form_request_by_name(const char *str)
strncpy(buf, str, sizeof(buf));
while ((i < sizeof(buf)) && (buf[i] != '\0'))
{
buf[i] = toupper(UChar(buf[i]));
buf[i] = (char)toupper(UChar(buf[i]));
i++;
}
for (i = 0; i < A_SIZE; i++)
{
if (strncmp(request_names[i], buf, sizeof(buf)) == 0)
returnCode(MIN_FORM_COMMAND + (int) i);
returnCode(MIN_FORM_COMMAND + (int)i);
}
}
RETURN(E_NO_MATCH);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_scale.c,v 1.9 2004/12/11 22:12:34 tom Exp $")
MODULE_ID("$Id: frm_scale.c,v 1.10 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,10 @@ MODULE_ID("$Id: frm_scale.c,v 1.9 2004/12/11 22:12:34 tom Exp $")
NCURSES_EXPORT(int)
scale_form(const FORM *form, int *rows, int *cols)
{
T((T_CALLED("scale_form(%p,%p,%p)"), form, rows, cols));
T((T_CALLED("scale_form(%p,%p,%p)"),
(const void *)form,
(void *)rows,
(void *)cols));
if (!form)
RETURN(E_BAD_ARGUMENT);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 @@
****************************************************************************/
/****************************************************************************
* Author: Juergen Pfeifer, 1995,1997 *
* Author: Juergen Pfeifer, 1995-1997,2009 *
****************************************************************************/
#include "form.priv.h"
MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
MODULE_ID("$Id: frm_sub.c,v 1.12 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,13 +46,22 @@ MODULE_ID("$Id: frm_sub.c,v 1.9 2004/12/11 22:13:39 tom Exp $")
NCURSES_EXPORT(int)
set_form_sub(FORM *form, WINDOW *win)
{
T((T_CALLED("set_form_sub(%p,%p)"), form, win));
T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win));
if (form && (form->status & _POSTED))
RETURN(E_POSTED);
else
{
#if NCURSES_SP_FUNCS
FORM *f = Normalize_Form(form);
f->sub = win ? win : StdScreen(Get_Form_Screen(f));
RETURN(E_OK);
#else
Normalize_Form(form)->sub = win;
RETURN(E_OK);
#endif
}
}
/*---------------------------------------------------------------------------
@ -68,7 +77,7 @@ form_sub(const FORM *form)
{
const FORM *f;
T((T_CALLED("form_sub(%p)"), form));
T((T_CALLED("form_sub(%p)"), (const void *)form));
f = Normalize_Form(form);
returnWin(Get_Form_Window(f));

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2004,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_user.c,v 1.14 2004/12/25 22:37:56 tom Exp $")
MODULE_ID("$Id: frm_user.c,v 1.15 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,7 +46,7 @@ MODULE_ID("$Id: frm_user.c,v 1.14 2004/12/25 22:37:56 tom Exp $")
NCURSES_EXPORT(int)
set_form_userptr(FORM *form, void *usrptr)
{
T((T_CALLED("set_form_userptr(%p,%p)"), form, usrptr));
T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr));
Normalize_Form(form)->usrptr = usrptr;
RETURN(E_OK);
@ -65,7 +65,7 @@ set_form_userptr(FORM *form, void *usrptr)
NCURSES_EXPORT(void *)
form_userptr(const FORM *form)
{
T((T_CALLED("form_userptr(%p)"), form));
T((T_CALLED("form_userptr(%p)"), (const void *)form));
returnVoidPtr(Normalize_Form(form)->usrptr);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2003,2004 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 *
@ -32,7 +32,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
MODULE_ID("$Id: frm_win.c,v 1.16 2010/01/23 21:14:36 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,13 +46,22 @@ MODULE_ID("$Id: frm_win.c,v 1.13 2004/12/11 22:15:27 tom Exp $")
NCURSES_EXPORT(int)
set_form_win(FORM *form, WINDOW *win)
{
T((T_CALLED("set_form_win(%p,%p)"), form, win));
T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win));
if (form && (form->status & _POSTED))
RETURN(E_POSTED);
else
{
#if NCURSES_SP_FUNCS
FORM *f = Normalize_Form(form);
f->win = win ? win : StdScreen(Get_Form_Screen(f));
RETURN(E_OK);
#else
Normalize_Form(form)->win = win;
RETURN(E_OK);
#endif
}
}
/*---------------------------------------------------------------------------
@ -66,12 +75,18 @@ set_form_win(FORM *form, WINDOW *win)
NCURSES_EXPORT(WINDOW *)
form_win(const FORM *form)
{
WINDOW *result;
const FORM *f;
T((T_CALLED("form_win(%p)"), form));
T((T_CALLED("form_win(%p)"), (const void *)form));
f = Normalize_Form(form);
returnWin(f->win ? f->win : stdscr);
#if NCURSES_SP_FUNCS
result = (f->win ? f->win : StdScreen(Get_Form_Screen(f)));
#else
result = (f->win ? f->win : stdscr);
#endif
returnWin(result);
}
/* frm_win.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_alnum.c,v 1.21 2007/10/13 19:31:52 tom Exp $")
MODULE_ID("$Id: fty_alnum.c,v 1.24 2010/01/23 21:14:36 tom Exp $")
#define thisARG alnumARG
@ -44,6 +44,32 @@ typedef struct
}
thisARG;
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_This_Type(void *arg)
|
| Description : Allocate structure for alphanumeric type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
if (arg)
{
argp = typeMalloc(thisARG, 1);
if (argp)
{
T((T_CREATE("thisARG %p"), (void *)argp));
argp->width = *((int *)arg);
}
}
return ((void *)argp);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_This_Type(va_list *ap)
@ -55,15 +81,9 @@ thisARG;
static void *
Make_This_Type(va_list *ap)
{
thisARG *argp = typeMalloc(thisARG, 1);
int w = va_arg(*ap, int);
if (argp)
{
T((T_CREATE("thisARG %p"), argp));
argp->width = va_arg(*ap, int);
}
return ((void *)argp);
return Generic_This_Type((void *)&w);
}
/*---------------------------------------------------------------------------
@ -82,7 +102,7 @@ Copy_This_Type(const void *argp)
if (result)
{
T((T_CREATE("thisARG %p"), result));
T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
@ -156,12 +176,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
Check_This_Field,
Check_This_Character,
NULL,
NULL
INIT_FT_FUNC(Check_This_Field),
INIT_FT_FUNC(Check_This_Character),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
Generic_This_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_ALNUM(void)
{
return TYPE_ALNUM;
}
#endif
/* fty_alnum.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_alpha.c,v 1.23 2007/10/13 19:32:09 tom Exp $")
MODULE_ID("$Id: fty_alpha.c,v 1.26 2010/01/23 21:14:36 tom Exp $")
#define thisARG alphaARG
@ -44,6 +44,32 @@ typedef struct
}
thisARG;
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_This_Type(va_list *ap)
|
| Description : Allocate structure for alpha type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
if (arg)
{
argp = typeMalloc(thisARG, 1);
if (argp)
{
T((T_CREATE("thisARG %p"), (void *)argp));
argp->width = *((int *)arg);
}
}
return ((void *)argp);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_This_Type(va_list *ap)
@ -55,15 +81,9 @@ thisARG;
static void *
Make_This_Type(va_list *ap)
{
thisARG *argp = typeMalloc(thisARG, 1);
int w = va_arg(*ap, int);
if (argp)
{
T((T_CREATE("thisARG %p"), argp));
argp->width = va_arg(*ap, int);
}
return ((void *)argp);
return Generic_This_Type((void *)&w);
}
/*---------------------------------------------------------------------------
@ -82,7 +102,7 @@ Copy_This_Type(const void *argp)
if (result)
{
T((T_CREATE("thisARG %p"), result));
T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
@ -156,12 +176,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
Check_This_Field,
Check_This_Character,
NULL,
NULL
INIT_FT_FUNC(Check_This_Field),
INIT_FT_FUNC(Check_This_Character),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
Generic_This_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_ALPHA(void)
{
return TYPE_ALPHA;
}
#endif
/* fty_alpha.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_enum.c,v 1.22 2007/10/13 19:32:26 tom Exp $")
MODULE_ID("$Id: fty_enum.c,v 1.26 2010/05/01 21:11:07 tom Exp $")
typedef struct
{
@ -45,6 +45,77 @@ typedef struct
}
enumARG;
typedef struct
{
char **kwds;
int ccase;
int cunique;
}
enumParams;
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_Enum_Type(void * arg)
|
| Description : Allocate structure for enumeration type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Generic_Enum_Type(void *arg)
{
enumARG *argp = (enumARG *)0;
enumParams *params = (enumParams *) arg;
if (params)
{
argp = typeMalloc(enumARG, 1);
if (argp)
{
int cnt = 0;
char **kp = (char **)0;
char **kwds = (char **)0;
char **kptarget;
int ccase, cunique;
T((T_CREATE("enumARG %p"), (void *)argp));
kwds = params->kwds;
ccase = params->ccase;
cunique = params->cunique;
argp->checkcase = ccase ? TRUE : FALSE;
argp->checkunique = cunique ? TRUE : FALSE;
argp->kwds = (char **)0;
kp = kwds;
while (kp && (*kp++))
cnt++;
argp->count = cnt;
if (cnt > 0)
{
/* We copy the keywords, because we can't rely on the fact
that the caller doesn't relocate or free the memory used
for the keywords (maybe he has GC)
*/
argp->kwds = typeMalloc(char *, cnt + 1);
kp = kwds;
if ((kptarget = argp->kwds) != 0)
{
while (kp && (*kp))
{
(*kptarget++) = strdup(*kp++);
}
*kptarget = (char *)0;
}
}
}
}
return (void *)argp;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_Enum_Type( va_list * ap )
@ -56,28 +127,13 @@ enumARG;
static void *
Make_Enum_Type(va_list *ap)
{
enumARG *argp = typeMalloc(enumARG, 1);
enumParams params;
if (argp)
{
int cnt = 0;
char **kp = (char **)0;
int ccase, cunique;
params.kwds = va_arg(*ap, char **);
params.ccase = va_arg(*ap, int);
params.cunique = va_arg(*ap, int);
T((T_CREATE("enumARG %p"), argp));
argp->kwds = va_arg(*ap, char **);
ccase = va_arg(*ap, int);
cunique = va_arg(*ap, int);
argp->checkcase = ccase ? TRUE : FALSE;
argp->checkunique = cunique ? TRUE : FALSE;
kp = argp->kwds;
while (kp && (*kp++))
cnt++;
argp->count = cnt;
}
return (void *)argp;
return Generic_Enum_Type((void *)&params);
}
/*---------------------------------------------------------------------------
@ -101,8 +157,24 @@ Copy_Enum_Type(const void *argp)
if (result)
{
T((T_CREATE("enumARG %p"), result));
T((T_CREATE("enumARG %p"), (void *)result));
*result = *ap;
if (ap->count > 0)
{
char **kptarget;
char **kp = ap->kwds;
result->kwds = typeMalloc(char *, 1 + ap->count);
if ((kptarget = result->kwds) != 0)
{
while (kp && (*kp))
{
(*kptarget++) = strdup(*kp++);
}
*kptarget = (char *)0;
}
}
}
}
return (void *)result;
@ -120,7 +192,24 @@ static void
Free_Enum_Type(void *argp)
{
if (argp)
{
const enumARG *ap = (const enumARG *)argp;
if (ap->kwds && ap->count > 0)
{
char **kp = ap->kwds;
int cnt = 0;
while (kp && (*kp))
{
free(*kp++);
cnt++;
}
assert(cnt == ap->count);
free(ap->kwds);
}
free(argp);
}
}
#define SKIP_SPACE(x) while(((*(x))!='\0') && (is_blank(*(x)))) (x)++
@ -326,13 +415,28 @@ static FIELDTYPE typeENUM =
Make_Enum_Type,
Copy_Enum_Type,
Free_Enum_Type,
Check_Enum_Field,
NULL,
Next_Enum,
Previous_Enum
INIT_FT_FUNC(Check_Enum_Field),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(Next_Enum),
INIT_FT_FUNC(Previous_Enum),
#if NCURSES_INTEROP_FUNCS
Generic_Enum_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE *)
TYPE_ENUM = &typeENUM;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_ENUM(void)
{
return TYPE_ENUM;
}
#endif
/* fty_enum.c ends here */

View File

@ -0,0 +1,297 @@
/****************************************************************************
* Copyright (c) 2008-2009,2010 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 *
* *
***************************************************************************/
#include "form.priv.h"
MODULE_ID("$Id: fty_generic.c,v 1.5 2010/01/23 21:14:36 tom Exp $")
/*
* This is not a full implementation of a field type, but adds some
* support for higher level languages with some restrictions to interop
* with C language. Especially the collection of arguments for the
* various fieldtypes is not based on the vararg C mechanism, but on a
* iterator based callback mechanism that allowes the high level language
* to provide the arguments as a structure. Most languages have mechanisms
* to layout structures so that they can be passed to C.
* The languages can register a new generic fieldtype dynamically and store
* a handle (key) to the calling object as an argument. Together with that
* it can register a freearg callback, so that the high level language
* remains in control of the memory management of the arguments they pass.
* The design idea is, that the high-level language - typically a OO
* language like C# or Java, uses it's own dispatching mechanisms
* (polymorphism) to call the proper check routines responsible for the
* argument type. So these language implement typically only one generic
* fieldtype they register with the forms library using this call.
*
* For that purpose we have extended the fieldtype struc by a new element
* that gets the arguments from a single struct passed by the caller.
*
*/
#if NCURSES_INTEROP_FUNCS
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_This_Type( void * arg )
|
| Description : We interpret the passed arg just as a handle the
| calling language uses to keep track of its allocated
| argument structures. We can simply copy it back.
|
| Return Values : Pointer to argument structure
+--------------------------------------------------------------------------*/
static void *
Generic_This_Type(void *arg)
{
return (arg);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FIELDTYPE *_nc_generic_fieldtype(
| bool (* const field_check)(FIELD *,const void *),
| bool (* const char_check) (int, const void *),
| bool (*const next)(FORM*,FIELD*,const void*),
| bool (*const prev)(FORM*,FIELD*,const void*),
| void (*freecallback)(void*))
|
| Description : Create a new fieldtype. The application programmer must
| write a field_check and a char_check function and give
| them as input to this call. A callback to allow the
| release of the allocated memory must also be provided.
| For generic field types, we provide some more
| information about the field as parameters.
|
| If an error occurs, errno is set to
| E_BAD_ARGUMENT - invalid arguments
| E_SYSTEM_ERROR - system error (no memory)
|
| Return Values : Fieldtype pointer or NULL if error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
bool (*const char_check) (int, FORM *, FIELD *, const
void *),
bool (*const next) (FORM *, FIELD *, const void *),
bool (*const prev) (FORM *, FIELD *, const void *),
void (*freecallback) (void *))
{
int code = E_SYSTEM_ERROR;
FIELDTYPE *res = (FIELDTYPE *)0;
T((T_CALLED("_nc_generic_fieldtype(%p,%p,%p,%p,%p)"),
field_check, char_check, next, prev, freecallback));
if (field_check || char_check)
{
res = typeMalloc(FIELDTYPE, 1);
if (res)
{
*res = *_nc_Default_FieldType;
res->status |= (_HAS_ARGS | _GENERIC);
res->fieldcheck.gfcheck = field_check;
res->charcheck.gccheck = char_check;
res->genericarg = Generic_This_Type;
res->freearg = freecallback;
res->enum_next.gnext = next;
res->enum_prev.gprev = prev;
code = E_OK;
}
}
else
code = E_BAD_ARGUMENT;
if (E_OK != code)
SET_ERROR(code);
returnFieldType(res);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static TypeArgument *GenericArgument(
| const FIELDTYPE* typ,
| int (*argiterator)(void**),
| int* err)
|
| Description : The iterator callback must browse through all fieldtype
| parameters that have an argument associated with the
| type. The iterator returns 1 if the operation to get
| the next element was successfull, 0 otherwise. If the
| iterator could move to the next argument, it fills
| the void* pointer representing the argument into the
| location provided as argument to the iterator.
| The err reference is used to keep track of errors.
|
| Return Values : Pointer to argument structure
+--------------------------------------------------------------------------*/
static TypeArgument *
GenericArgument(const FIELDTYPE *typ,
int (*argiterator) (void **), int *err)
{
TypeArgument *res = (TypeArgument *)0;
if (typ != 0 && (typ->status & _HAS_ARGS) != 0 && err != 0 && argiterator != 0)
{
if (typ->status & _LINKED_TYPE)
{
/* Composite fieldtypes keep track internally of their own memory */
TypeArgument *p = typeMalloc(TypeArgument, 1);
if (p)
{
p->left = GenericArgument(typ->left, argiterator, err);
p->right = GenericArgument(typ->right, argiterator, err);
return p;
}
else
*err += 1;
}
else
{
assert(typ->genericarg != (void *)0);
if (typ->genericarg == 0)
*err += 1;
else
{
void *argp;
int valid = argiterator(&argp);
if (valid == 0 || argp == 0 ||
!(res = (TypeArgument *)typ->genericarg(argp)))
{
*err += 1;
}
}
}
}
return res;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int _nc_set_generic_fieldtype(
| FIELD* field,
| FIELDTYPE* ftyp,
| int (*argiterator)(void**))
|
| Description : Assign the fieldtype to the field and use the iterator
| mechanism to get the arguments when a check is
| performed.
|
| Return Values : E_OK if all went well
| E_SYSTEM_ERROR if an error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
_nc_set_generic_fieldtype(FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator) (void **))
{
int code = E_SYSTEM_ERROR;
int err = 0;
if (field)
{
if (field && field->type)
_nc_Free_Type(field);
field->type = ftyp;
if (ftyp)
{
if (argiterator)
{
/* The precondition is that the iterator is reset */
field->arg = (void *)GenericArgument(field->type, argiterator, &err);
if (err)
{
_nc_Free_Argument(field->type, (TypeArgument *)(field->arg));
field->type = (FIELDTYPE *)0;
field->arg = (void *)0;
}
else
{
code = E_OK;
if (field->type)
field->type->ref++;
}
}
}
else
{
field->arg = (void *)0;
code = E_OK;
}
}
return code;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : WINDOW* _nc_form_cursor(
| FORM* form,
| int *pRow, int *pCol)
|
| Description : Get the current position of the form cursor position
| We also return the field window
|
| Return Values : The fields Window or NULL on error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(WINDOW *)
_nc_form_cursor(const FORM *form, int *pRow, int *pCol)
{
int code = E_SYSTEM_ERROR;
WINDOW *res = (WINDOW *)0;
if (!(form == 0 || pRow == 0 || pCol == 0))
{
*pRow = form->currow;
*pCol = form->curcol;
res = form->w;
code = E_OK;
}
if (code != E_OK)
SET_ERROR(code);
return res;
}
#else
extern void _nc_fty_generic(void);
void
_nc_fty_generic(void)
{
}
#endif
/* fty_generic.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_int.c,v 1.22 2007/10/13 19:32:40 tom Exp $")
MODULE_ID("$Id: fty_int.c,v 1.25 2010/01/23 21:14:36 tom Exp $")
#if USE_WIDEC_SUPPORT
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
@ -52,6 +52,41 @@ typedef struct
}
thisARG;
typedef struct
{
int precision;
long low;
long high;
}
integerPARM;
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_This_Type( void * arg )
|
| Description : Allocate structure for integer type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
thisARG *param = (thisARG *) arg;
if (param)
{
argp = typeMalloc(thisARG, 1);
if (argp)
{
T((T_CREATE("thisARG %p"), (void *)argp));
*argp = *param;
}
}
return (void *)argp;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_This_Type( va_list * ap )
@ -63,16 +98,13 @@ thisARG;
static void *
Make_This_Type(va_list *ap)
{
thisARG *argp = typeMalloc(thisARG, 1);
thisARG arg;
if (argp)
{
T((T_CREATE("thisARG %p"), argp));
argp->precision = va_arg(*ap, int);
argp->low = va_arg(*ap, long);
argp->high = va_arg(*ap, long);
}
return (void *)argp;
arg.precision = va_arg(*ap, int);
arg.low = va_arg(*ap, long);
arg.high = va_arg(*ap, long);
return Generic_This_Type((void *)&arg);
}
/*---------------------------------------------------------------------------
@ -94,7 +126,7 @@ Copy_This_Type(const void *argp)
result = typeMalloc(thisARG, 1);
if (result)
{
T((T_CREATE("thisARG %p"), result));
T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
}
@ -235,12 +267,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
Check_This_Field,
Check_This_Character,
NULL,
NULL
INIT_FT_FUNC(Check_This_Field),
INIT_FT_FUNC(Check_This_Character),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
Generic_This_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_INTEGER(void)
{
return TYPE_INTEGER;
}
#endif
/* fty_int.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. *
* Copyright (c) 1998-2006,2009 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 "form.priv.h"
MODULE_ID("$Id: fty_ipv4.c,v 1.8 2006/12/02 19:33:02 tom Exp $")
MODULE_ID("$Id: fty_ipv4.c,v 1.10 2009/11/07 20:17:58 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -94,12 +94,27 @@ static FIELDTYPE typeIPV4 =
NULL,
NULL,
NULL,
Check_IPV4_Field,
Check_IPV4_Character,
NULL,
INIT_FT_FUNC(Check_IPV4_Field),
INIT_FT_FUNC(Check_IPV4_Character),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
NULL
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_IPV4(void)
{
return TYPE_IPV4;
}
#endif
/* fty_ipv4.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_num.c,v 1.25 2007/10/13 19:32:54 tom Exp $")
MODULE_ID("$Id: fty_num.c,v 1.28 2010/01/23 21:14:36 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
@ -63,6 +63,49 @@ typedef struct
}
thisARG;
typedef struct
{
int precision;
double low;
double high;
}
thisPARM;
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Generic_This_Type(void * arg)
|
| Description : Allocate structure for numeric type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Generic_This_Type(void *arg)
{
thisARG *argn = (thisARG *) 0;
thisPARM *args = (thisPARM *) arg;
if (args)
{
argn = typeMalloc(thisARG, 1);
if (argn)
{
T((T_CREATE("thisARG %p"), (void *)argn));
argn->precision = args->precision;
argn->low = args->low;
argn->high = args->high;
#if HAVE_LOCALE_H
argn->L = localeconv();
#else
argn->L = NULL;
#endif
}
}
return (void *)argn;
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_This_Type(va_list * ap)
@ -74,22 +117,13 @@ thisARG;
static void *
Make_This_Type(va_list *ap)
{
thisARG *argn = typeMalloc(thisARG, 1);
thisPARM arg;
if (argn)
{
T((T_CREATE("thisARG %p"), argn));
argn->precision = va_arg(*ap, int);
argn->low = va_arg(*ap, double);
argn->high = va_arg(*ap, double);
arg.precision = va_arg(*ap, int);
arg.low = va_arg(*ap, double);
arg.high = va_arg(*ap, double);
#if HAVE_LOCALE_H
argn->L = localeconv();
#else
argn->L = NULL;
#endif
}
return (void *)argn;
return Generic_This_Type((void *)&arg);
}
/*---------------------------------------------------------------------------
@ -111,7 +145,7 @@ Copy_This_Type(const void *argp)
result = typeMalloc(thisARG, 1);
if (result)
{
T((T_CREATE("thisARG %p"), result));
T((T_CREATE("thisARG %p"), (void *)result));
*result = *ap;
}
}
@ -279,12 +313,27 @@ static FIELDTYPE typeTHIS =
Make_This_Type,
Copy_This_Type,
Free_This_Type,
Check_This_Field,
Check_This_Character,
NULL,
NULL
INIT_FT_FUNC(Check_This_Field),
INIT_FT_FUNC(Check_This_Character),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
Generic_This_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_NUMERIC(void)
{
return TYPE_NUMERIC;
}
#endif
/* fty_num.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 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 "form.priv.h"
MODULE_ID("$Id: fty_regex.c,v 1.21 2007/10/13 19:33:50 tom Exp $")
MODULE_ID("$Id: fty_regex.c,v 1.24 2010/01/23 21:14:37 tom Exp $")
#if HAVE_REGEX_H_FUNCS /* We prefer POSIX regex */
#include <regex.h>
@ -90,31 +90,39 @@ RegExp_Arg;
#endif
#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
# define MAYBE_UNUSED
#else
# define MAYBE_UNUSED GCC_UNUSED
#endif
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_RegularExpression_Type(va_list * ap)
| Function : static void *Generic_RegularExpression_Type(void * arg)
|
| Description : Allocate structure for regex type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Make_RegularExpression_Type(va_list *ap)
Generic_RegularExpression_Type(void *arg MAYBE_UNUSED)
{
#if HAVE_REGEX_H_FUNCS
char *rx = va_arg(*ap, char *);
RegExp_Arg *preg;
char *rx = (char *)arg;
RegExp_Arg *preg = (RegExp_Arg *)0;
if (rx)
{
preg = typeMalloc(RegExp_Arg, 1);
if (preg)
{
T((T_CREATE("RegExp_Arg %p"), preg));
T((T_CREATE("RegExp_Arg %p"), (void *)preg));
if (((preg->pRegExp = typeMalloc(regex_t, 1)) != 0)
&& !regcomp(preg->pRegExp, rx,
(REG_EXTENDED | REG_NOSUB | REG_NEWLINE)))
{
T((T_CREATE("regex_t %p"), preg->pRegExp));
T((T_CREATE("regex_t %p"), (void *)preg->pRegExp));
preg->refCount = typeMalloc(unsigned long, 1);
*(preg->refCount) = 1;
@ -127,11 +135,14 @@ Make_RegularExpression_Type(va_list *ap)
preg = (RegExp_Arg *)0;
}
}
}
return ((void *)preg);
#elif HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
char *rx = va_arg(*ap, char *);
RegExp_Arg *pArg;
char *rx = (char *)arg;
RegExp_Arg *pArg = (RegExp_Arg *)0;
if (rx)
{
pArg = typeMalloc(RegExp_Arg, 1);
if (pArg)
@ -182,12 +193,29 @@ Make_RegularExpression_Type(va_list *ap)
free(pArg);
pArg = NULL;
}
}
return (void *)pArg;
#else
return 0;
#endif
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Make_RegularExpression_Type(va_list * ap)
|
| Description : Allocate structure for regex type argument.
|
| Return Values : Pointer to argument structure or NULL on error
+--------------------------------------------------------------------------*/
static void *
Make_RegularExpression_Type(va_list *ap)
{
char *rx = va_arg(*ap, char *);
return Generic_RegularExpression_Type((void *)rx);
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : static void *Copy_RegularExpression_Type(
@ -198,7 +226,7 @@ Make_RegularExpression_Type(va_list *ap)
| Return Values : Pointer to argument structure or NULL on error.
+--------------------------------------------------------------------------*/
static void *
Copy_RegularExpression_Type(const void *argp)
Copy_RegularExpression_Type(const void *argp MAYBE_UNUSED)
{
#if (HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS)
const RegExp_Arg *ap = (const RegExp_Arg *)argp;
@ -224,7 +252,7 @@ Copy_RegularExpression_Type(const void *argp)
| Return Values : -
+--------------------------------------------------------------------------*/
static void
Free_RegularExpression_Type(void *argp)
Free_RegularExpression_Type(void *argp MAYBE_UNUSED)
{
#if HAVE_REGEX_H_FUNCS | HAVE_REGEXP_H_FUNCS | HAVE_REGEXPR_H_FUNCS
RegExp_Arg *ap = (RegExp_Arg *)argp;
@ -264,7 +292,8 @@ Free_RegularExpression_Type(void *argp)
| FALSE - field is invalid
+--------------------------------------------------------------------------*/
static bool
Check_RegularExpression_Field(FIELD *field, const void *argp)
Check_RegularExpression_Field(FIELD *field MAYBE_UNUSED,
const void *argp MAYBE_UNUSED)
{
bool match = FALSE;
@ -295,12 +324,27 @@ static FIELDTYPE typeREGEXP =
Make_RegularExpression_Type,
Copy_RegularExpression_Type,
Free_RegularExpression_Type,
Check_RegularExpression_Field,
NULL,
NULL,
NULL
INIT_FT_FUNC(Check_RegularExpression_Field),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
INIT_FT_FUNC(NULL),
#if NCURSES_INTEROP_FUNCS
Generic_RegularExpression_Type
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
#if NCURSES_INTEROP_FUNCS
/* The next routines are to simplify the use of ncurses from
programming languages with restictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
_nc_TYPE_REGEXP(void)
{
return TYPE_REGEXP;
}
#endif
/* fty_regex.c ends here */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. *
* Copyright (c) 1998-2005,2010 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,13 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey 1996,1997,2002,2005 *
* Author: Thomas E. Dickey 1996-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
#include "form.priv.h"
#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
@ -264,7 +264,7 @@ int move_field(
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
const FIELDTYPE *_nc_Default_FieldType = {0};
FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
@ -396,6 +396,12 @@ NCURSES_BOOL data_ahead(
#undef _nc_Default_Form
FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
#undef new_form
FORM *new_form(
FIELD **fields)
@ -424,6 +430,13 @@ int field_count(
/* ./frm_driver.c */
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
char *buf)
{ /* void */ }
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
@ -683,9 +696,23 @@ typedef struct
}
enumARG;
typedef struct
{
char **kwds;
int ccase;
int cunique;
}
enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
/* ./fty_int.c */
typedef struct
@ -696,6 +723,14 @@ typedef struct
}
integerARG;
typedef struct
{
int precision;
long low;
long high;
}
integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
@ -716,6 +751,14 @@ typedef struct
}
numericARG;
typedef struct
{
int precision;
double low;
double high;
}
thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;

View File

@ -0,0 +1,777 @@
/****************************************************************************
* Copyright (c) 2010 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 2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
FIELD **code)
{ return(*(FIELD ***)0); }
#undef _nc_retrace_field
FIELD *_nc_retrace_field(
FIELD *code)
{ return(*(FIELD **)0); }
#undef _nc_retrace_field_type
FIELDTYPE *_nc_retrace_field_type(
FIELDTYPE *code)
{ return(*(FIELDTYPE **)0); }
#undef _nc_retrace_form
FORM *_nc_retrace_form(
FORM *code)
{ return(*(FORM **)0); }
#undef _nc_retrace_form_hook
Form_Hook _nc_retrace_form_hook(
Form_Hook code)
{ return(*(Form_Hook *)0); }
/* ./fld_arg.c */
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
void *(*const copy_arg)(
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
#undef field_arg
void *field_arg(
const FIELD *field)
{ return(*(void **)0); }
/* ./fld_attr.c */
#undef set_field_fore
int set_field_fore(
FIELD *field,
chtype attr)
{ return(*(int *)0); }
#undef field_fore
chtype field_fore(
const FIELD *field)
{ return(*(chtype *)0); }
#undef set_field_back
int set_field_back(
FIELD *field,
chtype attr)
{ return(*(int *)0); }
#undef field_back
chtype field_back(
const FIELD *field)
{ return(*(chtype *)0); }
/* ./fld_current.c */
#undef set_current_field
int set_current_field(
FORM *form,
FIELD *field)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
{ return(*(FIELD **)0); }
#undef field_index
int field_index(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_def.c */
#undef _nc_Default_Field
FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_Free_Type
void _nc_Free_Type(
FIELD *field)
{ /* void */ }
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
#undef free_field
int free_field(
FIELD *field)
{ return(*(int *)0); }
/* ./fld_dup.c */
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
/* ./fld_ftchoice.c */
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
/* ./fld_ftlink.c */
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
/* ./fld_info.c */
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
/* ./fld_just.c */
#undef set_field_just
int set_field_just(
FIELD *field,
int just)
{ return(*(int *)0); }
#undef field_just
int field_just(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_link.c */
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
/* ./fld_max.c */
#undef set_max_field
int set_max_field(
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
/* ./fld_move.c */
#undef move_field
int move_field(
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
#undef free_fieldtype
int free_fieldtype(
FIELDTYPE *typ)
{ return(*(int *)0); }
/* ./fld_opts.c */
#undef set_field_opts
int set_field_opts(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts
Field_Options field_opts(
const FIELD *field)
{ return(*(Field_Options *)0); }
#undef field_opts_on
int field_opts_on(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
/* ./fld_pad.c */
#undef set_field_pad
int set_field_pad(
FIELD *field,
int ch)
{ return(*(int *)0); }
#undef field_pad
int field_pad(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_page.c */
#undef set_new_page
int set_new_page(
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
#undef new_page
NCURSES_BOOL new_page(
const FIELD *field)
{ return(*(NCURSES_BOOL *)0); }
/* ./fld_stat.c */
#undef set_field_status
int set_field_status(
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
#undef field_status
NCURSES_BOOL field_status(
const FIELD *field)
{ return(*(NCURSES_BOOL *)0); }
/* ./fld_type.c */
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
#undef field_type
FIELDTYPE *field_type(
const FIELD *field)
{ return(*(FIELDTYPE **)0); }
/* ./fld_user.c */
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
#undef field_userptr
void *field_userptr(
const FIELD *field)
{ return(*(void **)0); }
/* ./frm_cursor.c */
#undef pos_form_cursor
int pos_form_cursor(
FORM *form)
{ return(*(int *)0); }
/* ./frm_data.c */
#undef data_behind
NCURSES_BOOL data_behind(
const FORM *form)
{ return(*(NCURSES_BOOL *)0); }
#undef data_ahead
NCURSES_BOOL data_ahead(
const FORM *form)
{ return(*(NCURSES_BOOL *)0); }
/* ./frm_def.c */
#undef _nc_Default_Form
FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
#undef new_form
FORM *new_form(
FIELD **fields)
{ return(*(FORM **)0); }
#undef free_form
int free_form(
FORM *form)
{ return(*(int *)0); }
#undef set_form_fields
int set_form_fields(
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
#undef form_fields
FIELD **form_fields(
const FORM *form)
{ return(*(FIELD ***)0); }
#undef field_count
int field_count(
const FORM *form)
{ return(*(int *)0); }
/* ./frm_driver.c */
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
char *buf)
{ /* void */ }
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
{ return(*(int *)0); }
#undef _nc_Refresh_Current_Field
int _nc_Refresh_Current_Field(
FORM *form)
{ return(*(int *)0); }
#undef _nc_Synchronize_Attributes
int _nc_Synchronize_Attributes(
FIELD *field)
{ return(*(int *)0); }
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
#undef _nc_Internal_Validation
NCURSES_BOOL _nc_Internal_Validation(
FORM *form)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_First_Active_Field
FIELD *_nc_First_Active_Field(
FORM *form)
{ return(*(FIELD **)0); }
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
int c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
int buffer)
{ return(*(char **)0); }
/* ./frm_hook.c */
#undef set_field_init
int set_field_init(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef field_init
Form_Hook field_init(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_field_term
int set_field_term(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef field_term
Form_Hook field_term(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_form_init
int set_form_init(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef form_init
Form_Hook form_init(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_form_term
int set_form_term(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef form_term
Form_Hook form_term(
const FORM *form)
{ return(*(Form_Hook *)0); }
/* ./frm_opts.c */
#undef set_form_opts
int set_form_opts(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts
Form_Options form_opts(
const FORM *form)
{ return(*(Form_Options *)0); }
#undef form_opts_on
int form_opts_on(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
/* ./frm_page.c */
#undef set_form_page
int set_form_page(
FORM *form,
int page)
{ return(*(int *)0); }
#undef form_page
int form_page(
const FORM *form)
{ return(*(int *)0); }
/* ./frm_post.c */
#undef post_form
int post_form(
FORM *form)
{ return(*(int *)0); }
#undef unpost_form
int unpost_form(
FORM *form)
{ return(*(int *)0); }
/* ./frm_req_name.c */
#undef form_request_name
const char *form_request_name(
int request)
{ return(*(const char **)0); }
#undef form_request_by_name
int form_request_by_name(
const char *str)
{ return(*(int *)0); }
/* ./frm_scale.c */
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
/* ./frm_sub.c */
#undef set_form_sub
int set_form_sub(
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
#undef form_sub
WINDOW *form_sub(
const FORM *form)
{ return(*(WINDOW **)0); }
/* ./frm_user.c */
#undef set_form_userptr
int set_form_userptr(
FORM *form,
void *usrptr)
{ return(*(int *)0); }
#undef form_userptr
void *form_userptr(
const FORM *form)
{ return(*(void **)0); }
/* ./frm_win.c */
#undef set_form_win
int set_form_win(
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
#undef form_win
WINDOW *form_win(
const FORM *form)
{ return(*(WINDOW **)0); }
/* ./fty_alnum.c */
typedef struct
{
int width;
}
alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
/* ./fty_alpha.c */
typedef struct
{
int width;
}
alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
/* ./fty_enum.c */
typedef struct
{
char **kwds;
int count;
NCURSES_BOOL checkcase;
NCURSES_BOOL checkunique;
}
enumARG;
typedef struct
{
char **kwds;
int ccase;
int cunique;
}
enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
/* ./fty_int.c */
typedef struct
{
int precision;
long low;
long high;
}
integerARG;
typedef struct
{
int precision;
long low;
long high;
}
integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#include <locale.h>
typedef struct
{
int precision;
double low;
double high;
struct lconv *L;
}
numericARG;
typedef struct
{
int precision;
double low;
double high;
}
thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#include <regex.h>
typedef struct
{
regex_t *pRegExp;
unsigned long *refCount;
}
RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;

View File

@ -0,0 +1,783 @@
/****************************************************************************
* Copyright (c) 2010 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 2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
FIELD **code)
{ return(*(FIELD ***)0); }
#undef _nc_retrace_field
FIELD *_nc_retrace_field(
FIELD *code)
{ return(*(FIELD **)0); }
#undef _nc_retrace_field_type
FIELDTYPE *_nc_retrace_field_type(
FIELDTYPE *code)
{ return(*(FIELDTYPE **)0); }
#undef _nc_retrace_form
FORM *_nc_retrace_form(
FORM *code)
{ return(*(FORM **)0); }
#undef _nc_retrace_form_hook
Form_Hook _nc_retrace_form_hook(
Form_Hook code)
{ return(*(Form_Hook *)0); }
/* ./fld_arg.c */
#undef set_fieldtype_arg
int set_fieldtype_arg(
FIELDTYPE *typ,
void *(*const make_arg)(
va_list *p1),
void *(*const copy_arg)(
const void *p1),
void (*const free_arg)(
void *p1))
{ return(*(int *)0); }
#undef field_arg
void *field_arg(
const FIELD *field)
{ return(*(void **)0); }
/* ./fld_attr.c */
#undef set_field_fore
int set_field_fore(
FIELD *field,
chtype attr)
{ return(*(int *)0); }
#undef field_fore
chtype field_fore(
const FIELD *field)
{ return(*(chtype *)0); }
#undef set_field_back
int set_field_back(
FIELD *field,
chtype attr)
{ return(*(int *)0); }
#undef field_back
chtype field_back(
const FIELD *field)
{ return(*(chtype *)0); }
/* ./fld_current.c */
#undef set_current_field
int set_current_field(
FORM *form,
FIELD *field)
{ return(*(int *)0); }
#undef current_field
FIELD *current_field(
const FORM *form)
{ return(*(FIELD **)0); }
#undef field_index
int field_index(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_def.c */
#undef _nc_Default_Field
FIELD *_nc_Default_Field;
#undef _nc_Make_Argument
TypeArgument *_nc_Make_Argument(
const FIELDTYPE *typ,
va_list *ap,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Copy_Argument
TypeArgument *_nc_Copy_Argument(
const FIELDTYPE *typ,
const TypeArgument *argp,
int *err)
{ return(*(TypeArgument **)0); }
#undef _nc_Free_Argument
void _nc_Free_Argument(
const FIELDTYPE *typ,
TypeArgument *argp)
{ /* void */ }
#undef _nc_Copy_Type
NCURSES_BOOL _nc_Copy_Type(
FIELD *dst,
FIELD const *src)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_Free_Type
void _nc_Free_Type(
FIELD *field)
{ /* void */ }
#undef new_field
FIELD *new_field(
int rows,
int cols,
int frow,
int fcol,
int nrow,
int nbuf)
{ return(*(FIELD **)0); }
#undef free_field
int free_field(
FIELD *field)
{ return(*(int *)0); }
/* ./fld_dup.c */
#undef dup_field
FIELD *dup_field(
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
/* ./fld_ftchoice.c */
#undef set_fieldtype_choice
int set_fieldtype_choice(
FIELDTYPE *typ,
NCURSES_BOOL (*const next_choice)(
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const prev_choice)(
FIELD *p1,
const void *p2))
{ return(*(int *)0); }
/* ./fld_ftlink.c */
#undef link_fieldtype
FIELDTYPE *link_fieldtype(
FIELDTYPE *type1,
FIELDTYPE *type2)
{ return(*(FIELDTYPE **)0); }
/* ./fld_info.c */
#undef field_info
int field_info(
const FIELD *field,
int *rows,
int *cols,
int *frow,
int *fcol,
int *nrow,
int *nbuf)
{ return(*(int *)0); }
#undef dynamic_field_info
int dynamic_field_info(
const FIELD *field,
int *drows,
int *dcols,
int *maxgrow)
{ return(*(int *)0); }
/* ./fld_just.c */
#undef set_field_just
int set_field_just(
FIELD *field,
int just)
{ return(*(int *)0); }
#undef field_just
int field_just(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_link.c */
#undef link_field
FIELD *link_field(
FIELD *field,
int frow,
int fcol)
{ return(*(FIELD **)0); }
/* ./fld_max.c */
#undef set_max_field
int set_max_field(
FIELD *field,
int maxgrow)
{ return(*(int *)0); }
/* ./fld_move.c */
#undef move_field
int move_field(
FIELD *field,
int frow,
int fcol)
{ return(*(int *)0); }
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
NCURSES_BOOL (*const field_check)(
FIELD *p1,
const void *p2),
NCURSES_BOOL (*const char_check)(
int p1,
const void *p2))
{ return(*(FIELDTYPE **)0); }
#undef free_fieldtype
int free_fieldtype(
FIELDTYPE *typ)
{ return(*(int *)0); }
/* ./fld_opts.c */
#undef set_field_opts
int set_field_opts(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts
Field_Options field_opts(
const FIELD *field)
{ return(*(Field_Options *)0); }
#undef field_opts_on
int field_opts_on(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
#undef field_opts_off
int field_opts_off(
FIELD *field,
Field_Options opts)
{ return(*(int *)0); }
/* ./fld_pad.c */
#undef set_field_pad
int set_field_pad(
FIELD *field,
int ch)
{ return(*(int *)0); }
#undef field_pad
int field_pad(
const FIELD *field)
{ return(*(int *)0); }
/* ./fld_page.c */
#undef set_new_page
int set_new_page(
FIELD *field,
NCURSES_BOOL new_page_flag)
{ return(*(int *)0); }
#undef new_page
NCURSES_BOOL new_page(
const FIELD *field)
{ return(*(NCURSES_BOOL *)0); }
/* ./fld_stat.c */
#undef set_field_status
int set_field_status(
FIELD *field,
NCURSES_BOOL status)
{ return(*(int *)0); }
#undef field_status
NCURSES_BOOL field_status(
const FIELD *field)
{ return(*(NCURSES_BOOL *)0); }
/* ./fld_type.c */
#undef set_field_type
int set_field_type(
FIELD *field,
FIELDTYPE *type,
...)
{ return(*(int *)0); }
#undef field_type
FIELDTYPE *field_type(
const FIELD *field)
{ return(*(FIELDTYPE **)0); }
/* ./fld_user.c */
#undef set_field_userptr
int set_field_userptr(
FIELD *field,
void *usrptr)
{ return(*(int *)0); }
#undef field_userptr
void *field_userptr(
const FIELD *field)
{ return(*(void **)0); }
/* ./frm_cursor.c */
#undef pos_form_cursor
int pos_form_cursor(
FORM *form)
{ return(*(int *)0); }
/* ./frm_data.c */
#undef data_behind
NCURSES_BOOL data_behind(
const FORM *form)
{ return(*(NCURSES_BOOL *)0); }
#undef data_ahead
NCURSES_BOOL data_ahead(
const FORM *form)
{ return(*(NCURSES_BOOL *)0); }
/* ./frm_def.c */
#undef _nc_Default_Form
FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
#undef new_form
FORM *new_form(
FIELD **fields)
{ return(*(FORM **)0); }
#undef free_form
int free_form(
FORM *form)
{ return(*(int *)0); }
#undef set_form_fields
int set_form_fields(
FORM *form,
FIELD **fields)
{ return(*(int *)0); }
#undef form_fields
FIELD **form_fields(
const FORM *form)
{ return(*(FIELD ***)0); }
#undef field_count
int field_count(
const FORM *form)
{ return(*(int *)0); }
/* ./frm_driver.c */
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
cchar_t *buf)
{ /* void */ }
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
{ return(*(int *)0); }
#undef _nc_Refresh_Current_Field
int _nc_Refresh_Current_Field(
FORM *form)
{ return(*(int *)0); }
#undef _nc_Synchronize_Attributes
int _nc_Synchronize_Attributes(
FIELD *field)
{ return(*(int *)0); }
#undef _nc_Synchronize_Options
int _nc_Synchronize_Options(
FIELD *field,
Field_Options newopts)
{ return(*(int *)0); }
#undef _nc_Set_Current_Field
int _nc_Set_Current_Field(
FORM *form,
FIELD *newfield)
{ return(*(int *)0); }
#undef _nc_Internal_Validation
NCURSES_BOOL _nc_Internal_Validation(
FORM *form)
{ return(*(NCURSES_BOOL *)0); }
#undef _nc_First_Active_Field
FIELD *_nc_First_Active_Field(
FORM *form)
{ return(*(FIELD **)0); }
#undef _nc_Set_Form_Page
int _nc_Set_Form_Page(
FORM *form,
int page,
FIELD *field)
{ return(*(int *)0); }
typedef struct
{
int keycode;
int (*cmd) (FORM *);
}
Binding_Info;
#undef form_driver
int form_driver(
FORM *form,
int c)
{ return(*(int *)0); }
#undef set_field_buffer
int set_field_buffer(
FIELD *field,
int buffer,
const char *value)
{ return(*(int *)0); }
#undef field_buffer
char *field_buffer(
const FIELD *field,
int buffer)
{ return(*(char **)0); }
#undef _nc_Widen_String
wchar_t *_nc_Widen_String(
char *source,
int *lengthp)
{ return(*(wchar_t **)0); }
/* ./frm_hook.c */
#undef set_field_init
int set_field_init(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef field_init
Form_Hook field_init(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_field_term
int set_field_term(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef field_term
Form_Hook field_term(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_form_init
int set_form_init(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef form_init
Form_Hook form_init(
const FORM *form)
{ return(*(Form_Hook *)0); }
#undef set_form_term
int set_form_term(
FORM *form,
Form_Hook func)
{ return(*(int *)0); }
#undef form_term
Form_Hook form_term(
const FORM *form)
{ return(*(Form_Hook *)0); }
/* ./frm_opts.c */
#undef set_form_opts
int set_form_opts(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts
Form_Options form_opts(
const FORM *form)
{ return(*(Form_Options *)0); }
#undef form_opts_on
int form_opts_on(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
#undef form_opts_off
int form_opts_off(
FORM *form,
Form_Options opts)
{ return(*(int *)0); }
/* ./frm_page.c */
#undef set_form_page
int set_form_page(
FORM *form,
int page)
{ return(*(int *)0); }
#undef form_page
int form_page(
const FORM *form)
{ return(*(int *)0); }
/* ./frm_post.c */
#undef post_form
int post_form(
FORM *form)
{ return(*(int *)0); }
#undef unpost_form
int unpost_form(
FORM *form)
{ return(*(int *)0); }
/* ./frm_req_name.c */
#undef form_request_name
const char *form_request_name(
int request)
{ return(*(const char **)0); }
#undef form_request_by_name
int form_request_by_name(
const char *str)
{ return(*(int *)0); }
/* ./frm_scale.c */
#undef scale_form
int scale_form(
const FORM *form,
int *rows,
int *cols)
{ return(*(int *)0); }
/* ./frm_sub.c */
#undef set_form_sub
int set_form_sub(
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
#undef form_sub
WINDOW *form_sub(
const FORM *form)
{ return(*(WINDOW **)0); }
/* ./frm_user.c */
#undef set_form_userptr
int set_form_userptr(
FORM *form,
void *usrptr)
{ return(*(int *)0); }
#undef form_userptr
void *form_userptr(
const FORM *form)
{ return(*(void **)0); }
/* ./frm_win.c */
#undef set_form_win
int set_form_win(
FORM *form,
WINDOW *win)
{ return(*(int *)0); }
#undef form_win
WINDOW *form_win(
const FORM *form)
{ return(*(WINDOW **)0); }
/* ./fty_alnum.c */
typedef struct
{
int width;
}
alnumARG;
#undef TYPE_ALNUM
FIELDTYPE *TYPE_ALNUM;
/* ./fty_alpha.c */
typedef struct
{
int width;
}
alphaARG;
#undef TYPE_ALPHA
FIELDTYPE *TYPE_ALPHA;
/* ./fty_enum.c */
typedef struct
{
char **kwds;
int count;
NCURSES_BOOL checkcase;
NCURSES_BOOL checkunique;
}
enumARG;
typedef struct
{
char **kwds;
int ccase;
int cunique;
}
enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
/* ./fty_int.c */
typedef struct
{
int precision;
long low;
long high;
}
integerARG;
typedef struct
{
int precision;
long low;
long high;
}
integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
/* ./fty_ipv4.c */
#undef TYPE_IPV4
FIELDTYPE *TYPE_IPV4;
/* ./fty_num.c */
#include <locale.h>
typedef struct
{
int precision;
double low;
double high;
struct lconv *L;
}
numericARG;
typedef struct
{
int precision;
double low;
double high;
}
thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;
/* ./fty_regex.c */
#include <regex.h>
typedef struct
{
regex_t *pRegExp;
unsigned long *refCount;
}
RegExp_Arg;
#undef TYPE_REGEXP
FIELDTYPE *TYPE_REGEXP;

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2002,2005 Free Software Foundation, Inc. *
* Copyright (c) 2002-2005,2010 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,13 @@
****************************************************************************/
/****************************************************************************
* Author: Thomas E. Dickey 2002,2005 *
* Author: Thomas E. Dickey 2002-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./f_trace.c */
#include "form.priv.h"
#include <form.priv.h>
#undef _nc_retrace_field_ptr
FIELD **_nc_retrace_field_ptr(
@ -264,7 +264,7 @@ int move_field(
/* ./fld_newftyp.c */
#undef _nc_Default_FieldType
const FIELDTYPE *_nc_Default_FieldType = {0};
FIELDTYPE *_nc_Default_FieldType;
#undef new_fieldtype
FIELDTYPE *new_fieldtype(
@ -396,6 +396,12 @@ NCURSES_BOOL data_ahead(
#undef _nc_Default_Form
FORM *_nc_Default_Form;
#undef new_form_sp
FORM *new_form_sp(
SCREEN *sp,
FIELD **fields)
{ return(*(FORM **)0); }
#undef new_form
FORM *new_form(
FIELD **fields)
@ -424,6 +430,13 @@ int field_count(
/* ./frm_driver.c */
#undef _nc_get_fieldbuffer
void _nc_get_fieldbuffer(
FORM *form,
FIELD *field,
cchar_t *buf)
{ /* void */ }
#undef _nc_Position_Form_Cursor
int _nc_Position_Form_Cursor(
FORM *form)
@ -689,9 +702,23 @@ typedef struct
}
enumARG;
typedef struct
{
char **kwds;
int ccase;
int cunique;
}
enumParams;
#undef TYPE_ENUM
FIELDTYPE *TYPE_ENUM;
/* ./fty_generic.c */
#undef _nc_fty_generic
void _nc_fty_generic(void)
{ /* void */ }
/* ./fty_int.c */
typedef struct
@ -702,6 +729,14 @@ typedef struct
}
integerARG;
typedef struct
{
int precision;
long low;
long high;
}
integerPARM;
#undef TYPE_INTEGER
FIELDTYPE *TYPE_INTEGER;
@ -722,6 +757,14 @@ typedef struct
}
numericARG;
typedef struct
{
int precision;
double low;
double high;
}
thisPARM;
#undef TYPE_NUMERIC
FIELDTYPE *TYPE_NUMERIC;

View File

@ -1,6 +1,6 @@
# $Id: modules,v 1.15 2006/12/24 00:52:58 tom Exp $
# $Id: modules,v 1.17 2010/01/23 16:26:37 tom Exp $
##############################################################################
# Copyright (c) 1998-2004,2006 Free Software Foundation, Inc. #
# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,49 +28,51 @@
##############################################################################
#
# Author: Thomas E. Dickey 1995-on
# and: Juergen Pfeifer 2008
#
@ base
# Library objects
f_trace lib $(srcdir) $(FORM_PRIV_H)
fld_arg lib $(srcdir) $(FORM_PRIV_H)
fld_attr lib $(srcdir) $(FORM_PRIV_H)
fld_current lib $(srcdir) $(FORM_PRIV_H)
fld_def lib $(srcdir) $(FORM_PRIV_H)
fld_dup lib $(srcdir) $(FORM_PRIV_H)
fld_ftchoice lib $(srcdir) $(FORM_PRIV_H)
fld_ftlink lib $(srcdir) $(FORM_PRIV_H)
fld_info lib $(srcdir) $(FORM_PRIV_H)
fld_just lib $(srcdir) $(FORM_PRIV_H)
fld_link lib $(srcdir) $(FORM_PRIV_H)
fld_max lib $(srcdir) $(FORM_PRIV_H)
fld_move lib $(srcdir) $(FORM_PRIV_H)
fld_newftyp lib $(srcdir) $(FORM_PRIV_H)
fld_opts lib $(srcdir) $(FORM_PRIV_H)
fld_pad lib $(srcdir) $(FORM_PRIV_H)
fld_page lib $(srcdir) $(FORM_PRIV_H)
fld_stat lib $(srcdir) $(FORM_PRIV_H)
fld_type lib $(srcdir) $(FORM_PRIV_H)
fld_user lib $(srcdir) $(FORM_PRIV_H)
frm_cursor lib $(srcdir) $(FORM_PRIV_H)
frm_data lib $(srcdir) $(FORM_PRIV_H)
frm_def lib $(srcdir) $(FORM_PRIV_H)
frm_driver lib $(srcdir) $(FORM_PRIV_H)
frm_hook lib $(srcdir) $(FORM_PRIV_H)
frm_opts lib $(srcdir) $(FORM_PRIV_H)
frm_page lib $(srcdir) $(FORM_PRIV_H)
frm_post lib $(srcdir) $(FORM_PRIV_H)
frm_req_name lib $(srcdir) $(FORM_PRIV_H)
frm_scale lib $(srcdir) $(FORM_PRIV_H)
frm_sub lib $(srcdir) $(FORM_PRIV_H)
frm_user lib $(srcdir) $(FORM_PRIV_H)
frm_win lib $(srcdir) $(FORM_PRIV_H)
fty_alnum lib $(srcdir) $(FORM_PRIV_H)
fty_alpha lib $(srcdir) $(FORM_PRIV_H)
fty_enum lib $(srcdir) $(FORM_PRIV_H)
fty_int lib $(srcdir) $(FORM_PRIV_H)
fty_ipv4 lib $(srcdir) $(FORM_PRIV_H)
fty_num lib $(srcdir) $(FORM_PRIV_H)
fty_regex lib $(srcdir) $(FORM_PRIV_H)
f_trace lib $(srcdir) $(HEADER_DEPS)
fld_arg lib $(srcdir) $(HEADER_DEPS)
fld_attr lib $(srcdir) $(HEADER_DEPS)
fld_current lib $(srcdir) $(HEADER_DEPS)
fld_def lib $(srcdir) $(HEADER_DEPS)
fld_dup lib $(srcdir) $(HEADER_DEPS)
fld_ftchoice lib $(srcdir) $(HEADER_DEPS)
fld_ftlink lib $(srcdir) $(HEADER_DEPS)
fld_info lib $(srcdir) $(HEADER_DEPS)
fld_just lib $(srcdir) $(HEADER_DEPS)
fld_link lib $(srcdir) $(HEADER_DEPS)
fld_max lib $(srcdir) $(HEADER_DEPS)
fld_move lib $(srcdir) $(HEADER_DEPS)
fld_newftyp lib $(srcdir) $(HEADER_DEPS)
fld_opts lib $(srcdir) $(HEADER_DEPS)
fld_pad lib $(srcdir) $(HEADER_DEPS)
fld_page lib $(srcdir) $(HEADER_DEPS)
fld_stat lib $(srcdir) $(HEADER_DEPS)
fld_type lib $(srcdir) $(HEADER_DEPS)
fld_user lib $(srcdir) $(HEADER_DEPS)
frm_cursor lib $(srcdir) $(HEADER_DEPS)
frm_data lib $(srcdir) $(HEADER_DEPS)
frm_def lib $(srcdir) $(HEADER_DEPS)
frm_driver lib $(srcdir) $(HEADER_DEPS)
frm_hook lib $(srcdir) $(HEADER_DEPS)
frm_opts lib $(srcdir) $(HEADER_DEPS)
frm_page lib $(srcdir) $(HEADER_DEPS)
frm_post lib $(srcdir) $(HEADER_DEPS)
frm_req_name lib $(srcdir) $(HEADER_DEPS)
frm_scale lib $(srcdir) $(HEADER_DEPS)
frm_sub lib $(srcdir) $(HEADER_DEPS)
frm_user lib $(srcdir) $(HEADER_DEPS)
frm_win lib $(srcdir) $(HEADER_DEPS)
fty_alnum lib $(srcdir) $(HEADER_DEPS)
fty_alpha lib $(srcdir) $(HEADER_DEPS)
fty_enum lib $(srcdir) $(HEADER_DEPS)
fty_generic lib $(srcdir) $(HEADER_DEPS)
fty_int lib $(srcdir) $(HEADER_DEPS)
fty_ipv4 lib $(srcdir) $(HEADER_DEPS)
fty_num lib $(srcdir) $(HEADER_DEPS)
fty_regex lib $(srcdir) $(HEADER_DEPS)
# vile:makemode

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 1998-2002,2006 Free Software Foundation, Inc. #
# Copyright (c) 1998-2006,2010 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: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
# $Id: Caps,v 1.36 2006/05/27 15:33:04 tom Exp $
# $Id: Caps,v 1.37 2010/12/04 18:47:13 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@ -1256,9 +1256,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.aix4,v 1.7 2006/05/27 15:33:04 tom Exp $
# $Id: Caps.aix4,v 1.8 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@ -1247,9 +1247,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2002-2003,2006 Free Software Foundation, Inc. #
# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.hpux11,v 1.4 2006/05/27 15:33:04 tom Exp $
# $Id: Caps.hpux11,v 1.5 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@ -1270,9 +1270,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
# Copyright (c) 2001-2006,2010 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 Dickey
# and: Ilya Zakharevich
#
# $Id: Caps.keys,v 1.3 2006/05/27 15:33:04 tom Exp $
# $Id: Caps.keys,v 1.4 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@ -1346,9 +1346,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2002,2006 Free Software Foundation, Inc. #
# Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.osf1r5,v 1.4 2006/05/27 15:33:04 tom Exp $
# $Id: Caps.osf1r5,v 1.5 2010/12/04 18:47:13 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@ -1266,9 +1266,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. #
# Copyright (c) 2001-2006,2010 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@ -28,7 +28,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.uwin,v 1.4 2006/05/27 15:33:04 tom Exp $
# $Id: Caps.uwin,v 1.5 2010/12/04 18:49:20 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
@ -1082,9 +1082,3 @@ infoalias ksel kslt IBM key_select
# kcmd, kend, khlp, and kf11...kf63.
#
#############################################################################
#
# The following sets edit modes for GNU EMACS
# Local Variables:
# case-fold-search:nil
# truncate-lines:t
# End:

View File

@ -1,7 +1,7 @@
# vile:awkmode
BEGIN {
print "/****************************************************************************"
print " * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *"
print " * Copyright (c) 1998-2009,2010 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 *"
@ -34,7 +34,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.50 2008/05/24 23:13:59 tom Exp $ */"
print "/* $Id: MKterm.h.awk.in,v 1.58 2010/01/09 19:53:26 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@ -130,11 +130,15 @@ BEGIN {
print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
print "#if __MINGW32__"
print "# include <ncurses_mingw.h>"
print "# define TTY struct termios"
print "#else"
print "#undef TERMIOS"
print "#include <sgtty.h>"
print "#include <sys/ioctl.h>"
print "#define TTY struct sgttyb"
print ""
print "#endif /* MINGW32 */"
print "#endif /* HAVE_TERMIO_H */"
print ""
print "#endif /* HAVE_TERMIOS_H */"
@ -228,8 +232,16 @@ END {
print " char * _termname; /* used for termname() */"
print "} TERMINAL;"
print ""
print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
print "#if @BROKEN_LINKER@ && !@cf_cv_enable_reentrant@"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#elif @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(TERMINAL *, cur_term);"
print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
print "#else"
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print "#endif"
print ""
print "#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolnames);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, boolfnames);"
@ -240,7 +252,6 @@ END {
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strcodes);"
print "NCURSES_WRAPPED_VAR(NCURSES_CONST char * const *, strfnames);"
print ""
print "#define cur_term NCURSES_PUBLIC_VAR(cur_term())"
print "#define boolnames NCURSES_PUBLIC_VAR(boolnames())"
print "#define boolcodes NCURSES_PUBLIC_VAR(boolcodes())"
print "#define boolfnames NCURSES_PUBLIC_VAR(boolfnames())"
@ -253,8 +264,6 @@ END {
print ""
print "#else"
print ""
print "extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;"
print ""
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];"
print "extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];"
@ -300,6 +309,8 @@ END {
print "extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */"
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
print ""
print "#endif /* __NCURSES_H */"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
@ -312,6 +323,37 @@ END {
print "extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));"
print "#endif /* NCURSES_TERMCAP_H_incl */"
print ""
print "/*"
print " * Include curses.h before term.h to enable these extensions."
print " */"
print "#if defined(NCURSES_SP_FUNCS) && (NCURSES_SP_FUNCS != 0)"
print ""
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tigetstr) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(putp) (SCREEN*, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetflag) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tigetnum) (SCREEN*, NCURSES_CONST char *);"
print ""
print "#if @NCURSES_TPARM_VARARGS@ /* NCURSES_TPARM_VARARGS */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, NCURSES_CONST char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, NCURSES_CONST char *, ...); /* special */"
print "#endif"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgetstr) (SCREEN*, NCURSES_CONST char *, char **);"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tgoto) (SCREEN*, const char *, int, int);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetent) (SCREEN*, char *, const char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetflag) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tgetnum) (SCREEN*, NCURSES_CONST char *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(tputs) (SCREEN*, const char *, int, NCURSES_SP_OUTC);"
print ""
print "extern NCURSES_EXPORT(TERMINAL *) NCURSES_SP_NAME(set_curterm) (SCREEN*, TERMINAL *);"
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(del_curterm) (SCREEN*, TERMINAL *);"
print ""
print "extern NCURSES_EXPORT(int) NCURSES_SP_NAME(restartterm) (SCREEN*, NCURSES_CONST char *, int, int *);"
print "#endif /* NCURSES_SP_FUNCS */"
print ""
print "#ifdef __cplusplus"
print "}"
print "#endif"

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.35 2001/12/08 18:50:06 tom Exp $
# $Id: Makefile.in,v 1.40 2010/11/27 21:45:27 tom Exp $
##############################################################################
# Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. #
# Copyright (c) 1998,2009,2010 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"), #
@ -40,6 +40,7 @@
.SUFFIXES:
SHELL = /bin/sh
VPATH = @srcdir@
THIS = Makefile
DESTDIR = @DESTDIR@
@ -54,6 +55,9 @@ INSTALL_DATA = @INSTALL_DATA@
AWK = @AWK@
LN_S = @LN_S@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
VERSION = @cf_cv_rel_version@
# The "Caps" file specifies the terminfo database format, as well as the list
@ -64,6 +68,7 @@ TERMINFO_CAPS = $(srcdir)/@TERMINFO_CAPS@
CONFIG_SRC = \
MKterm.h.awk \
curses.head \
ncurses_dll.h \
termcap.h \
unctrl.h
@ -73,6 +78,7 @@ AUTO_SRC = \
hashsize.h \
ncurses_def.h \
parametrized.h \
config.h \
term.h
################################################################################
@ -104,11 +110,15 @@ ncurses_def.h: $(srcdir)/ncurses_defs $(srcdir)/MKncurses_def.sh
parametrized.h: $(TERMINFO_CAPS) $(srcdir)/MKparametrized.sh
AWK=$(AWK) sh $(srcdir)/MKparametrized.sh $(TERMINFO_CAPS) >$@
# This is required by pthread.h on MinGW
config.h:
touch $@
tags:
ctags *.[ch]
$(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
@MAKE_UPPER_TAGS@ etags *.[ch]
@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
@ -117,7 +127,7 @@ clean :: mostlyclean
-rm -f $(AUTO_SRC)
distclean :: clean
-rm -f Makefile $(CONFIG_SRC)
-rm -f Makefile $(CONFIG_SRC) config.h
realclean :: distclean

View File

@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: capdefaults.c,v 1.13 2008/08/04 12:33:42 tom Exp $ */
/* $Id: capdefaults.c,v 1.14 2008/11/16 00:19:59 juergen Exp $ */
/*
* Compute obsolete capabilities. The reason this is an include file is
@ -44,11 +44,11 @@
* postprocess_termcap().
*/
{
char *sp;
char *strp;
short capval;
#define EXTRACT_DELAY(str) \
(short) (sp = strchr(str, '*'), sp ? atoi(sp+1) : 0)
(short) (strp = strchr(str, '*'), strp ? atoi(strp+1) : 0)
/* current (4.4BSD) capabilities marked obsolete */
if (VALID_STRING(carriage_return)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2010,2011 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 *
@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.187 2008/08/30 20:11:29 tom Exp $ */
/* $Id: curses.h.in,v 1.220 2011/01/22 19:47:20 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -40,12 +40,6 @@
#define CURSES 1
#define CURSES_H 1
/* This should be defined for the enhanced functionality to be visible.
* However, some of the wide-character (enhanced) functionality is missing.
* So we do not define it (yet).
#define _XOPEN_CURSES 1
*/
/* These are defined only in curses.h, and are used for conditional compiles */
#define NCURSES_VERSION_MAJOR @NCURSES_MAJOR@
#define NCURSES_VERSION_MINOR @NCURSES_MINOR@
@ -109,6 +103,19 @@
#define NCURSES_OPAQUE @NCURSES_OPAQUE@
#endif
/*
* The reentrant code relies on the opaque setting, but adds features.
*/
#ifndef NCURSES_REENTRANT
#define NCURSES_REENTRANT @cf_cv_enable_reentrant@
#endif
/*
* Control whether bindings for interop support are added.
*/
#undef NCURSES_INTEROP_FUNCS
#define NCURSES_INTEROP_FUNCS @NCURSES_INTEROP_FUNCS@
/*
* The internal type used for window dimensions.
*/
@ -137,12 +144,24 @@ typedef unsigned @cf_cv_typeof_chtype@ chtype;
typedef unsigned @cf_cv_typeof_mmask_t@ mmask_t;
#endif
/*
* We need FILE, etc. Include this before checking any feature symbols.
*/
#include <stdio.h>
#include <unctrl.h>
/*
* With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or
* conflicting) when _XOPEN_SOURCE is 500 or greater.
*/
#undef NCURSES_WIDECHAR
#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)
#define NCURSES_WIDECHAR
#endif
#include <stdarg.h> /* we need va_list */
#ifdef _XOPEN_SOURCE_EXTENDED
#ifdef NCURSES_WIDECHAR
#include <stddef.h> /* we want wchar_t */
#endif /* _XOPEN_SOURCE_EXTENDED */
#endif
/* X/Open and SVr4 specify that curses implements 'bool'. However, C++ may also
* implement it. If so, we must use the C++ compiler's type to avoid conflict
@ -224,9 +243,9 @@ extern "C" {
/* line graphics */
#if @BROKEN_LINKER@ || @cf_cv_enable_reentrant@
#if @BROKEN_LINKER@ || NCURSES_REENTRANT
NCURSES_WRAPPED_VAR(chtype*, acs_map);
#define acs_map (_nc_acs_map())
#define acs_map NCURSES_PUBLIC_VAR(acs_map())
#else
extern NCURSES_EXPORT_VAR(chtype) acs_map[];
#endif
@ -323,7 +342,7 @@ typedef struct _win_st WINDOW;
typedef chtype attr_t; /* ...must be at least as wide as chtype */
#ifdef _XOPEN_SOURCE_EXTENDED
#ifdef NCURSES_WIDECHAR
#if @NCURSES_LIBUTF8@
#ifdef mblen /* libutf8.h defines it w/o undefining first */
@ -344,7 +363,13 @@ typedef unsigned short wchar_t@NCURSES_OK_WCHAR_T@;
typedef unsigned int wint_t@NCURSES_OK_WCHAR_T@;
#endif
#define CCHARW_MAX 5
/*
* cchar_t stores an array of CCHARW_MAX wide characters. The first is
* normally a spacing character. The others are non-spacing. If those
* (spacing and nonspacing) do not fill the array, a null L'\0' follows.
* Otherwise, a null is assumed to follow when extracting via getcchar().
*/
#define CCHARW_MAX @NCURSES_CCHARW_MAX@
typedef struct
{
attr_t attr;
@ -357,7 +382,7 @@ typedef struct
}
cchar_t;
#endif /* _XOPEN_SOURCE_EXTENDED */
#endif /* NCURSES_WIDECHAR */
#if !NCURSES_OPAQUE
struct ldat;
@ -409,7 +434,7 @@ struct _win_st
NCURSES_SIZE_T _yoffset; /* real begy is _begy + _yoffset */
#ifdef _XOPEN_SOURCE_EXTENDED
#ifdef NCURSES_WIDECHAR
cchar_t _bkgrnd; /* current background char/attribute pair */
#if @NCURSES_EXT_COLORS@
int _color; /* current color-pair for non-space character */
@ -461,8 +486,8 @@ typedef struct
_nc_event *events[1];
} _nc_eventlist;
extern NCURSES_EXPORT(int) wgetch_events(WINDOW *, _nc_eventlist *); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);/* experimental */
extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */
#endif /* NCURSES_WGETCH_EVENTS */
#endif /* NCURSES_EXT_FUNCS */
@ -510,6 +535,12 @@ extern NCURSES_EXPORT(int) wgetnstr_events(WINDOW *,char *,int,_nc_eventlist *);
#define GCC_UNUSED /* nothing */
#endif
/*
* Curses uses a helper function. Define our type for this to simplify
* extending it for the sp-funcs feature.
*/
typedef int (*NCURSES_OUTC)(int);
/*
* Function prototypes. This is the complete X/Open Curses list of required
* functions. Those marked `generated' will have sources generated from the
@ -727,7 +758,7 @@ extern NCURSES_EXPORT(int) ungetch (int); /* implemented */
extern NCURSES_EXPORT(int) untouchwin (WINDOW *); /* generated */
extern NCURSES_EXPORT(void) use_env (bool); /* implemented */
extern NCURSES_EXPORT(int) vidattr (chtype); /* implemented */
extern NCURSES_EXPORT(int) vidputs (chtype, int (*)(int)); /* implemented */
extern NCURSES_EXPORT(int) vidputs (chtype, NCURSES_OUTC); /* implemented */
extern NCURSES_EXPORT(int) vline (chtype, int); /* generated */
extern NCURSES_EXPORT(int) vwprintw (WINDOW *, const char *,va_list); /* implemented */
extern NCURSES_EXPORT(int) vw_printw (WINDOW *, const char *,va_list); /* generated */
@ -805,6 +836,8 @@ extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, long,long,long,long,l
extern NCURSES_EXPORT(char *) tparm_varargs (NCURSES_CONST char *, ...); /* special */
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */
/*
* These functions are not in X/Open, but we use them in macro definitions:
*/
@ -821,7 +854,7 @@ extern NCURSES_EXPORT(int) getpary (const WINDOW *); /* generated */
/*
* vid_attr() was implemented originally based on a draft of X/Open curses.
*/
#ifndef _XOPEN_SOURCE_EXTENDED
#ifndef NCURSES_WIDECHAR
#define vid_attr(a,pair,opts) vidattr(a)
#endif
@ -838,6 +871,7 @@ extern NCURSES_EXPORT(char *) keybound (int, int);
extern NCURSES_EXPORT(const char *) curses_version (void);
extern NCURSES_EXPORT(int) assume_default_colors (int, int);
extern NCURSES_EXPORT(int) define_key (const char *, int);
extern NCURSES_EXPORT(int) get_escdelay (void);
extern NCURSES_EXPORT(int) key_defined (const char *);
extern NCURSES_EXPORT(int) keyok (int, bool);
extern NCURSES_EXPORT(int) resize_term (int, int);
@ -856,23 +890,135 @@ extern NCURSES_EXPORT(void) nofilter(void);
* These extensions provide access to information stored in the WINDOW even
* when NCURSES_OPAQUE is set:
*/
extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* generated */
extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generated */
extern NCURSES_EXPORT(WINDOW *) wgetparent (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_cleared (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_idcok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_idlok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_immedok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_keypad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_leaveok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_nodelay (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_notimeout (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_pad (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_scrollok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_subwin (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(bool) is_syncok (const WINDOW *); /* @GENERATED_EXT_FUNCS@ */
extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* @GENERATED_EXT_FUNCS@ */
#else
#define curses_version() NCURSES_VERSION
#endif
/*
* Extra extension-functions, which pass a SCREEN pointer rather than using
* a global variable SP.
*/
#if @NCURSES_SP_FUNCS@
#undef NCURSES_SP_FUNCS
#define NCURSES_SP_FUNCS @NCURSES_PATCH@
#define NCURSES_SP_NAME(name) name##_sp
/* Define the sp-funcs helper function */
#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)
typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);
extern NCURSES_EXPORT(SCREEN *) new_prescr (void); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(baudrate) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(beep) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(can_change_color) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(cbreak) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(curs_set) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(color_content) (SCREEN*, short, short*, short*, short*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_prog_mode) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(def_shell_mode) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(delay_output) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(doupdate) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(echo) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(endwin) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(char) NCURSES_SP_NAME(erasechar) (SCREEN*);/* implemented:SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(filter) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flash) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(flushinp) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(getwin) (SCREEN*, FILE *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(halfdelay) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_colors) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_color) (SCREEN*, short, short, short, short); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(init_pair) (SCREEN*, short, short, short); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(intrflush) (SCREEN*, WINDOW*, bool); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(isendwin) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(keyname) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(char) NCURSES_SP_NAME(killchar) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(longname) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mvcur) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(napms) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newpad) (SCREEN*, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(SCREEN *) NCURSES_SP_NAME(newterm) (SCREEN*, NCURSES_CONST char *, FILE *, FILE *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(WINDOW *) NCURSES_SP_NAME(newwin) (SCREEN*, int, int, int, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nl) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nocbreak) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noecho) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(nonl) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(noqiflush) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(noraw) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(pair_content) (SCREEN*, short, short*, short*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(qiflush) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(raw) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_prog_mode) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(reset_shell_mode) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resetty) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ripoffline) (SCREEN*, int, int (*)(WINDOW *, int)); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(savetty) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_init) (SCREEN*, const char *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_restore) (SCREEN*, const char *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(scr_set) (SCREEN*, const char *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attroff) (SCREEN*, const chtype); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attron) (SCREEN*, const chtype); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attrset) (SCREEN*, const chtype); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(slk_attr) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_attr_set) (SCREEN*, const attr_t, short, void*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_clear) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_color) (SCREEN*, short); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_init) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(slk_label) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_noutrefresh) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_refresh) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_restore) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_set) (SCREEN*, int, const char *, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(slk_touch) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(start_color) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(chtype) NCURSES_SP_NAME(termattrs) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(termname) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetch) (SCREEN*, int); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(use_env) (SCREEN*, bool); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidattr) (SCREEN*, chtype); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vidputs) (SCREEN*, chtype, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
#if @NCURSES_EXT_FUNCS@
extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(keybound) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(assume_default_colors) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(define_key) (SCREEN*, const char *, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(get_escdelay) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(is_term_resized) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(key_defined) (SCREEN*, const char *); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(keyok) (SCREEN*, int, bool); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(nofilter) (SCREEN*); /* implemented */ /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resize_term) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(resizeterm) (SCREEN*, int, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_escdelay) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(set_tabsize) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_default_colors) (SCREEN*); /* implemented:EXT_SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int); /* implemented:EXT_SP_FUNC */
#endif
#else
#undef NCURSES_SP_FUNCS
#define NCURSES_SP_FUNCS 0
#define NCURSES_SP_NAME(name) name
#define NCURSES_SP_OUTC NCURSES_OUTC
#endif
/* attributes */
#define NCURSES_ATTR_SHIFT 8
@ -951,7 +1097,7 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
/* It seems older SYSV curses versions define these */
#if !NCURSES_OPAQUE
#define getattrs(win) ((win) ? (win)->_attrs : A_NORMAL)
#define getattrs(win) NCURSES_CAST(int, (win) ? (win)->_attrs : A_NORMAL)
#define getcurx(win) ((win) ? (win)->_curx : ERR)
#define getcury(win) ((win) ? (win)->_cury : ERR)
#define getbegx(win) ((win) ? (win)->_begx : ERR)
@ -969,11 +1115,17 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
#define wattroff(win,at) wattr_off(win, NCURSES_CAST(attr_t, at), NULL)
#if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \
(win)->_attrs = (at))
#if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win) \
? ((win)->_color = PAIR_NUMBER(at), \
(win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#else
#define wattrset(win,at) ((win)->_attrs = (at))
#define wattrset(win,at) ((win) \
? ((win)->_attrs = NCURSES_CAST(attr_t, at), \
OK) \
: ERR)
#endif
#endif /* NCURSES_OPAQUE */
@ -1003,7 +1155,7 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
* These apply to the first 256 color pairs.
*/
#define COLOR_PAIR(n) NCURSES_BITS(n, 0)
#define PAIR_NUMBER(a) (NCURSES_CAST(int,(((a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
#define PAIR_NUMBER(a) (NCURSES_CAST(int,((NCURSES_CAST(unsigned long,a) & A_COLOR) >> NCURSES_ATTR_SHIFT)))
/*
* pseudo functions for standard screen
@ -1111,17 +1263,17 @@ extern NCURSES_EXPORT(int) wgetscrreg (const WINDOW *, int *, int *); /* generat
#define slk_attr_on(a,v) ((v) ? ERR : slk_attron(a))
#if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
#if defined(NCURSES_WIDECHAR) && @NCURSES_EXT_COLORS@
#define wattr_set(win,a,p,opts) ((win)->_attrs = ((a) & ~A_COLOR), \
(win)->_color = (p), \
OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
(void)((p) != (void *)0 && (*(p) = (win)->_color)), \
(void)((p) != (void *)0 && (*(p) = (short)(win)->_color)), \
OK)
#else
#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | COLOR_PAIR(p)), OK)
#define wattr_set(win,a,p,opts) ((win)->_attrs = (((a) & ~A_COLOR) | (attr_t)COLOR_PAIR(p)), OK)
#define wattr_get(win,a,p,opts) ((void)((a) != (void *)0 && (*(a) = (win)->_attrs)), \
(void)((p) != (void *)0 && (*(p) = PAIR_NUMBER((win)->_attrs))), \
(void)((p) != (void *)0 && (*(p) = (short)PAIR_NUMBER((win)->_attrs))), \
OK)
#endif
#endif /* NCURSES_OPAQUE */
@ -1148,16 +1300,18 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
*/
#if @NCURSES_EXT_FUNCS@
#if !NCURSES_OPAQUE
#define is_cleared(win) ((win)->_clear)
#define is_idcok(win) ((win)->_idcok)
#define is_idlok(win) ((win)->_idlok)
#define is_immedok(win) ((win)->_immed)
#define is_keypad(win) ((win)->_use_keypad)
#define is_leaveok(win) ((win)->_leaveok)
#define is_nodelay(win) ((win)->_delay == 0)
#define is_notimeout(win) ((win)->_notimeout)
#define is_scrollok(win) ((win)->_scroll)
#define is_syncok(win) ((win)->_sync)
#define is_cleared(win) ((win) ? (win)->_clear : FALSE)
#define is_idcok(win) ((win) ? (win)->_idcok : FALSE)
#define is_idlok(win) ((win) ? (win)->_idlok : FALSE)
#define is_immedok(win) ((win) ? (win)->_immed : FALSE)
#define is_keypad(win) ((win) ? (win)->_use_keypad : FALSE)
#define is_leaveok(win) ((win) ? (win)->_leaveok : FALSE)
#define is_nodelay(win) ((win) ? ((win)->_delay == 0) : FALSE)
#define is_notimeout(win) ((win) ? (win)->_notimeout : FALSE)
#define is_pad(win) ((win) ? ((win)->_flags & _ISPAD) != 0 : FALSE)
#define is_scrollok(win) ((win) ? (win)->_scroll : FALSE)
#define is_subwin(win) ((win) ? ((win)->_flags & _SUBWIN) != 0 : FALSE)
#define is_syncok(win) ((win) ? (win)->_sync : FALSE)
#define wgetparent(win) ((win) ? (win)->_parent : 0)
#define wgetscrreg(win,t,b) ((win) ? (*(t) = (win)->_regtop, *(b) = (win)->_regbottom, OK) : ERR)
#endif
@ -1173,7 +1327,7 @@ NCURSES_EXPORT(int) vsscanf(const char *, const char *, va_list);
* It gives the ESC expire time in milliseconds.
* b. ttytype is needed for backward compatibility
*/
#if @cf_cv_enable_reentrant@
#if NCURSES_REENTRANT
NCURSES_WRAPPED_VAR(WINDOW *, curscr);
NCURSES_WRAPPED_VAR(WINDOW *, newscr);

View File

@ -1,4 +1,4 @@
/* $Id: curses.tail,v 1.16 2008/07/05 20:20:38 tom Exp $ */
/* $Id: curses.tail,v 1.20 2010/03/28 19:10:55 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
@ -94,6 +94,7 @@ typedef struct
}
MEVENT;
extern NCURSES_EXPORT(bool) has_mouse(void);
extern NCURSES_EXPORT(int) getmouse (MEVENT *);
extern NCURSES_EXPORT(int) ungetmouse (MEVENT *);
extern NCURSES_EXPORT(mmask_t) mousemask (mmask_t, mmask_t *);
@ -102,6 +103,14 @@ extern NCURSES_EXPORT(int) mouseinterval (int);
extern NCURSES_EXPORT(bool) wmouse_trafo (const WINDOW*, int*, int*, bool);
extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* generated */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_mouse) (SCREEN*);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(getmouse) (SCREEN*, MEVENT *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(ungetmouse) (SCREEN*,MEVENT *);
extern NCURSES_EXPORT(mmask_t) NCURSES_SP_NAME(mousemask) (SCREEN*, mmask_t, mmask_t *);
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mouseinterval) (SCREEN*, int);
#endif
#define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
/* other non-XSI functions */
@ -109,6 +118,11 @@ extern NCURSES_EXPORT(bool) mouse_trafo (int*, int*, bool); /* gene
extern NCURSES_EXPORT(int) mcprint (char *, int); /* direct data to printer */
extern NCURSES_EXPORT(int) has_key (int); /* do we have given key? */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(has_key) (SCREEN*, int); /* do we have given key? */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (SCREEN*, char *, int); /* direct data to printer */
#endif
/* Debugging : use with libncurses_g.a */
extern NCURSES_EXPORT(void) _tracef (const char *, ...) GCC_PRINTFLIKE(1,2);
@ -119,7 +133,7 @@ extern NCURSES_EXPORT(char *) _nc_tracebits (void);
extern NCURSES_EXPORT(char *) _tracechar (int);
extern NCURSES_EXPORT(char *) _tracechtype (chtype);
extern NCURSES_EXPORT(char *) _tracechtype2 (int, chtype);
#ifdef _XOPEN_SOURCE_EXTENDED
#ifdef NCURSES_WIDECHAR
#define _tracech_t _tracecchar_t
extern NCURSES_EXPORT(char *) _tracecchar_t (const cchar_t *);
#define _tracech_t2 _tracecchar_t2
@ -160,6 +174,8 @@ extern NCURSES_EXPORT(const char *) _nc_visbuf (const char *);
#define OPTIMIZE_ALL 0xff /* enable all optimizations (dflt) */
#endif
#include <unctrl.h>
#ifdef __cplusplus
#ifndef NCURSES_NOMACROS

View File

@ -1,10 +1,12 @@
/* $Id: curses.wide,v 1.34 2007/03/10 17:52:23 tom Exp $ */
/* $Id: curses.wide,v 1.42 2010/03/30 00:39:41 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
#ifdef _XOPEN_SOURCE_EXTENDED
#define _XOPEN_CURSES 1
#ifdef NCURSES_WIDECHAR
extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
@ -60,6 +62,56 @@ extern NCURSES_EXPORT_VAR(cchar_t *) _nc_wacs;
#define WACS_NEQUAL NCURSES_WACS('|') /* not equal */
#define WACS_STERLING NCURSES_WACS('}') /* UK pound sign */
/* double lines */
#define WACS_BDDB NCURSES_WACS('C')
#define WACS_DDBB NCURSES_WACS('D')
#define WACS_BBDD NCURSES_WACS('B')
#define WACS_DBBD NCURSES_WACS('A')
#define WACS_DBDD NCURSES_WACS('G')
#define WACS_DDDB NCURSES_WACS('F')
#define WACS_DDBD NCURSES_WACS('H')
#define WACS_BDDD NCURSES_WACS('I')
#define WACS_BDBD NCURSES_WACS('R')
#define WACS_DBDB NCURSES_WACS('Y')
#define WACS_DDDD NCURSES_WACS('E')
#define WACS_D_ULCORNER WACS_BDDB
#define WACS_D_LLCORNER WACS_DDBB
#define WACS_D_URCORNER WACS_BBDD
#define WACS_D_LRCORNER WACS_DBBD
#define WACS_D_RTEE WACS_DBDD
#define WACS_D_LTEE WACS_DDDB
#define WACS_D_BTEE WACS_DDBD
#define WACS_D_TTEE WACS_BDDD
#define WACS_D_HLINE WACS_BDBD
#define WACS_D_VLINE WACS_DBDB
#define WACS_D_PLUS WACS_DDDD
/* thick lines */
#define WACS_BTTB NCURSES_WACS('L')
#define WACS_TTBB NCURSES_WACS('M')
#define WACS_BBTT NCURSES_WACS('K')
#define WACS_TBBT NCURSES_WACS('J')
#define WACS_TBTT NCURSES_WACS('U')
#define WACS_TTTB NCURSES_WACS('T')
#define WACS_TTBT NCURSES_WACS('V')
#define WACS_BTTT NCURSES_WACS('W')
#define WACS_BTBT NCURSES_WACS('Q')
#define WACS_TBTB NCURSES_WACS('X')
#define WACS_TTTT NCURSES_WACS('N')
#define WACS_T_ULCORNER WACS_BTTB
#define WACS_T_LLCORNER WACS_TTBB
#define WACS_T_URCORNER WACS_BBTT
#define WACS_T_LRCORNER WACS_TBBT
#define WACS_T_RTEE WACS_TBTT
#define WACS_T_LTEE WACS_TTTB
#define WACS_T_BTEE WACS_TTBT
#define WACS_T_TTEE WACS_BTTT
#define WACS_T_HLINE WACS_BTBT
#define WACS_T_VLINE WACS_TBTB
#define WACS_T_PLUS WACS_TTTT
/*
* Function prototypes for wide-character operations.
*
@ -138,7 +190,7 @@ extern NCURSES_EXPORT(int) slk_wset (int, const wchar_t *, int); /* implemented
extern NCURSES_EXPORT(attr_t) term_attrs (void); /* implemented */
extern NCURSES_EXPORT(int) unget_wch (const wchar_t); /* implemented */
extern NCURSES_EXPORT(int) vid_attr (attr_t, short, void *); /* implemented */
extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, int (*)(int)); /* implemented */
extern NCURSES_EXPORT(int) vid_puts (attr_t, short, void *, NCURSES_OUTC); /* implemented */
extern NCURSES_EXPORT(int) vline_set (const cchar_t *, int); /* generated:WIDEC */
extern NCURSES_EXPORT(int) wadd_wch (WINDOW *,const cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wadd_wchnstr (WINDOW *,const cchar_t *,int); /* implemented */
@ -165,6 +217,14 @@ extern NCURSES_EXPORT(int) winwstr (WINDOW *, wchar_t *); /* implemented */
extern NCURSES_EXPORT(wchar_t*) wunctrl (cchar_t *); /* implemented */
extern NCURSES_EXPORT(int) wvline_set (WINDOW *, const cchar_t *, int); /* implemented */
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(attr_t) NCURSES_SP_NAME(term_attrs) (SCREEN*); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(unget_wch) (SCREEN*, const wchar_t); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(wchar_t*) NCURSES_SP_NAME(wunctrl) (SCREEN*, cchar_t *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_attr) (SCREEN*, attr_t, short, void *); /* implemented:SP_FUNC */
extern NCURSES_EXPORT(int) NCURSES_SP_NAME(vid_puts) (SCREEN*, attr_t, short, void *, NCURSES_SP_OUTC); /* implemented:SP_FUNC */
#endif
#ifndef NCURSES_NOMACROS
/*
@ -249,4 +309,4 @@ extern NCURSES_EXPORT(const char *) _nc_viswbuf(const wchar_t *);
extern NCURSES_EXPORT(const char *) _nc_viswibuf(const wint_t *);
#endif
#endif /* _XOPEN_SOURCE_EXTENDED */
#endif /* NCURSES_WIDECHAR */

View File

@ -1,6 +1,6 @@
# $Id: headers,v 1.9 2007/01/20 19:57:04 Miroslav.Lichvar Exp $
# $Id: headers,v 1.10 2009/09/05 17:46:30 tom Exp $
##############################################################################
# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
# Copyright (c) 1998-2007,2009 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"), #
@ -33,7 +33,7 @@ term.h
curses.h
unctrl.h
termcap.h
$(srcdir)/ncurses_dll.h
ncurses_dll.h
@ ticlib
$(srcdir)/tic.h
$(srcdir)/term_entry.h

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -29,7 +29,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.16 2008/09/27 22:30:33 tom Exp $ */
/* $Id: nc_alloc.h,v 1.18 2010/11/20 22:59:49 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@ -38,7 +38,7 @@
extern "C" {
#endif
#if HAVE_LIBDMALLOC
#if defined(HAVE_LIBDMALLOC) && HAVE_LIBDMALLOC
#include <string.h>
#undef strndup /* workaround for #define in GLIBC 2.7 */
#include <dmalloc.h> /* Gray Watson's library */
@ -47,14 +47,14 @@ extern "C" {
#define HAVE_LIBDMALLOC 0
#endif
#if HAVE_LIBDBMALLOC
#if defined(HAVE_LIBDBMALLOC) && HAVE_LIBDBMALLOC
#include <dbmalloc.h> /* Conor Cahill's library */
#else
#undef HAVE_LIBDBMALLOC
#define HAVE_LIBDBMALLOC 0
#endif
#if HAVE_LIBMPATROL
#if defined(HAVE_LIBMPATROL) && HAVE_LIBMPATROL
#include <mpatrol.h> /* Memory-Patrol library */
#else
#undef HAVE_LIBMPATROL
@ -74,9 +74,15 @@ extern NCURSES_EXPORT(void) _nc_free_tic(int) GCC_NORETURN;
extern NCURSES_EXPORT(void) _nc_free_tparm(void);
extern NCURSES_EXPORT(void) _nc_leaks_dump_entry(void);
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
#define ExitProgram(code) _nc_free_and_exit(code)
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_free_and_exit)(SCREEN*, int) GCC_NORETURN;
#endif
#define ExitProgram(code) _nc_free_and_exit(code)
#endif /* NO_LEAKS, etc */
#ifndef HAVE_NC_FREEALL
#define HAVE_NC_FREEALL 0
#endif

View File

@ -0,0 +1,69 @@
/****************************************************************************
* Copyright (c) 2008-2009,2010 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 Dickey, 2008-on *
* *
****************************************************************************/
/* $Id: nc_mingw.h,v 1.3 2010/09/25 22:16:12 juergen Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
#ifdef WINVER
# if WINVER < 0x0501
# error WINVER must at least be 0x0501
# endif
#else
# define WINVER 0x0501
#endif
#include <windows.h>
#undef sleep
#define sleep(n) Sleep((n) * 1000)
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#include <sys/time.h> /* for struct timeval */
extern int _nc_gettimeofday(struct timeval *, void *);
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
#define SIGHUP 1
#define SIGKILL 9
#define getlogin() "username"
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth(ucs)
extern int _nc_wcwidth(wchar_t);
#endif /* NC_MINGW_H */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2000,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,2009 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,9 +31,8 @@
* and: Thomas E. Dickey *
****************************************************************************/
/*
* $Id: nc_panel.h,v 1.5 2008/08/04 18:26:46 tom Exp $
* $Id: nc_panel.h,v 1.7 2009/07/04 18:20:02 tom Exp $
*
* nc_panel.h
*
@ -45,22 +44,30 @@
#define NC_PANEL_H 1
#ifdef __cplusplus
extern "C" {
extern "C"
{
#endif
struct panel; /* Forward Declaration */
struct panel; /* Forward Declaration */
struct panelhook {
struct panel* top_panel;
struct panel* bottom_panel;
struct panel* stdscr_pseudo_panel;
struct panelhook
{
struct panel *top_panel;
struct panel *bottom_panel;
struct panel *stdscr_pseudo_panel;
#if NO_LEAKS
int (*destroy)(struct panel *);
int (*destroy) (struct panel *);
#endif
};
};
/* Retrieve the panelhook of the current screen */
extern NCURSES_EXPORT(struct panelhook*) _nc_panelhook (void);
struct screen; /* Forward declaration */
/* Retrieve the panelhook of the specified screen */
extern NCURSES_EXPORT(struct panelhook *)
_nc_panelhook (void);
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(struct panelhook *)
NCURSES_SP_NAME(_nc_panelhook) (SCREEN *);
#endif
#ifdef __cplusplus
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 2006 Free Software Foundation, Inc. *
* Copyright (c) 2006,2010 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 *
@ -30,13 +30,19 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
/* $Id: nc_tparm.h,v 1.4 2006/11/26 00:49:25 tom Exp $ */
/* $Id: nc_tparm.h,v 1.5 2010/12/25 20:27:22 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
/*
* Cast parameters past the formatting-string for tparm() to match the
* assumption of the varargs code.
*/
#ifndef TPARM_ARG
#define TPARM_ARG long
#endif
#define TPARM_N(n) (TPARM_ARG)(n)
#define TPARM_9(a,b,c,d,e,f,g,h,i,j) tparm(a,TPARM_N(b),TPARM_N(c),TPARM_N(d),TPARM_N(e),TPARM_N(f),TPARM_N(g),TPARM_N(h),TPARM_N(i),TPARM_N(j))
@ -63,3 +69,5 @@
#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_0(a) TPARM_1(a,0)
#endif
#endif /* NC_TPARM_included */

View File

@ -1,6 +1,6 @@
# $Id: ncurses_defs,v 1.40 2008/09/06 15:57:41 tom Exp $
# $Id: ncurses_defs,v 1.46 2011/03/22 09:17:59 tom Exp $
##############################################################################
# Copyright (c) 2000-2007,2008 Free Software Foundation, Inc. #
# Copyright (c) 2000-2010,2011 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"), #
@ -85,6 +85,7 @@ HAVE_LIMITS_H
HAVE_LINK
HAVE_LOCALE_H
HAVE_LONG_FILE_NAMES
HAVE_MATH_H
HAVE_MBLEN
HAVE_MBRLEN
HAVE_MBRTOWC
@ -110,11 +111,13 @@ HAVE_REMOVE
HAVE_RESIZETERM
HAVE_RESIZE_TERM
HAVE_RIPOFFLINE 1
HAVE_SCR_DUMP 1
HAVE_SELECT
HAVE_SETBUF
HAVE_SETBUFFER
HAVE_SETUPTERM 1
HAVE_SETVBUF
HAVE_SGTTY_H
HAVE_SIGACTION
HAVE_SIGVEC
HAVE_SIZECHANGE
@ -139,6 +142,7 @@ HAVE_TERMATTRS 1
HAVE_TERMIOS_H
HAVE_TERMIO_H
HAVE_TERMNAME 1
HAVE_TERM_ENTRY_H 1
HAVE_TERM_H 1
HAVE_TGETENT 1
HAVE_TIGETNUM 1
@ -163,6 +167,7 @@ HAVE_WCTYPE_H
HAVE_WINSSTR 1
HAVE_WORKING_POLL
HAVE_WRESIZE
HAVE_WSYNCDOWN 1
HAVE__DOSCAN
MIXEDCASE_FILENAMES
NCURSES_CHAR_EQ
@ -171,7 +176,6 @@ NCURSES_EXT_COLORS
NCURSES_EXT_FUNCS
NCURSES_NO_PADDING
NCURSES_PATHSEP ':'
NDEBUG
NEED_PTEM_H
NO_LEAKS
PURE_TERMINFO
@ -195,6 +199,7 @@ USE_HOME_TERMINFO
USE_LINKS
USE_MY_MEMMOVE
USE_OK_BCOPY
USE_PTHREADS_EINTR
USE_RCS_IDS
USE_REENTRANT
USE_SAFE_SPRINTF

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2009 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 *
@ -25,11 +25,18 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h,v 1.6 2007/03/10 19:21:49 tom Exp $ */
/* $Id: ncurses_dll.h.in,v 1.8 2009/04/04 22:26:27 tom Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
*/
#define NCURSES_PUBLIC_VAR(name) @NCURSES_WRAP_PREFIX@##name
#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
/* no longer needed on cygwin or mingw, thanks to auto-import */
/* but this structure may be useful at some point for an MSVC build */
/* so, for now unconditionally define the important flags */
@ -37,7 +44,7 @@
#undef NCURSES_DLL
#define NCURSES_STATIC
#if defined(__CYGWIN__)
#if defined(__CYGWIN__) || defined(__MINGW32__)
# if defined(NCURSES_DLL)
# if defined(NCURSES_STATIC)
# undef NCURSES_STATIC
@ -76,11 +83,4 @@
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
#endif
/*
* For reentrant code, we map the various global variables into SCREEN by
* using functions to access them.
*/
#define NCURSES_PUBLIC_VAR(name) _nc_##name
#define NCURSES_WRAPPED_VAR(type,name) extern type NCURSES_PUBLIC_VAR(name)(void)
#endif /* NCURSES_DLL_H_incl */

View File

@ -0,0 +1,164 @@
/****************************************************************************
* Copyright (c) 1998-2007,2008 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, 2008-on *
* *
****************************************************************************/
/* $Id: ncurses_mingw.h,v 1.1 2008/12/14 19:22:16 juergen Exp $ */
/*
* This is a placholder up to now and describes what needs to be implemented
* to support I/O to external terminals with ncurses on the Windows OS.
*/
#if __MINGW32__
#ifndef _NC_MINGWH
#define _NC_MINGWH
#define USE_CONSOLE_DRIVER 1
#undef TERMIOS
#define TERMIOS 1
#define InvalidHandle ((TERM_HANDLE)-1)
#define InvalidConsoleHandle(s) ((s)==InvalidHandle)
typedef unsigned char cc_t;
typedef unsigned int speed_t;
typedef unsigned int tcflag_t;
#define NCCS 32
struct termios
{
tcflag_t c_iflag; /* input mode */
tcflag_t c_oflag; /* output mode */
tcflag_t c_cflag; /* control mode */
tcflag_t c_lflag; /* local mode */
cc_t c_line; /* line discipline */
cc_t c_cc[NCCS]; /* control characters */
speed_t c_ispeed; /* input speed */
speed_t c_ospeed; /* c_ospeed */
};
/* c_cc chars */
#define VINTR 0
#define VQUIT 1
#define VERASE 2
#define VKILL 3
#define VEOF 4
#define VTIME 5
#define VMIN 6
/* c_iflag bits */
#define ISTRIP 0000040
#define INLCR 0000100
#define IGNCR 0000200
#define ICRNL 0000400
#define BRKINT 0000002
#define PARMRK 0000010
#define IXON 0002000
#define IGNBRK 0000001
#define IGNPAR 0000004
#define INPCK 0000020
#define IXOFF 0010000
/* c_oflag bits */
#define OPOST 0000001
/* c_cflag bit meaning */
#define CBAUD 0010017
#define CSIZE 0000060
#define CS8 0000060
#define B0 0000000
#define B50 0000001
#define B75 0000002
#define B110 0000003
#define B134 0000004
#define B150 0000005
#define B200 0000006
#define B300 0000007
#define B600 0000010
#define B1200 0000011
#define B1800 0000012
#define B2400 0000013
#define B4800 0000014
#define B9600 0000015
#define CLOCAL 0004000
#define CREAD 0000200
#define CSTOPB 0000100
#define HUPCL 0002000
#define PARENB 0000400
#define PARODD 0001000
/* c_lflag bits */
#define ECHO 0000010
#define ECHONL 0000100
#define ISIG 0000001
#define IEXTEN 0100000
#define ICANON 0000002
#define NOFLSH 0000200
#define ECHOE 0000020
#define ECHOK 0000040
/* tcflush() */
#define TCIFLUSH 0
/* tcsetattr uses these */
#define TCSADRAIN 1
/* ioctls */
#define TCGETA 0x5405
#define TCFLSH 0x540B
#define TIOCGWINSZ 0x5413
extern int _nc_mingw_ioctl(int fd, long int request, struct termios* arg);
extern void _nc_set_term_driver(void* term);
#ifndef cfgetospeed
#define cfgetospeed(t) ((t)->c_cflag & CBAUD)
#endif
#ifndef tcsetattr
#define tcsetattr(fd, cmd, arg) _nc_mingw_ioctl(fd, cmd, arg)
#endif
#ifndef tcgetattr
#define tcgetattr(fd, arg) _nc_mingw_ioctl(fd, TCGETA, arg)
#endif
#ifndef tcflush
#define tcflush(fd, arg) _nc_mingw_ioctl(fd, TCFLSH, arg)
#endif
#undef ttyname
#define ttyname(fd) NULL
#endif
#endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2005,2008 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,2009 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 *
@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
/* $Id: term_entry.h,v 1.35 2008/08/16 16:16:03 tom Exp $ */
/* $Id: term_entry.h,v 1.37 2009/07/11 16:52:29 tom Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@ -81,12 +81,18 @@ ENTRY;
#define EXT_NAMES(tp,i,limit,index,table) table[i]
#endif
#define NUM_EXT_NAMES(tp) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
#define NUM_EXT_NAMES(tp) (unsigned) ((tp)->ext_Booleans + (tp)->ext_Numbers + (tp)->ext_Strings)
#define for_each_boolean(n,tp) for(n = 0; n < NUM_BOOLEANS(tp); n++)
#define for_each_number(n,tp) for(n = 0; n < NUM_NUMBERS(tp); n++)
#define for_each_string(n,tp) for(n = 0; n < NUM_STRINGS(tp); n++)
#if NCURSES_XNAMES
#define for_each_ext_boolean(n,tp) for(n = BOOLCOUNT; n < NUM_BOOLEANS(tp); n++)
#define for_each_ext_number(n,tp) for(n = NUMCOUNT; n < NUM_NUMBERS(tp); n++)
#define for_each_ext_string(n,tp) for(n = STRCOUNT; n < NUM_STRINGS(tp); n++)
#endif
#define ExtBoolname(tp,i,names) EXT_NAMES(tp, i, BOOLCOUNT, (i - (tp->num_Booleans - tp->ext_Booleans)), names)
#define ExtNumname(tp,i,names) EXT_NAMES(tp, i, NUMCOUNT, (i - (tp->num_Numbers - tp->ext_Numbers)) + tp->ext_Booleans, names)
#define ExtStrname(tp,i,names) EXT_NAMES(tp, i, STRCOUNT, (i - (tp->num_Strings - tp->ext_Strings)) + (tp->ext_Numbers + tp->ext_Booleans), names)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
* Copyright (c) 1998-2007,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@ -33,7 +33,7 @@
****************************************************************************/
/*
* $Id: tic.h,v 1.62 2007/08/11 16:12:43 tom Exp $
* $Id: tic.h,v 1.65 2009/08/08 17:52:46 tom Exp $
* tic.h - Global variables and structures for the terminfo
* compiler.
*/
@ -183,6 +183,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
#endif
typedef short HashValue;
/*
* The file comp_captab.c contains an array of these structures, one
* per possible capability. These are indexed by a hash table array of
@ -193,10 +195,21 @@ struct name_table_entry
{
const char *nte_name; /* name to hash on */
int nte_type; /* BOOLEAN, NUMBER or STRING */
short nte_index; /* index of associated variable in its array */
short nte_link; /* index in table of next hash, or -1 */
HashValue nte_index; /* index of associated variable in its array */
HashValue nte_link; /* index in table of next hash, or -1 */
};
/*
* Use this structure to hide differences between terminfo and termcap
* tables.
*/
typedef struct {
unsigned table_size;
const HashValue *table_data;
HashValue (*hash_of)(const char *);
int (*compare_names)(const char *, const char *);
} HashData;
struct alias
{
const char *from;
@ -205,7 +218,8 @@ struct alias
};
extern NCURSES_EXPORT(const struct name_table_entry *) _nc_get_table (bool);
extern NCURSES_EXPORT(const short *) _nc_get_hash_table (bool);
extern NCURSES_EXPORT(const HashData *) _nc_get_hash_info (bool);
extern NCURSES_EXPORT(const HashValue *) _nc_get_hash_table (bool);
extern NCURSES_EXPORT(const struct alias *) _nc_get_alias_table (bool);
#define NOTFOUND ((struct name_table_entry *) 0)
@ -244,9 +258,9 @@ extern NCURSES_EXPORT(char *) _nc_rootname (char *);
/* comp_hash.c: name lookup */
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_entry
(const char *, const short *);
(const char *, const HashValue *);
extern NCURSES_EXPORT(struct name_table_entry const *) _nc_find_type_entry
(const char *, int, const struct name_table_entry *);
(const char *, int, bool);
/* comp_scan.c: lexical analysis */
extern NCURSES_EXPORT(int) _nc_get_token (bool);

View File

@ -1,5 +1,5 @@
/****************************************************************************
* Copyright (c) 1998,2000 Free Software Foundation, Inc. *
* Copyright (c) 1998-2008,2009 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,7 +39,7 @@
* as ^?. Printable characters are displayed as is.
*/
/* $Id: unctrl.h.in,v 1.10 2001/03/24 21:53:25 tom Exp $ */
/* $Id: unctrl.h.in,v 1.11 2009/04/18 21:00:52 tom Exp $ */
#ifndef NCURSES_UNCTRL_H_incl
#define NCURSES_UNCTRL_H_incl 1
@ -56,6 +56,10 @@ extern "C" {
#undef unctrl
NCURSES_EXPORT(NCURSES_CONST char *) unctrl (chtype);
#if @NCURSES_SP_FUNCS@
NCURSES_EXPORT(NCURSES_CONST char *) NCURSES_SP_NAME(unctrl) (SCREEN*, chtype);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,57 @@
.\"***************************************************************************
.\" Copyright (c) 2010,2011 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: MKada_config.in,v 1.5 2011/03/26 14:44:51 tom Exp $
.TH ADACURSES "1" "" "" "User Commands"
.SH NAME
adacurses\-config \- helper script for AdaCurses libraries
.SH SYNOPSIS
.B adacurses\-config
[\fIoptions\fR]
.SH DESCRIPTION
This is a shell script which simplifies configuring an application to use
the AdaCurses library binding to ncurses.
.SH OPTIONS
.TP
\fB\-\-cflags\fR
echos the gnat (Ada compiler) flags needed to compile with AdaCurses.
.TP
\fB\-\-libs\fR
echos the gnat libraries needed to link with AdaCurses.
.TP
\fB\-\-version\fR
echos the release+patchdate version of the ncurses libraries used
to configure and build AdaCurses.
.TP
\fB\-\-help\fR
prints a list of the \fBadacurses\-config\fP script's options.
.SH "SEE ALSO"
\fBcurses\fR(3X)
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).

View File

@ -0,0 +1,98 @@
.\"***************************************************************************
.\" Copyright (c) 2010 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: MKncu_config.in,v 1.3 2010/03/06 22:29:17 tom Exp $
.TH @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config 1 ""
.SH NAME
@LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config \- helper script for ncurses libraries
.SH SYNOPSIS
.B @LIB_NAME@@DFT_ARG_SUFFIX@@cf_cv_abi_version@-config
[\fIoptions\fR]
.SH DESCRIPTION
This is a shell script which simplifies configuring applications against
a particular set of ncurses libraries.
.SH OPTIONS
.TP
\fB\-\-prefix\fR
echos the package\-prefix of ncurses
.TP
\fB\-\-exec\-prefix\fR
echos the executable\-prefix of ncurses
.TP
\fB\-\-cflags\fR
echos the C compiler flags needed to compile with ncurses
.TP
\fB\-\-libs\fR
echos the libraries needed to link with ncurses
.TP
\fB\-\-version\fR
echos the release+patchdate version of ncurses
.TP
\fB\-\-abi\-version\fR
echos the ABI version of ncurses
.TP
\fB\-\-mouse\-version\fR
echos the mouse\-interface version of ncurses
.TP
\fB\-\-bindir\fR
echos the directory containing ncurses programs
.TP
\fB\-\-datadir\fR
echos the directory containing ncurses data
.TP
\fB\-\-includedir\fR
echos the directory containing ncurses header files
.TP
\fB\-\-libdir\fR
echos the directory containing ncurses libraries
.TP
\fB\-\-mandir\fR
echos the directory containing ncurses manpages
.TP
\fB\-\-terminfo\fR
echos the $TERMINFO terminfo database path, e.g.,
.RS
@TERMINFO@
.RE
.TP
\fB\-\-terminfo\-dirs\fR
echos the $TERMINFO_DIRS directory list, e.g.,
.RS
@TERMINFO_DIRS@
.RE
.TP
\fB\-\-termpath\fR
echos the $TERMPATH termcap list, if support for termcap is configured.
.TP
\fB\-\-help\fR
prints this message
.SH "SEE ALSO"
\fBcurses\fR(3X)
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.41 2007/03/31 15:54:06 tom Exp $
# $Id: Makefile.in,v 1.45 2010/11/27 21:45:27 tom Exp $
##############################################################################
# Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. #
# Copyright (c) 1998-2007,2010 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"), #
@ -35,6 +35,7 @@
# the top-level MANIFEST and any man/*.renames files!
SHELL = /bin/sh
VPATH = @srcdir@
DESTDIR = @DESTDIR@
srcdir = @srcdir@
@ -52,9 +53,9 @@ depend :
tags :
$(DESTDIR)$(mandir) :
sh $(srcdir)/../mkdirs.sh $@
mkdir -p $@
EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 $(srcdir)/*.[0-9]*
EDITARGS = $(DESTDIR)$(mandir) $(srcdir) terminfo.5 *-config.1 $(srcdir)/*.[0-9]*
install install.man : terminfo.5 $(DESTDIR)$(mandir)
sh ../edit_man.sh normal installing $(EDITARGS)
@ -77,4 +78,4 @@ clean: mostlyclean
sh $(srcdir)/make_sed.sh @MANPAGE_RENAMES@ >../edit_man.sed
distclean realclean: clean
rm -f Makefile ../edit_man.* ../man_alias.*
rm -f Makefile *-config.1 ../edit_man.* ../man_alias.*

View File

@ -1,6 +1,6 @@
'\" t
.\"***************************************************************************
.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2007,2010 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,38 +27,44 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: captoinfo.1m,v 1.22 2007/06/02 20:40:07 tom Exp $
.\" $Id: captoinfo.1m,v 1.25 2010/12/04 18:36:44 tom Exp $
.TH @CAPTOINFO@ 1M ""
.ds n 5
.ds d @TERMINFO@
.SH NAME
\fB@CAPTOINFO@\fR - convert a \fItermcap\fR description into a \fIterminfo\fR description
\fB@CAPTOINFO@\fR \- convert a \fItermcap\fR description into a \fIterminfo\fR description
.SH SYNOPSIS
\fB@CAPTOINFO@\fR [\fB-v\fR\fIn\fR \fIwidth\fR] [\fB-V\fR] [\fB-1\fR] [\fB-w\fR \fIwidth\fR] \fIfile\fR . . .
\fB@CAPTOINFO@\fR [\fB\-v\fR\fIn\fR \fIwidth\fR] [\fB\-V\fR] [\fB\-1\fR] [\fB\-w\fR \fIwidth\fR] \fIfile\fR . . .
.SH DESCRIPTION
\fB@CAPTOINFO@\fR looks in \fIfile\fR for \fBtermcap\fR descriptions. For each
\fB@CAPTOINFO@\fR looks in each given text
\fIfile\fR for \fBtermcap\fR descriptions.
For each
one found, an equivalent \fBterminfo\fR description is written to standard
output. Termcap \fBtc\fR capabilities are translated directly to terminfo
output.
Termcap \fBtc\fR capabilities are translated directly to terminfo
\fBuse\fR capabilities.
.PP
If no \fIfile\fR is given, then the environment variable \fBTERMCAP\fR is used
for the filename or entry. If \fBTERMCAP\fR is a full pathname to a file, only
for the filename or entry.
If \fBTERMCAP\fR is a full pathname to a file, only
the terminal whose name is specified in the environment variable \fBTERM\fR is
extracted from that file. If the environment variable \fBTERMCAP\fR is not
extracted from that file.
If the environment variable \fBTERMCAP\fR is not
set, then the file \fB\*d\fR is read.
.TP 5
\fB-v\fR
\fB\-v\fR
print out tracing information on standard error as the program runs.
.TP 5
\fB-V\fR
\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
\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
\fB\-w\fR
change the output to \fIwidth\fR characters.
.SH FILES
.TP 20
@ -112,7 +118,8 @@ HS mh Iris enter_dim_mode
.PP
XENIX termcap also used to have a set of extension capabilities
for forms drawing, designed to take advantage of the IBM PC
high-half graphics. They were as follows:
high-half graphics.
They were as follows:
.PP
.TS H
c c
@ -145,11 +152,13 @@ GG acs magic cookie count
.TE
.PP
If the single-line capabilities occur in an entry, they will automatically
be composed into an \fIacsc\fR string. The double-line capabilities and
be composed into an \fIacsc\fR string.
The double-line capabilities and
\fBGG\fR are discarded with a warning message.
.PP
IBM's AIX has a terminfo facility descended from SVr1 terminfo but incompatible
with the SVr4 format. The following AIX extensions are automatically
with the SVr4 format.
The following AIX extensions are automatically
translated:
.TS
c c
@ -171,11 +180,12 @@ Hewlett-Packard's terminfo library supports two nonstandard terminfo
capabilities \fImeml\fR (memory lock) and \fImemu\fR (memory unlock).
These will be discarded with a warning message.
.SH NOTES
This utility is actually a link to \fB@TIC@\fR(1M), running in \fI-I\fR mode.
You can use other \fB@TIC@\fR options such as \fB-f\fR and \fB-x\fR.
This utility is actually a link to \fB@TIC@\fR(1M), running in \fI\-I\fR mode.
You can use other \fB@TIC@\fR options such as \fB\-f\fR and \fB\-x\fR.
.PP
The trace option is not identical to SVr4's. Under SVr4, instead of following
the \fB-v\fR with a trace level n, you repeat it n times.
The trace option is not identical to SVr4's.
Under SVr4, instead of following
the \fB\-v\fR with a trace level n, you repeat it n times.
.SH SEE ALSO
\fB@INFOCMP@\fR(1M),
\fBcurses\fR(3X),
@ -185,9 +195,6 @@ This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.SH AUTHOR
Eric S. Raymond <esr@snark.thyrsus.com>
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:
and
.br
Thomas E. Dickey <dickey@invisible-island.net>

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2000,2006 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2006,2010 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,11 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: clear.1,v 1.6 2006/12/24 18:07:53 tom Exp $
.\" $Id: clear.1,v 1.8 2010/12/04 18:36:44 tom Exp $
.TH @CLEAR@ 1 ""
.ds n 5
.SH NAME
\fB@CLEAR@\fR - clear the terminal screen
\fB@CLEAR@\fR \- clear the terminal screen
.SH SYNOPSIS
\fB@CLEAR@\fR
.br
@ -45,9 +45,3 @@ figure out how to clear the screen.
.PP
This describes \fBncurses\fR
version @NCURSES_MAJOR@.@NCURSES_MINOR@ (patch @NCURSES_PATCH@).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2001-2002,2006 Free Software Foundation, Inc. *
.\" Copyright (c) 2001-2010,2011 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,18 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wch.3x,v 1.6 2006/12/24 15:22:22 tom Exp $
.\" $Id: curs_add_wch.3x,v 1.14 2011/01/15 15:27:43 tom Exp $
.TH curs_add_wch 3X ""
.de bP
.IP \(bu 4
..
.SH NAME
\fBadd_wch\fP,
\fBwadd_wch\fP,
\fBmvadd_wch\fP,
\fBmvwadd_wch\fP,
\fBecho_wchar\fP,
\fBwecho_wchar\fP - add a complex character and rendition to a \fBcurses\fR window, then advance the cursor
\fBwecho_wchar\fP \- add a complex character and rendition to a \fBcurses\fR window, then advance the cursor
.SH SYNOPSIS
.PP
\fB#include <curses.h>\fP
@ -63,23 +66,20 @@ window at its current position,
which is then advanced.
These functions perform
wrapping and special-character processing as follows:
.TP 5
-
.bP
If \fIwch\fP refers to a spacing character,
then any previous character at that location is removed.
A new character specified by \fIwch\fP is
placed at that location with rendition specified by \fIwch\fP.
The cursor then advances to
the next spacing character on the screen.
.TP 5
-
.bP
If \fIwch\fP refers to a non-spacing character,
all previous characters at that location are preserved.
The non-spacing characters of \fIwch\fP
are added to the spacing complex character,
and the rendition specified by \fIwch\fP is ignored.
.TP 5
-
.bP
If the character part of \fIwch\fP is
a tab, newline, backspace or other control character,
the window is updated and the cursor moves as if \fBaddch\fR were called.
@ -99,9 +99,90 @@ The knowledge
that only a single character is being output is taken into consideration and,
for non-control characters, a considerable performance gain might be seen
by using the *\fBecho\fP* functions instead of their equivalents.
.SS Line Graphics
Like \fBaddch\fP(3X),
\fBaddch_wch\fP accepts symbols which make it simple to draw lines and other
frequently used special characters.
These symbols correspond to the same VT100 line-drawing set as
\fBaddch\fP(3X).
.PP
.TS
l l l l
_ _ _ _
lw(1.5i) lw7 lw7 lw20.
\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
WACS_BLOCK 0x25ae # solid square block
WACS_BOARD 0x2592 # board of squares
WACS_BTEE 0x2534 + bottom tee
WACS_BULLET 0x00b7 o bullet
WACS_CKBOARD 0x2592 : checker board (stipple)
WACS_DARROW 0x2193 v arrow pointing down
WACS_DEGREE 0x00b0 ' degree symbol
WACS_DIAMOND 0x25c6 + diamond
WACS_GEQUAL 0x2265 > greater-than-or-equal-to
WACS_HLINE 0x2500 \- horizontal line
WACS_LANTERN 0x2603 # lantern symbol
WACS_LARROW 0x2190 < arrow pointing left
WACS_LEQUAL 0x2264 < less-than-or-equal-to
WACS_LLCORNER 0x2514 + lower left-hand corner
WACS_LRCORNER 0x2518 + lower right-hand corner
WACS_LTEE 0x2524 + left tee
WACS_NEQUAL 0x2260 ! not-equal
WACS_PI 0x03c0 * greek pi
WACS_PLMINUS 0x00b1 # plus/minus
WACS_PLUS 0x253c + plus
WACS_RARROW 0x2192 > arrow pointing right
WACS_RTEE 0x251c + right tee
WACS_S1 0x23ba \- scan line 1
WACS_S3 0x23bb \- scan line 3
WACS_S7 0x23bc \- scan line 7
WACS_S9 0x23bd \&_ scan line 9
WACS_STERLING 0x00a3 f pound-sterling symbol
WACS_TTEE 0x252c + top tee
WACS_UARROW 0x2191 ^ arrow pointing up
WACS_ULCORNER 0x250c + upper left-hand corner
WACS_URCORNER 0x2510 + upper right-hand corner
WACS_VLINE 0x2502 | vertical line
.TE
.PP
The wide-character configuration of ncurses also defines symbols
for thick- and double-lines:
.PP
.TS
l l l l
_ _ _ _
lw(1.5i) lw7 lw7 lw20.
\fIName\fR \fIUnicode\fP \fIDefault\fR \fIDescription\fR
WACS_T_ULCORNER 0x250f + thick upper left corner
WACS_T_LLCORNER 0x2517 + thick lower left corner
WACS_T_URCORNER 0x2513 + thick upper right corner
WACS_T_LRCORNER 0x251b + thick lower right corner
WACS_T_LTEE 0x252b + thick tee pointing right
WACS_T_RTEE 0x2523 + thick tee pointing left
WACS_T_BTEE 0x253b + thick tee pointing up
WACS_T_TTEE 0x2533 + thick tee pointing down
WACS_T_HLINE 0x2501 - thick horizontal line
WACS_T_VLINE 0x2503 | thick vertical line
WACS_T_PLUS 0x254b + thick large plus or crossover
WACS_D_ULCORNER 0x2554 + double upper left corner
WACS_D_LLCORNER 0x255a + double lower left corner
WACS_D_URCORNER 0x2557 + double upper right corner
WACS_D_LRCORNER 0x255d + double lower right corner
WACS_D_RTEE 0x2563 + double tee pointing left
WACS_D_LTEE 0x2560 + double tee pointing right
WACS_D_BTEE 0x2569 + double tee pointing up
WACS_D_TTEE 0x2566 + double tee pointing down
WACS_D_HLINE 0x2550 - double horizontal line
WACS_D_VLINE 0x2551 | double vertical line
WACS_D_PLUS 0x256c + double large plus or crossover
.TE
.SH RETURN VALUES
.PP
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
.PP
Note that
@ -112,12 +193,26 @@ Note that
may be macros.
.SH PORTABILITY
.PP
All these functions are described in the XSI Curses standard, Issue 4.
The defaults specified for forms-drawing characters apply in the POSIX locale.
All of these functions are described in the XSI Curses standard, Issue 4.
The defaults specified for line-drawing characters apply in the POSIX locale.
.PP
XSI documents constants beginning with \fBWACS_\fP which are used for
line-drawing.
Those are not currently implemented in \fBncurses\fP.
X/Open Curses makes it clear that the WACS_ symbols should be defined as
a pointer to \fBcchar_t\fP data, e.g., in the discussion of \fBborder_set\fR.
A few implementations are problematic:
.bP
NetBSD curses defines the symbols as a \fBwchar_t\fP within a \fBcchar_t\fP.
.bP
HPUX curses equates some of the \fIACS_\fP symbols
to the analogous \fIWACS_\fP symbols as if the \fIACS_\fP symbols were
wide characters.
The misdefined symbols are the arrows
and other symbols which are not used for line-drawing.
.PP
X/Open Curses does not define symbols for thick- or double-lines.
SVr4 curses implementations defined their line-drawing symbols in
terms of intermediate symbols.
This implementation extends those symbols, providing new definitions
which are not in the SVr4 implementations.
.SH SEE ALSO
.PP
\fBcurses\fR(3X),
@ -127,9 +222,3 @@ Those are not currently implemented in \fBncurses\fP.
\fBcurs_outopts\fR(3X),
\fBcurs_refresh\fR(3X),
\fBputwc\fR(3)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2004,2005 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wchstr.3x,v 1.6 2005/01/02 01:28:49 tom Exp $
.\" $Id: curs_add_wchstr.3x,v 1.9 2010/12/04 18:36:44 tom Exp $
.TH curs_add_wchstr 3X ""
.SH NAME
\fBadd_wchstr\fR,
@ -62,7 +62,7 @@ These routines copy the array of complex characters \fIwchstr\fR
into the window image structure at and after the current cursor position.
The four routines with \fIn\fR as the last
argument copy at most \fIn\fR elements, but no more than will fit on the line.
If \fBn\fR=\fB-1\fR then the whole array is copied,
If \fBn\fR=\fB\-1\fR then the whole array is copied,
to the maximum number of characters that will fit on the line.
.PP
The window cursor is \fInot\fR advanced.
@ -83,15 +83,13 @@ the remaining columns are filled with the background character and rendition.
All functions except \fBwadd_wchnstr\fR may be macros.
.SH RETURN VALUES
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH PORTABILITY
All these entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_addchstr\fR(3X),
\fBcurs_addwstr\fR(3X)
.\"#
.\"# 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-2006,2007 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2010,2011 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_addch.3x,v 1.27 2007/06/02 20:40:07 tom Exp $
.\" $Id: curs_addch.3x,v 1.32 2011/01/15 14:15:10 tom Exp $
.TH curs_addch 3X ""
.SH NAME
\fBaddch\fR, \fBwaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR,
\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
\fBwechochar\fR \- add a character (with attributes) to a \fBcurses\fR window, then advance the cursor
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
@ -105,7 +108,7 @@ ACS_DARROW v arrow pointing down
ACS_DEGREE ' degree symbol
ACS_DIAMOND + diamond
ACS_GEQUAL > greater-than-or-equal-to
ACS_HLINE - horizontal line
ACS_HLINE \- horizontal line
ACS_LANTERN # lantern symbol
ACS_LARROW < arrow pointing left
ACS_LEQUAL < less-than-or-equal-to
@ -118,9 +121,9 @@ ACS_PLMINUS # plus/minus
ACS_PLUS + plus
ACS_RARROW > arrow pointing right
ACS_RTEE + right tee
ACS_S1 - scan line 1
ACS_S3 - scan line 3
ACS_S7 - scan line 7
ACS_S1 \- scan line 1
ACS_S3 \- scan line 3
ACS_S7 \- scan line 7
ACS_S9 \&_ scan line 9
ACS_STERLING f pound-sterling symbol
ACS_TTEE + top tee
@ -134,6 +137,10 @@ All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success
(the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon
successful completion, unless otherwise noted in the preceding routine
descriptions.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
\fBechochar\fR may be macros.
@ -141,6 +148,10 @@ Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
All these functions are described in the XSI Curses standard, Issue 4.
The defaults specified for forms-drawing characters apply in the POSIX locale.
.LP
X/Open Curses states that the \fIACS_\fP definitions are \fBchar\fP constants.
For the wide-character implementation (see \fBcurs_add_wch\fP),
there are analogous \fIWACS_\fP definitions which are \fBcchar_t\fP constants.
.LP
Some ACS symbols
(ACS_S3,
ACS_S7,
@ -168,14 +179,9 @@ This is true of other implementations, but is not documented.
\fBcurs_inch\fR(3X),
\fBcurs_outopts\fR(3X),
\fBcurs_refresh\fR(3X),
\fBcurs_variables\fR(3X),
\fBputc\fR(3).
.PP
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_add_wch\fR(3X).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addchstr.3x,v 1.12 2006/12/02 17:02:45 tom Exp $
.\" $Id: curs_addchstr.3x,v 1.15 2010/12/04 18:36:44 tom Exp $
.TH curs_addchstr 3X ""
.na
.hy 0
@ -38,7 +38,7 @@
\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
.ad
.hy
.SH SYNOPSIS
@ -63,7 +63,7 @@
These routines copy \fIchstr\fR into the window image structure at and after
the current cursor position. The four routines with \fIn\fR as the last
argument copy at most \fIn\fR elements, but no more than will fit on the line.
If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of
If \fBn\fR=\fB\-1\fR then the whole string is copied, to the maximum number of
characters that will fit on the line.
.PP
The window cursor is \fInot\fR advanced, and these routines work faster than
@ -81,6 +81,10 @@ descriptions.
X/Open does not define any error conditions.
This implementation returns an error
if the window pointer is null.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
Note that all routines except \fBwaddchnstr\fR may be macros.
.SH PORTABILITY
@ -91,9 +95,3 @@ These entry points are described in the XSI Curses standard, Issue 4.
Comparable functions in the wide-character (ncursesw) library are
described in
\fBcurs_add_wchstr\fR(3X).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
.\" Copyright (c) 1998-2005,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addstr.3x,v 1.13 2005/05/15 16:17:14 tom Exp $
.\" $Id: curs_addstr.3x,v 1.16 2010/12/04 18:36:44 tom Exp $
.TH curs_addstr 3X ""
.na
.hy 0
@ -38,7 +38,7 @@
\fBmvaddstr\fR,
\fBmvaddnstr\fR,
\fBmvwaddstr\fR,
\fBmvwaddnstr\fR - add a string of characters to a \fBcurses\fR window and advance cursor
\fBmvwaddnstr\fR \- add a string of characters to a \fBcurses\fR window and advance cursor
.ad
.hy
.SH SYNOPSIS
@ -67,7 +67,7 @@ These routines write the characters of the (null-terminated) character string
It is similar to calling \fBwaddch\fR once for each character in the string.
The four routines with \fIn\fR as the last argument
write at most \fIn\fR characters.
If \fIn\fR is -1, then the entire string will be added,
If \fIn\fR is \-1, then the entire string will be added,
up to the maximum number of characters that will fit on the line,
or until a terminating null is reached.
.SH RETURN VALUE
@ -80,6 +80,10 @@ This implementation returns an error
if the window pointer is null or
if the string pointer is null or
if the corresponding calls to \fBwaddch\fP return an error.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
Note that all of these routines except \fBwaddstr\fR and \fBwaddnstr\fR may be
macros.
@ -89,9 +93,3 @@ XSI errors EILSEQ and EOVERFLOW, associated with extended-level conformance,
are not yet detected.
.SH SEE ALSO
\fBcurses\fR(3X), \fBcurs_addch\fR(3X).
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

View File

@ -1,5 +1,5 @@
.\"***************************************************************************
.\" Copyright (c) 2002-2005,2006 Free Software Foundation, Inc. *
.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" copy of this software and associated documentation files (the *
@ -26,7 +26,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addwstr.3x,v 1.7 2006/02/25 20:59:08 tom Exp $
.\" $Id: curs_addwstr.3x,v 1.10 2010/12/04 18:36:44 tom Exp $
.TH curs_addwstr 3X ""
.na
.hy 0
@ -74,11 +74,15 @@ Thereafter, the cursor is advanced as a side-effect of writing to the window.
.PP
The four routines with \fIn\fR as the last argument
write at most \fIn\fR \fBwchar_t\fR characters.
If \fIn\fR is -1, then the entire string will be added,
If \fIn\fR is \-1, then the entire string will be added,
up to the maximum number of characters that will fit on the line,
or until a terminating null is reached.
.SH RETURN VALUES
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
.PP
Functions with a "mv" prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
Note that all of these routines except \fBwaddnwstr\fR may be macros.
.SH PORTABILITY
@ -86,9 +90,3 @@ All these entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_add_wch\fR(3X)
.\"#
.\"# The following sets edit modes for GNU EMACS
.\"# Local Variables:
.\"# mode:nroff
.\"# fill-column:79
.\"# End:

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