ncurses: import version 6.2-20210220

This commit is contained in:
Baptiste Daroussin 2021-02-25 19:26:18 +01:00
commit 7a65641922
345 changed files with 20292 additions and 10406 deletions

View File

@ -1,4 +1,4 @@
Copyright 2018-2019,2020 Thomas E. Dickey
Copyright 2018-2020,2021 Thomas E. Dickey
Copyright 1998-2017,2018 Free Software Foundation, Inc.
Permission is hereby granted, free of charge, to any person obtaining a
@ -26,4 +26,4 @@ sale, use or other dealings in this Software without prior written
authorization.
-- vile:txtmode fc=72
-- $Id: COPYING,v 1.9 2020/02/08 13:34:12 tom Exp $
-- $Id: COPYING,v 1.10 2021/01/01 09:54:30 tom Exp $

View File

@ -26,7 +26,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: INSTALL,v 1.217 2020/02/15 13:39:30 tom Exp $
-- $Id: INSTALL,v 1.226 2020/09/06 23:41:16 tom Exp $
---------------------------------------------------------------------
How to install Ncurses/Terminfo on your system
---------------------------------------------------------------------
@ -41,7 +41,7 @@ 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 distribution integrator or packager, please read and act on the
section titled IF YOU ARE A SYSTEM INTEGRATOR below.
section titled FOR SYSTEM INTEGRATORS below.
If you are converting from BSD curses and do not have root access, be sure
to read the BSD CONVERSION NOTES section below.
@ -49,11 +49,7 @@ to read the BSD CONVERSION NOTES section below.
If you are trying to build applications using gpm with ncurses,
read the USING NCURSES WITH GPM section below.
If you are running over the Andrew File System see the note below on
USING NCURSES WITH AFS.
If you are cross-compiling, see the note below on BUILDING NCURSES WITH A
CROSS-COMPILER.
If you are cross-compiling, see the note below on BUILDING WITH A CROSS-COMPILER.
If you want to build the Ada95 binding, go to the Ada95 directory and
follow the instructions there. The Ada95 binding is not covered below.
@ -270,8 +266,8 @@ INSTALLATION PROCEDURE:
YOU MAY NOT BE ABLE TO COMPILE (OR RUN) NCURSES APPLICATIONS WITH C++.
SUMMARY OF CONFIGURE OPTIONS:
----------------------------
CONFIGURE OPTIONS:
-----------------
The configure script provides a short list of its options when you type
@ -439,6 +435,31 @@ SUMMARY OF CONFIGURE OPTIONS:
Without some special effort, it will either fail to compile at all,
or the compiler may find a different unctrl.h file.
In addition to the curses library, a system may provide its own
versions of the add-on libraries (form, menu, panel), which would
not be compatible with ncurses. These options allow you to rename
ncurses' add-on libraries to avoid conflicts when linking:
--with-form-libname=XXX
--with-menu-libname=XXX
--with-panel-libname=XXX
Rather than renaming them abitrarily, a prefix or suffix is
recommended. An "n" prefix provides consistency with ncurses versus
curses, i.e.,
--with-form-libname=nform
--with-menu-libname=nmenu
--with-panel-libname=npanel
--disable-pkg-ldflags
Omit options in $EXTRA_LDFLAGS from the pkg-config ".pc" and
corresponding ncurses*-config script which normally are listed via
the "--libs" option. These options are normally used to facilitate
linking to ncurses when it was configured to use the rpath feature.
See also --enable-rpath and --disable-rpath-hack.
--disable-relink
If --enable-rpath is given, the generated makefiles normally will
rebuild shared libraries during install. Use this option to simply
@ -561,6 +582,9 @@ SUMMARY OF CONFIGURE OPTIONS:
For testing, generate functions for certain macros to make them visible
as such to the debugger. See also the --disable-macros option.
--enable-exp-win32
When configuring for MinGW, use the experimental Windows 10 driver.
--enable-ext-colors
Extend the cchar_t structure to allow more than 16 colors to be
encoded. This applies only to the wide-character (--enable-widec)
@ -587,6 +611,12 @@ SUMMARY OF CONFIGURE OPTIONS:
ncurses. This does not change the ABI (the binary interface seen by
calling applications).
--enable-fvisibility
Use the gcc "-fvisibility=hidden" option to make symbols which are not
explicitly exported, "hidden". Doing this may reduce the number of
symbols exported in the C++ binding; it should have less effect on the
C libraries when symbol-versioning is used.
--enable-getcap
Use the 4.4BSD getcap code if available, or a bundled version of it to
fetch termcap entries. Entries read in this way cannot use (make
@ -864,6 +894,9 @@ SUMMARY OF CONFIGURE OPTIONS:
Specify a suffix for the ncursesw6-config file, etc., used to work
around conflicts with packages.
--with-cxx-libname=NAME
Override the basename of the ncurses++ library (default: "ncurses++")
--with-cxx-shared
When --with-shared is set, build libncurses++ as a shared library.
This implicitly relies upon building with gcc/g++, since other
@ -909,6 +942,9 @@ SUMMARY OF CONFIGURE OPTIONS:
See also "--with-tic-path" and "--with-infocmp-path".
--with-form-libname=NAME
Override the basename of the form library (default: "form")
--with-gpm
use Alessandro Rubini's GPM library to provide mouse support on the
Linux console. Prior to ncurses 5.5, this introduced a dependency on
@ -1043,6 +1079,9 @@ SUMMARY OF CONFIGURE OPTIONS:
by running them through tbl to generate tables understandable by
nroff.
--with-menu-libname=NAME
Override the basename of the menu library (default: "menu")
--with-mmask-t=TYPE
Override type of mmask_t, which stores the mouse mask. Prior to
ncurses 5.5, this was always unsigned long, but with ncurses 5.5, it
@ -1070,6 +1109,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-panel-libname=NAME
Override the basename of the panel library (default: "panel")
--with-pc-suffix=SUFFIX
If ".pc" files are installed, optionally add a suffix to the files
and corresponding package names to separate unusual configurations.
@ -1328,8 +1370,8 @@ SUMMARY OF CONFIGURE OPTIONS:
X11R5 and X11R6 xterm.
COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
--------------------------------------------
COMPATIBILITY WITH OLDER RELEASES:
---------------------------------
Because ncurses implements X/Open Curses, its interface is fairly stable.
That does not mean the interface does not change. Changes are made to the
@ -2053,8 +2095,8 @@ COMPATIBILITY WITH OLDER VERSIONS OF NCURSES:
incorrect color scheme.
IF YOU ARE A SYSTEM INTEGRATOR:
------------------------------
FOR SYSTEM INTEGRATORS:
----------------------
Configuration and Installation:
@ -2130,7 +2172,7 @@ IF YOU ARE A SYSTEM INTEGRATOR:
that will make users' lives easier rather than harder.
RECENT XTERM VERSIONS:
MODERN XTERM VERSIONS:
---------------------
The terminfo database file included with this distribution assumes you
@ -2146,9 +2188,13 @@ CONFIGURING FALLBACK ENTRIES:
In order to support operation of ncurses programs before the terminfo
tree is accessible (that is, in single-user mode or at OS installation
time) the ncurses library can be compiled to include an array of
pre-fetched fallback entries. This must be done on a machine which
has ncurses' infocmp and terminfo database installed (as well as
ncurses' tic and infocmp programs).
pre-fetched fallback entries.
NOTE: This must be done on a machine which has ncurses' infocmp and
terminfo database installed (as well as ncurses' tic and infocmp
programs). That is because the fallback sources are generated and
compiled into the library before the build-tree's copy of infocmp is
available.
These entries are checked by setupterm() only when the conventional
fetches from the terminfo tree and the termcap fallback (if configured)
@ -2267,12 +2313,8 @@ terminfo directory directly.
------------------------------- CUT HERE --------------------------------
USING NCURSES WITH AFS:
AFS treats each directory as a separate logical filesystem, you
can't hard-link across them. The --enable-symlinks option copes
with this by making tic use symbolic links.
USING NCURSES WITH GPM:
USING GPM:
---------
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
@ -2291,7 +2333,9 @@ USING NCURSES WITH GPM:
https://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib
BUILDING NCURSES WITH A CROSS-COMPILER
BUILDING WITH A CROSS-COMPILER:
------------------------------
Ncurses can be built with a cross-compiler. Some parts must be built
with the host's compiler since they are used for building programs
(e.g., ncurses/make_hash and ncurses/make_keys) that generate tables
@ -2316,14 +2360,26 @@ BUILDING NCURSES WITH A CROSS-COMPILER
When ncurses has been successfully cross-compiled, you may want to use
"make install" (with a suitable target directory) to construct an
install tree. Note that in this case (as with the --with-fallbacks
option), ncurses uses the development platform's tic to do the
"make install.data" portion.
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.
even for cross-compiles. For best results, the tic program should be
from the most current version of ncurses.
BUGS:
NOTE: the system's tic program may use a different terminfo database
format than the target system. For instance, as described in term(5),
the conventional terminfo layout uses a directory hierarchy with one
letter names, while some platforms use two-letter names to work with
case-insensitive filesystems. The configure script searches for a tic
program using the AC_CHECK_TOOL macro, which will prefer programs
using the canonical host prefix in their name. You can use this fact
to provide a cross-compiler support utility tic, otherwise you can
override the configure script's choice using --with-tic-path
BUG REPORTS:
-----------
Send any feedback to the ncurses mailing list at
bug-ncurses@gnu.org. To subscribe send mail to
bug-ncurses-request@gnu.org with body that reads:

View File

@ -235,7 +235,6 @@
./config.sub
./configure
./configure.in
./convert_configure.pl
./dist.mk
./doc/hackguide.doc
./doc/html/Ada95.html
@ -547,6 +546,7 @@
./include/MKterm.h.awk.in
./include/Makefile.in
./include/capdefaults.c
./include/curses.events
./include/curses.h.in
./include/curses.tail
./include/curses.wide
@ -559,6 +559,7 @@
./include/nc_string.h
./include/nc_termios.h
./include/nc_tparm.h
./include/nc_win32.h
./include/ncurses_cfg.hin
./include/ncurses_defs
./include/ncurses_dll.h.in
@ -567,6 +568,7 @@
./include/termcap.h.in
./include/tic.h
./include/unctrl.h.in
./include/win32_curses.h
./install-sh
./man/MKada_config.in
./man/MKncu_config.in
@ -942,6 +944,8 @@
./ncurses/tinfo/lib_tparm.c
./ncurses/tinfo/lib_tputs.c
./ncurses/tinfo/lib_ttyflags.c
./ncurses/tinfo/lib_win32con.c
./ncurses/tinfo/lib_win32util.c
./ncurses/tinfo/make_hash.c
./ncurses/tinfo/make_keys.c
./ncurses/tinfo/name_match.c
@ -998,6 +1002,7 @@
./ncurses/widechar/widechars.c
./ncurses/win32con/gettimeofday.c
./ncurses/win32con/wcwidth.c
./ncurses/win32con/win32_driver.c
./ncurses/win32con/win_driver.c
./package/debian-mingw/changelog
./package/debian-mingw/compat
@ -1089,6 +1094,7 @@
./test/Makefile.in
./test/README
./test/aclocal.m4
./test/back_ground.c
./test/background.c
./test/blue.c
./test/bs.6
@ -1123,6 +1129,7 @@
./test/dots_xcurses.c
./test/dump_window.c
./test/dump_window.h
./test/dup_field.c
./test/echochar.c
./test/edit_field.c
./test/edit_field.h
@ -1155,6 +1162,7 @@
./test/mini.xterm_48x48.xpm
./test/mk-test.awk
./test/modules
./test/move_field.c
./test/movewindow.c
./test/ncurses.c
./test/ncurses_tst.hin
@ -1212,6 +1220,7 @@
./test/test_setupterm.c
./test/test_sgr.c
./test/test_termattrs.c
./test/test_tparm.c
./test/test_vid_puts.c
./test/test_vidputs.c
./test/testaddch.c

View File

@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
-- Copyright 2018-2019,2020 Thomas E. Dickey --
-- Copyright 2018-2020,2021 Thomas E. Dickey --
-- Copyright 1998-2017,2018 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
@ -26,7 +26,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.3450 2020/02/15 18:56:00 tom Exp $
-- $Id: NEWS,v 1.3634 2021/02/21 00:18:55 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -46,6 +46,469 @@ See the AUTHORS file for the corresponding full names.
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
20210220
+ improve tic warning when oc/op do not mention SGR 39/49 for xterm
compatible XT flag.
+ revert change to lib_addch.c in waddch_literal() from 20210130, since
the followup fix in PutCharLR() actually corrects the problem while
this change causes too-early filling/wrapping (report by Johannes
Altmanninger).
+ add/use vt220+pcedit and vt220+vtedit -TD
+ add scrt/securecrt and absolute -TD
+ add nel to xterm-new, though supported since X11R5 -TD
+ add/use xterm+nofkeys -TD
+ move use of ecma+italics from xterm-basic to xterm+nofkeys -TD
20210213
+ add test/back_ground.c, to exercise the wide-character background
functions.
+ add a check in _nc_build_wch() in case the background character is a
wide-character, rather than a new part of a multibyte character.
+ improve tracemunch's coverage of form/menu/panel libraries.
+ improve tracemunch's checking/reporting the type for the first
parameter, e.g., "WINDOW*" rather than "#1".
20210206
+ provide for wide-characters as background character in wbkgrnd
(report/testcase by Anton Vidovic)
+ add name for Fedora's pcre2 to configure check for "--with-pcre2"
option, from xterm #363 -TD
+ modify adjustment in PutCharLR to restore the cursor position before
writing to the lower-right corner, rather than decrementing the
cursor column, in case it was a double-width character (cf: 20210130).
20210130
+ correct an off-by-one in comparison in waddch_literal() which caused
scrolling when a double-cell character would not fit at the lower
right corner of the screen (report by Benno Schulenberg).
+ split-out att610+cvis, vt220+cvis, vt220+cvis8 -TD
+ add vt220-base, for terminal emulators which generally have not
supported att610's blinking cursor control -TD
+ use vt220+cvis in vt220, etc -TD
+ use att610+cvis, xterm+tmux and ansi+enq in kitty -TD
+ use vt220+cvis in st, terminology, termite since they ignore
blinking-cursor detail in att610+cvis -TD
20210123
+ modify package/config scripts to provide an explicit -L option for
cases when the loader search path has other directories preceding
the one in which ncurses is installed (report by Yuri Victorovich).
+ minor build-fixes in configure script and makefiles to work around
quirks of pmake.
20210116
+ add comment for linux2.6 regarding CONFIG_CONSOLE_TRANSLATIONS
(report by Patrick McDermott) -TD
+ make opts extension for getcchar work as documented for ncurses 6.1,
adding "-g" flag to test/demo_new_pair to illustrate.
20210109
+ fix errata in man/ncurses.3x from recent updates.
+ improve quoting/escaping in configure script, uses some features of
autoconf 2.52.20210105
20210102
+ update man/curs_memleaks.3x, to include <term.h> which declares
exit_terminfo.
+ clarify man/curs_terminfo.3x, to mention why the macro setterm is
defined in <curses.h>, and remove it from the list of prototypes
(prompted by patch by Graeme McCutcheon).
+ amend man/curs_terminfo.3x, to note that <curses.h> is required
for certain functions, e.g., those using chtype or attr_t for
types, as well as mvcur (cf: 20201031).
+ use parameter-names in prototypes in curs_sp_funcs.3x, for
consistency with other manpages.
20201227
+ update terminology entry to 1.8.1 -TD
+ fix some compiler-warnings which gcc8 reports incorrectly.
20201219
+ suppress hyphenation in generated html for manpages, to address
regression in upgrade of groff 1.22.2 to 1.22.3.
+ fix inconsistent sort-order in see-also sections of manpages (report
by Chris Bennett).
20201212
+ improve manual pages for form field-types.
20201205
+ amend build-fixes for gnat 10 to work with certain systems lacking
gprbuild (cf: 20200627).
+ eliminate an additional strlen and wsclen.
+ eliminate an unnecessary strlen in waddnstr() (suggested by Benjamin
Abendroth).
+ modify inopts manpage, separating the items for nodelay and notimeout
(patch by Benno Schulenberg).
+ correct mlterm3 kf1-kf4 (Debian #975322) -TD
+ add flash to mlterm3 -TD
20201128
+ add Smulx to alacritty (Christian Duerr).
+ add rep to PuTTY -TD
+ add putty+keypad -TD
+ add another fflush(stdout) in _nc_flush() to handle time-delays in
the middle of strings such as flash when the application uses
low-level calls rather than curses (cf: 20161217).
+ modify configure check for c89/c99 aliases of clang to use its
-std option instead, because some platforms, in particular macOS,
do not provide workable c89/c99 aliases.
20201121
+ fix some compiler-warnings in experimental Windows-10 driver.
+ add the definitions needed in recent configure-check for clang
(report by Steven Pitman).
20201114
+ fix some compiler-warnings in experimental Windows-10 driver.
+ modify a check for parameters in terminfo capabilities to handle the
special case where short extended capability strings were not
converted from terminfo to termcap format.
+ modify CF_MIXEDCASE_FILENAMES macro, adding darwin as special case
when cross-compiling (report by Eli Rykoff).
20201107
+ update kitty+common -TD
+ add putty+screen and putty-screen (suggested by Alexandre Montaron).
+ explain in ncurses.3x that functions in the tinfo library do not rely
upon wide-characters (prompted by discussion with Reuben Thomas).
20201031
+ modify MKterm.h.in so that it is not necessary to include <curses.h>
before <term.h> (prompted by discussion with Reuben Thomas).
+ review/improve synopsis for curs_sp_funcs.3x (prompted by discussion
with Reuben Thomas).
+ improve format of output in tic's check_infotocap() function, to
ensure that the messages contain only printable text.
+ modify configure-check for clang to verify that -Qunused-arguments
is supported. IBM's xlclang does not support it (report by Steven
Pitman).
20201024
+ provide workaround configure-check for bool when cross-compiling.
+ fix a potential indexing error in _nc_parse_entry(), seen with
Herlim's test data using address-sanitizer.
+ change a null-pointer check in set_curterm to a valid-string check,
needed in to tic's use-resolution when pad_char is cancelled
(report/testcase by Robert Sebastian Herlim)
+ improve tic's -c option to validate the number and type of parameters
and compare against expected number/type before deciding which set of
parameter-lists to use in tparm calls (report/testcase by Robert
Sebastian Herlim).
+ fix a link for tabs.1 manpage in announce.html.in (report by Nick
Black), as well as some fixes via linklint.
20201017
+ improve manpage typography.
+ improve discussion in curs_addch.3x of the use of unctrl to display
nonprintable characters.
+ add a note in terminfo.5 explaining that no-parameter strings such
as sgr0 or cnorm should not be used with tparm.
20201010
+ correct sgr in aaa+rv (report by Florian Weimer) -TD
+ fix some sgr inconsistencies in d230c, ibm6153, ibm6154,
ncrvt100an -TD
+ improve tic's check for errors detected in tparm (prompted by
discussion with Florian Weimer).
+ set output-mode to binary in experimental Windows-10 driver (Juergen
Pfeifer).
20201003
+ remove output-related checks for nl/nonl (report by Leon Winter).
+ change tmux's kbs to ^? (report by Premysl Eric Janouch)
+ simplify mlterm initialization with DECSTR -TD
+ fix a typo in man/curs_terminfo.3 (Reuben Thomas).
+ add tmux-direct (tmux #2370, Debian #895754)
+ add user-defined capabilities from mintty to Caps-ncurses, for
checking consistency with tic.
20200926
+ correct configure-check for gnurx library.
+ regenerate llib-* files.
+ modify tracemunch and the panel library to show readable traces for
panel- and user-pointers.
20200919
+ update mlterm3 for 3.9.0 (report by Premysl Eric Janouch) -TD
20200918
+ corrected condition for appending curses.events to the generated
curses.h (report by Sven Joachim, Debian #970545).
20200912
+ add configure-check for systre/tre with mingw configuration, to get
the library-dependencies as seen in msys2 configuration for mingw64.
+ build-fixes for the win32-driver configuration.
+ use more defensive binary mode setting for Win32 (Juergen Pfeifer).
20200907
+ fix regression in setupterm validating non-empty $TERM (report by
Soren Tempel).
20200906
+ merge/adapt in-progress work by Juergen Pfeifer for new version of
win32-driver.
+ correct description of vt330/vt340 (Ross Combs).
20200831
+ build-fix for awk-scripts modified for win32-driver (report by Werner
Fink).
20200829
+ remove a redundant NCURSES_EXPORT as a build-fix for "Maarten
Anonymous".
+ merge/adapt in-progress work by Juergen Pfeifer for new version of
win32-driver.
+ modify configure script, moving gcc -Werror options to EXTRA_CFLAGS
to avoid breaking configure-checks (adapted from ongoing work on
mawk and lynx).
> errata for terminfo.src (report by Florian Weimer):
+ correct icl6404 csr
+ correct ti916 cup
+ improve ndr9500
20200822
+ improve version-number extraction in MKlib_gen.sh
+ make the test-package for manpages installable by adjusting the
man_db.renames file.
+ correct an off-by-one loop-limit in convert_strings function
(report by Yue Tai).
+ add CF_SHARED_OPTS cases for HPE NonStop systems (Randall S Becker).
+ modify CF_SHARED_OPTS case for NetBSD to use the same "-shared"
option for the non-rpath case as for the rpath case, to allow gcc to
provide suitable runtime initialization (report by Rajeev V Pillai).
20200817
+ reduce build-warnings by excluding ncurses-internals from deprecation
warnings.
+ mark wgetch-events feature as deprecated.
+ add definition for $(LIBS) to ncurses/Makefile.in, to simplify builds
using the string-hacks option.
+ prevent KEY_EVENT from appearing in curses.h unless the configure
option --enable-wgetch-events is used (report by Werner Fink).
20200816
+ amend tic/infocmp check to allow for the respective tool's absence
(report by Steve Wills, cf: 20200808).
+ improved some of the build-scripts with shellcheck
+ filter out -MT/-MD/-MTd/-MDd options in script for Visual Studio C++
(discussion with "Maarten Anonymous").
20200808
+ improve discussion of the system's tic utility when used as part
of cross-compiling (discussion with Keith Marshall).
+ modify configuration checks for build-time tic/infocmp to use
AC_CHECK_TOOL. That can still be overridden by --with-tic-path and
--with-infocmp-path when fallbacks are used, but even if not using
fallbacks, the improved check may help with cross-compiling
(discussion with Keith Marshall).
+ other build-fixes for Ada95 with MinGW.
+ modify Ada95 source-generation utility to write to a file given as
parameter rather than to the standard output, allowing builds with
MinGW.
20200801
+ remove remaining parts of checks for ISC Unix (cf: 20121006).
+ add user32.lib to LDFLAGS for Visual Studio C++ configuration
(discussion with "Maarten Anonymous").
+ modify MKkey_defs.sh to hide ncurses' definition of KEY_EVENTS to
reduce Visual Studio C++ redefinition warnings.
+ improve/update checks for external functions in test/configure
20200725
+ set LINK_TESTS in CF_SHARED_OPTS for msvc (patch by
"Maarten Anonymous")
+ improved workaround for redefinition-warnings for KEY_EVENT.
+ improve man/term.5 section on legacy storage format (report by
Florian Weimer).
20200718
+ reduce redefinition-warnings for KEY_EVENT when building with Visual
Studio C++.
+ define NCURSES_STATIC when compiling programs to link with static
libraries, to work with MinGW vs Visual Studio C++.
> additional changes for building with Visual Studio C++ and msys2
(reports/patches by "Maarten Anonymous")
+ modify c++/Makefile.in to set the current directory while compiling
the main program, so the linker can find related objects.
+ several changes to allow the c++/demo program to compile/link.
+ change an ifdef in test-directory, to use VC++ wide-character funcs.
20200711
+ fix pound-sign mapping in acsc of linux2.6 entry (report by Ingo
Bruckl).
+ additional changes for building with Visual Studio C++ and msys2
(reports/patches by "Maarten Anonymous")
+ build-improvements for Windows 10 and MinGW (patch by Juergen
Pfeifer).
+ fix a typo in curs_printw.3x (patch by William Pursell).
+ fix two errors in infotocap which allowed indexing outside the
buffer (report/testcases by Zhang Gan).
+ update length of strings in infocmp's usage function to restore a
trailing null on the longest string (report/testcase by Zhang Gen).
20200704
+ modify version-check with Ada generics to use the same pattern as in
the check for supported gnat versions (report by Pascal Pignard).
> additional changes for building with Visual Studio C++ and msys2
(patches by "Maarten Anonymous"):
+ adjust headers/declarations to provide for "dllimport" vs "dllexport"
declarations when constructing DLLs, to worko with Visual Studio C++.
20200627
+ build-fixes for gnat 10.1.1, whose gnatmake drops integration with
gprbuild.
+ correct buffer-length in test/color_name.h
20200613
+ update list of functions in ncurses.3x
+ move dlclose() call from lib_mouse.c to delscreen() to avoid a case
in the former which could be called from SIGTSTP handler (Debian
#961097).
20200606
+ add xterm+256color2, xterm+88color2, to deprecate nonstandard usage
in xterm+256color, xterm+88color -TD
+ add shifted Linux console keys in linux+sfkeys entry for
screen.linux (report by Alexandre Montaron).
+ use vt100+enq in screen (report by Alexandre Montaron).
+ add screen.linux-s alias (suggested by Alexandre Montaron).
20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-checking for tparm, adding function _nc_tiparm() to
handle the most-used case, which accepts only numeric parameters
(report/testcase by "puppet-meteor").
+ use a more conservative estimate of the buffer-size in lib_tparm.c's
save_text() and save_number(), in case the sprintf() function
passes-through unexpected characters from a format specifier
(report/testcase by "puppet-meteor").
+ add a check for end-of-string in cvtchar to handle a malformed
string in infotocap (report/testcase by "puppet-meteor").
20200523
+ update version-check for gnat to allow for gnat 10.x to 99.x
+ fix an uninitialized variable in lib_mouse.c changes (cf: 20200502)
+ add a check in EmitRange to guard against repeat_char emitting digits
which could be interpreted as BSD-style padding when --enable-bsdpad
is configured (report/patch by Hiltjo Posthuma).
+ add --disable-pkg-ldflags to suppress EXTRA_LDFLAGS from the
generated pkg-config and ncurses*-config files, to simplify
configuring in the case where rpath is used but the packager wants
to hide the feature (report by Michael Stapelberg).
> fixes for building with Visual Studio C++ and msys2 (patches by
"Maarten Anonymous"):
+ modify CF_SHARED_OPTS to generate a script which translates linker
options into Visual Studio's dialect.
+ omit parentheses around function-names in generated lib_gen.c to
work around a Visual Studio C++ limitation.
20200516
+ add notes on termcap.h header in curs_termcap.3x
+ update notes on vscode / xterm.js -TD
20200509
+ add "-r" option to the dots test-programs, to help with scripting
a performance comparison.
+ build-fix test/move_field.c for NetBSD curses, whose form headers
use different names than SVr4 or ncurses.
20200502
+ add details on the change to Linux SGR 21 in 2018 -TD
+ add xterm-direct16 and xterm-direct256 -TD
+ modify lib_mouse.c to check for out-of-range button numbers, convert
those to position reports.
20200425
+ use vt100+fnkeys in putty -TD
+ fix a typo in tput.1; "columns" should be "cols".
20200418
+ improve tracemunch logic for "RUN" compaction.
+ fix a special case in wresize() where copying the old text did not
check if the last cell on a row was the beginning of a fullwidth
character (adapted from patch by Benno Schulenberg).
+ use vt52+keypad in xterm-vt52, from xterm #354 -TD
+ improve see-also section of user_caps.5
20200411
+ fix find_pair(), overlooked when refactoring for _nc_reserve_pairs()
(report/testcase by Brad Town, cf: 20170812).
+ add a trailing null for magic-string in putwin, flagged by gcc 10
+ update check for gcc version versus gnat to work with gcc 10.x
20200404
+ modify -fvisibility check to work with g++
> fixes for building with Visual Studio C++ and msys2 (patches by
"Maarten Anonymous"):
+ add configure option and check for gcc -fvisibility=hidden feature
+ define NCURSES_NOMACROS in lib_gen.c to work around Visual Studio
C++ preprocessor limitations.
+ modify some of the configure-macros, as well as mk-1st.awk to work
with Visual Studio C++ default filenaming.
20200328
+ correct length of buffer copied in dup_field().
+ remove "$(srcdir)/" from path of library.gpr, needed for out-of-tree
builds of Ada95 (patch by Adam Van Ymeren).
20200321
+ improve configure-checks to reduce warnings about unused variables.
+ improve description of error-returns in waddch and waddnstr manual
pages (prompted by patch by Benno Schulenberg).
+ add test/move_field.c to demonstrate move_field(), and a stub for
a corresponding demo of dup_field().
20200314
+ add history note to curs_scanw.3x for <stdarg.h> and <varargs.h>
+ add history note to curs_printw.3x for <stdarg.h> and <varargs.h>
+ add portability note to ncurses.3x regarding <stdarg.h>
20200308
+ update copyright notices in test-packages.
+ modify tracemunch to guard against errors in its known_p1 table.
+ add several --with-xxx-libname options, to help with pkgsrc (prompted
by discussion with Thomas Klausner).
20200301
+ modify wbkgd() and wbkgrnd() to avoid storing a null in the
background character, because it may be used in cases where the
corresponding 0x80 is not treated as a null (report by Marc Rechte,
cf: 20181208).
20200229
+ modify CF_NCURSES_CONFIG to work around xcode's c99 "-W" option,
which conflicts with conventional use for passing linker options.
> fixes for building with Visual Studio C++ and msys2 (patches by
"Maarten Anonymous"):
+ check for pcre2posix.h instead of pcre2-posix.h
+ add case in CF_SHARED_OPTS for msys2 + msvc
+ add fallback definition for STDIN_FILENO in progs.priv.h
+ modify win_driver.c to use _alloca() rather than gcc's variable
length array feature.
+ add NCURSES_IMPEXP to ncurses wrapped-variable declarations
+ remove NCURSES_IMPEXP from class variables in c++/cursslk.h
+ remove fallback prototype for exit() from c++/etip.h.in
+ use configured check for <sys/time.h> in a couple of places
+ conditionally include winsock.h in ncurses/win32con/gettimeofday.c,
because Visual Studio needs this for the timestruct declaration.
+ adjust syntax in a couple of files using the NCURSES_API symbol.
20200222
+ expanded note in ncurses.3x regarding automatically-included headers
+ improve vt50h and vt52 based on DECScope manual -TD
+ add/use vt52+keypad and vt52-basic -TD
+ check/workaround for line-too-long in Ada95 generate utility when
building out-of-tree.
+ improve/update HEADER_DEPS in */Makefile.in
+ add "check" rule to include/Makefile, to demonstrate that the headers
include all of the required headers for the types used.
20200215
+ improve manual page for panel library, extending the portability
section as well as documenting error-returns.
@ -220,7 +683,7 @@ it is not possible to add this information.
+ build-fixes for Ada95 configure-script and corresponding test package
20190907
+ add --with-ada-libname option and modify Ada95 configuration to
+ add --with-ada-libname option and modify Ada95 configuration to
allow renaming the "AdaCurses" library (prompted by proposed changes
by Pascal Pignard).
+ modify configure script to distinguish gcc from icc and clang when

View File

@ -26,114 +26,123 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: README.MinGW,v 1.10 2020/02/02 23:34:34 tom Exp $
-- $Id: README.MinGW,v 1.14 2020/09/06 22:22:44 tom Exp $
-- Author: Juergen Pfeifer
-------------------------------------------------------------------------------
This is work in progress, but it's in an state where one can see it
This is work in progress, but it is 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
You should install the MSYS2 package, so that you have a shell environment that
allows you to run scripts, especially configure, etc. You can get that
from
https://www.msys2.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.
or the individual packages from
The latest config and build scripts we use for MinGW have only been tested
for the gcc-4.6.1 compiler toolchain (or better).
https://sourceforge.net/projects/msys2/files/
Using MinGW is a pragmatic decision, it's the easiest way to port this
You may also use a hosted MinGW cross-compile toolchain, e.g., on Ubuntu or
ArchLinux to build the libraries and tools.
To build ncurses for native Windows with support for the new Windows 10 Virtual
Terminal and PseudoConsole support, you should install at least version 8.0 of
the mingw-w64-x86_64-headers package as it appears to have support for the
required Windows SDK level. Please note that some of the Linux distributions
are a bit behind with respect to the required MinGW header versions and you may
not be able to properly build the libraries for current Windows 10 using these
toolchains. Although it is a bit slow, MSYS2 on Windows 10 64-Bit is the
authoritative build environment for the MinGW version of ncurses.
Using MinGW is a pragmatic decision, it is 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.
The TERM environment variable must be set specially to active the Windows
The TERM environment variable must be set especially to activate the Windows
console-driver. The driver checks if TERM is set to "#win32con" (explicit
use) or if TERM is unset or empty (implicit).
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.
Beginning with build 17763 (Fall 2018 update), Windows 10 supports ANSI escape
sequences (Virtual Terminal support). If ncurses detects this or a later
Windows 10 version, the interpretation of the implicit TERM setting (which
means: TERM is not set or empty) changes. In this case, TERM is to be assumed
to be "ms-terminal" and ncurses acts using the regular terminfo based driver,
thus acting like a regular Terminal we all know from UNIX like environments.
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.
This code requires WindowsNT 6.0 or better, which means on the client
Windows Vista or better, on the server Windows Server 2008 or better.
I recommend using libtool to build ncurses on MinGW, because libtool
knows exactly how to build dll's on Windows for use with MinGW.
If running on Windows 10 Build 17763 or later is detected, any program
spawning a subprocess running a ncurses program should use the new
PseudoConsole support, which provides what we know as pty from the UNIX
world also for Windows. Using the CreatePseudoConsole API
(see https://docs.microsoft.com/en-us/windows/console/createpseudoconsole)
in the calling process, it is guaranteed that the called ncurses program has
a console that is required by its implementation, even if the calling program
is NOT a console program, e.g., MSYS2's own mintty Terminal emulator.
In the current MSYS2/minGW setup, building MinGW shared libraries with
libtool for ncurses seems to be broken, so I recommend NOT to use libtool.
To build a modern but still small footprint ncurses that provides
hooks for interop, I recommend using these options:
--with-libtool
--disable-home-terminfo
--enable-database
--disable-termcap
--enable-sp-funcs
--enable-term-driver
--enable-interop
--without-libtool
--disable-home-terminfo
--enable-database
--disable-termcap
--enable-sp-funcs
--enable-term-driver
--enable-interop
This is the configuration commandline as I'm using it at the moment (assuming
environment variable MINGW_ROOT to hold the root directory name of your MinGW
build):
This is the configuration command line which I am using at the moment
(assuming environment variable MINGW_ROOT holds the root directory name of
your MinGW build):
./configure \
--prefix=$MINGW_ROOT \
--with-cxx \
--prefix=/mingw64 \
--without-cxx \
--without-ada \
--enable-warnings \
--enable-assertions \
--enable-exp-win32 \
--enable-ext-funcs \
--disable-home-terminfo \
--disable-echo \
--disable-getcap \
--disable-hard-tabs \
--disable-leaks \
--disable-macros \
--disable-overwrite \
--enable-opaque-curses \
--enable-opaque-panel \
--enable-opaque-menu \
--enable-opaque-form \
--enable-database \
--enable-sp-funcs \
--enable-term-driver \
--enable-interop \
--disable-termcap \
--enable-database \
--with-progs \
--with-libtool \
--without-libtool \
--enable-pc-files \
--mandir=$MINGW_ROOT/share/man
--with-shared \
--with-normal \
--without-debug \
--with-fallbacks=ms-terminal \
--without-manpages
Please note that it is also necessary to set this environment variable:
export PATH_SEPARATOR=";"
in order to parse the terminfo paths correctly. Terminfo paths should
always be separated by a seeeemicolon,even when running under MSYS.
To support regular expressions properly, ncurses under MinGW should be
linked against the gnurx regex library, which must be built separately
under MinGW. See
ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip
always be separated by a semicolon, even when running under MSYS2.
All the options above are - like the whole Windows support -
experimental.
A lot is still TODO, e.g.:
- Wide Character support (display is workable, but input untested)
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 would need to have an ioctl() simulation for the
serial and networked terminals.
-- vile:txtmode

View File

@ -1 +1 @@
5:0:10 6.2 20200215
5:0:10 6.2 20210220

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
<!--
$Id: announce.html.in,v 1.96 2020/02/09 21:50:48 tom Exp $
$Id: announce.html.in,v 1.99 2020/10/19 08:18:12 tom Exp $
****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* *
@ -344,7 +344,7 @@
<li>
<p>marked <a href=
"@HOMEPAGE@/man/curs_printw.3x.html#h3-PORTABILITY"><tt>vwprintw</tt></a>
"@HOMEPAGE@/man/curs_printw.3x.html#h2-PORTABILITY"><tt>vwprintw</tt></a>
and <tt>vwscanw</tt> as deprecated; recommend using <a href=
"@HOMEPAGE@/man/curs_printw.3x.html"><tt>vw_printw</tt></a>
and <tt>vw_scanw</tt>, respectively.</p>
@ -504,7 +504,7 @@
<h3><a name="h3-programs" id="h3-programs">Program
improvements</a></h3>
<p>Several improvements were made to the utility programs:</p>
<p id="h4-utilities">Several improvements were made to the utility programs:</p>
<dl>
<dt><span class="part-name">clear</span>
@ -1051,7 +1051,7 @@
for decompiling descriptions. That came later, with SVr3,
with a different developer.</li>
<li><a href="@HOMEPAGE@/man/tabs.1">tabs.1</a> tells more
<li><a href="@HOMEPAGE@/man/tabs.1.html">tabs.1</a> tells more
than you wanted to know about the tool.</li>
<li><a href="@HOMEPAGE@/man/tic.1m.html">tic.1</a> explains
@ -1092,7 +1092,7 @@
characters.</li>
<li><a href=
"@HOMEPAGE@/man/curs_color.3x.html#h3-RETURN-VALUE">curs_color.3x</a>
"@HOMEPAGE@/man/curs_color.3x.html#h2-RETURN-VALUE">curs_color.3x</a>
improves discussion of error returns and extensions.</li>
<li><a href=

12821
contrib/ncurses/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
dnl***************************************************************************
dnl Copyright 2018-2019,2020 Thomas E. Dickey *
dnl Copyright 2018-2020,2021 Thomas E. Dickey *
dnl Copyright 1998-2017,2018 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
@ -29,7 +29,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1995-on
dnl
dnl $Id: configure.in,v 1.697 2020/02/08 20:56:13 tom Exp $
dnl $Id: configure.in,v 1.729 2021/01/09 11:20:52 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl
dnl For additional information, see
@ -37,8 +37,8 @@ dnl https://invisible-island.net/autoconf/
dnl https://invisible-island.net/autoconf/my-autoconf.html
dnl
dnl ---------------------------------------------------------------------------
AC_PREREQ(2.52.20200111)
AC_REVISION($Revision: 1.697 $)
AC_PREREQ(2.52.20210101)
AC_REVISION($Revision: 1.729 $)
AC_INIT(ncurses/base/lib_initscr.c)
AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
@ -144,10 +144,10 @@ else
fi
CF_GXX_VERSION
case $GXX_VERSION in
(1*|2.[[0-6]]*)
# GXX=""; CXX=""; ac_cv_prog_gxx=no
# cf_cxx_library=no
case "$GXX_VERSION" in
([[1-9]][[0-9]].*)
;;
(1.*|2.[[0-6]]*)
AC_MSG_WARN(templates do not work)
;;
esac
@ -183,7 +183,7 @@ AC_ARG_WITH(progs,
[cf_with_progs=yes])
AC_MSG_RESULT($cf_with_progs)
if test -f $srcdir/tack/tack.h; then
if test -f "$srcdir/tack/tack.h" ; then
if test "x$cross_compiling" = xyes ; then
CF_VERBOSE(ignoring tack because we are cross-compiling)
cf_with_tack=no
@ -221,7 +221,6 @@ modules_to_build="$modules_to_build panel menu form"
AC_ARG_PROGRAM
CF_PROG_AWK
CF_PROG_EGREP
CF_PROG_INSTALL
CF_PROG_LINT
CF_PROG_LN_S
@ -311,6 +310,14 @@ CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-c
# If we're cross-compiling, allow the user to override the tools and their
# options. The configure script is oriented toward identifying the host
# compiler, etc., but we need a build compiler to generate parts of the source.
case "$cf_cv_system_name" in
(*-msvc*)
LDFLAGS="$LDFLAGS user32.lib"
export LDFLAGS
;;
esac
CF_BUILD_CC
###############################################################################
@ -443,7 +450,7 @@ fi
AC_SUBST(CXX_G_OPT)
AC_MSG_CHECKING(for default loader flags)
case $DFT_LWR_MODEL in
case "$DFT_LWR_MODEL" in
(libtool) LD_MODEL='' ;;
(normal) LD_MODEL='' ;;
(debug) LD_MODEL=$CC_G_OPT ;;
@ -453,7 +460,7 @@ esac
AC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg)
AC_MSG_RESULT($LD_MODEL)
case $DFT_LWR_MODEL in
case "$DFT_LWR_MODEL" in
(shared)
CF_ENABLE_RPATH
AC_MSG_CHECKING(if shared libraries should be relinked during install)
@ -468,8 +475,8 @@ esac
# we will build libraries one-level down.
rel_builddir=..
CF_SHARED_OPTS
for model in $cf_list_models; do
case $model in
for model in $cf_list_models ; do
case "$model" in
(libtool)
CF_WITH_LIBTOOL_OPTS
CF_WITH_EXPORT_SYMS
@ -482,7 +489,7 @@ for model in $cf_list_models; do
AC_MSG_CHECKING(if current CFLAGS link properly)
AC_TRY_LINK(
[#include <stdio.h>],
[printf("Hello work\n");],
[printf("Hello work\\n");],
[cf_cflags_work=yes],
[cf_cflags_work=no])
AC_MSG_RESULT($cf_cflags_work)
@ -543,6 +550,23 @@ if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
CF_DISABLE_RPATH_HACK
fi
### Depending on the system, someone may use rpath to build ncurses but not
# want users of the package to rely upon that feature. Give those people an
# option to suppress that detail from EXTRA_LDFLAGS.
EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
if test -n "$EXTRA_PKG_LDFLAGS"
then
AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts)
CF_ARG_DISABLE(pkg-ldflags,
[ --disable-pkg-ldflags disable extra LDFLAGS for package-scripts],
[disable_pkg_ldflags=yes],
[disable_pkg_ldflags=no],
no)
AC_MSG_RESULT($disable_pkg_ldflags)
test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
fi
AC_SUBST(EXTRA_PKG_LDFLAGS)
###############################################################################
CF_HELP_MESSAGE(Fine-Tuning Your Configuration:)
@ -552,7 +576,7 @@ EXTRA_SUFFIX=
AC_ARG_WITH(extra-suffix,
[ --with-extra-suffix=X append extra suffix to header/library paths],
[case x$withval in
(no)
(xno)
;;
(xyes|x)
EXTRA_SUFFIX=$cf_cv_abi_version
@ -580,7 +604,7 @@ AC_ARG_ENABLE(database,
[use_database=yes])
AC_MSG_RESULT($use_database)
case $host_os in
case "$host_os" in
(os2*)
TERMINFO_SRC='${top_srcdir}/misc/emx.src'
;;
@ -629,33 +653,38 @@ case ".$with_fallback" in
;;
esac
USE_FALLBACKS=
test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
AC_SUBST(FALLBACK_LIST)
AC_SUBST(USE_FALLBACKS)
# The fallback feature in ncurses relies upon tic/infocmp outside the build
# tree for generating the terminal descriptions that will be compiled into the
# library. If your toolchain is old, it may not handle current terminal
# databases. Use configure-options to point to the tools which will be used,
# rather than the first ones found on the $PATH.
AC_CHECK_TOOL(TIC, tic)
AC_CHECK_TOOL(INFOCMP, infocmp)
if test -n "$FALLBACK_LIST"
then
CF_WITH_PATH_PROG(TIC, tic, [for fallbacks], $PATH:/usr/local/ncurses/bin)
CF_WITH_PATH_PROG(INFOCMP, infocmp, [for fallbacks], $PATH:/usr/local/ncurses/bin)
else
: ${TIC:=tic}
: ${INFOCMP:=infocmp}
test -z "$TIC" && FALLBACK_LIST=
test -z "$INFOCMP" && FALLBACK_LIST=
if test -z "$FALLBACK_LIST"
then
AC_MSG_WARN(ignoring fallback option because tic/infocmp are not available)
fi
fi
AC_SUBST(TIC)
AC_SUBST(INFOCMP)
USE_FALLBACKS=
test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
AC_SUBST(FALLBACK_LIST)
AC_SUBST(USE_FALLBACKS)
AC_MSG_CHECKING(if you want modern xterm or antique)
AC_ARG_WITH(xterm-new,
[ --without-xterm-new specify if xterm terminfo should be old version],
[with_xterm_new=$withval],
[with_xterm_new=yes])
case $with_xterm_new in
case "$with_xterm_new" in
(no) with_xterm_new=xterm-old;;
(*) with_xterm_new=xterm-new;;
esac
@ -1447,6 +1476,38 @@ AC_ARG_ENABLE(colorfgbg,
AC_MSG_RESULT($with_colorfgbg)
test "x$with_colorfgbg" = xyes && AC_DEFINE(USE_COLORFGBG,1,[Define to 1 to compile-in experimental $COLORFGBG code])
### use option --enable-fvisibility to turn on use of gcc-specific feature
AC_MSG_CHECKING(if you want to use gcc -fvisibility option)
AC_ARG_ENABLE(fvisibility,
[ --enable-fvisibility compile with -fvisibility=hidden],
[cf_with_fvisibility=$enableval],
[cf_with_fvisibility=no])
AC_MSG_RESULT($cf_with_fvisibility)
NCURSES_IMPEXP=
NCURSES_CXX_IMPEXP=
if test "x$cf_with_fvisibility" = xyes; then
CF_CHECK_FVISIBILITY($CC,CFLAGS,cf_cv_fvisibility_hidden)
if test "x$cf_cv_fvisibility_hidden" = xyes
then
CF_ADD_CFLAGS([-fvisibility=hidden])
NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
fi
if test -n "$CXX"
then
AC_LANG_PUSH(C++)
CF_CHECK_FVISIBILITY($CXX,CXXFLAGS,cf_cv_fvisibility_hidden2)
if test "x$cf_cv_fvisibility_hidden2" = xyes
then
CF_ADD_CXXFLAGS([-fvisibility=hidden])
NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
fi
AC_LANG_POP
fi
fi
AC_SUBST(NCURSES_IMPEXP)
AC_SUBST(NCURSES_CXX_IMPEXP)
### 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,
@ -1485,7 +1546,39 @@ AC_ARG_ENABLE(wgetch-events,
[with_wgetch_events=$enableval],
[with_wgetch_events=no])
AC_MSG_RESULT($with_wgetch_events)
test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with wgetch-events code])
if test "x$with_wgetch_events" = xyes ; then
AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with wgetch-events code])
NCURSES_WGETCH_EVENTS=1
else
NCURSES_WGETCH_EVENTS=0
fi
AC_SUBST(NCURSES_WGETCH_EVENTS)
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*|*-msvc*)
AC_MSG_CHECKING(if you want experimental-Windows driver)
AC_ARG_ENABLE(exp-win32,
[ --enable-exp-win32 compile with experimental-Windows driver],
[with_exp_win32=$enableval],
[with_exp_win32=no])
AC_MSG_RESULT($with_exp_win32)
if test "x$with_exp_win32" = xyes
then
AC_DEFINE(EXP_WIN32_DRIVER,1,[Define to 1 to compile with experimental win32 driver])
EXP_WIN32_DRIVER=1
INTERNALS_HDR='[$](INCDIR)/nc_win32.h'
else
INTERNALS_HDR='[$](INCDIR)/nc_mingw.h'
EXP_WIN32_DRIVER=0
fi
;;
(*)
EXP_WIN32_DRIVER=0
INTERNALS_HDR=
;;
esac
AC_SUBST(EXP_WIN32_DRIVER)
AC_SUBST(INTERNALS_HDR)
###############################################################################
CF_HELP_MESSAGE(Testing/development Options:)
@ -1520,20 +1613,14 @@ fi
AC_SUBST(INSTALL_OPT_P)
### use option --enable-warnings to turn on all gcc warnings
AC_MSG_CHECKING(if you want to see compiler warnings)
AC_ARG_ENABLE(warnings,
[ --enable-warnings build: turn on GCC compiler warnings],
[with_warnings=$enableval])
AC_MSG_RESULT($with_warnings)
CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes)
if test "x$with_warnings" = "xyes"; then
if test "x$enable_warnings" = "xyes"; then
CF_ADD_ADAFLAGS(-gnatg)
CF_GCC_WARNINGS(Wno-unknown-pragmas Wswitch-enum)
if test "x$cf_with_cxx" = xyes ; then
CF_GXX_WARNINGS(Wno-unused)
fi
fi
CF_GCC_ATTRIBUTES
CF_ENABLE_STRING_HACKS
### use option --enable-assertions to turn on generation of assertion code
@ -1598,9 +1685,13 @@ AC_SUBST(ADA_TRACE)
CF_DISABLE_GNAT_PROJECTS
### Checks for libraries.
case $cf_cv_system_name in
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*)
if test "x$with_exp_win32" = xyes ; then
CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
else
CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
fi
# Note: WINVER may be a problem with Windows 10
;;
(*)
@ -1630,7 +1721,6 @@ limits.h \
locale.h \
math.h \
poll.h \
sys/bsdtypes.h \
sys/ioctl.h \
sys/param.h \
sys/poll.h \
@ -1652,13 +1742,6 @@ then
AC_MSG_WARN(The NCURSES_TRACE environment variable is not supported with this configuration)
fi
# check for ISC (this may also define _POSIX_SOURCE)
# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
if test "x$ISC" = xyes ; then
AC_CHECK_LIB(cposix,main)
AC_CHECK_LIB(inet,bzero,CF_ADD_LIB(inet))dnl also 'select()'
fi
CF_SYS_TIME_SELECT
### checks for compiler characteristics
@ -1667,7 +1750,7 @@ AC_C_CONST
CF_C_INLINE(NCURSES_INLINE,1200)
CF_SIG_ATOMIC_T
if test $NCURSES_CHTYPE = auto ; then
if test "$NCURSES_CHTYPE" = auto ; then
CF_TYPEOF_CHTYPE
else
cf_cv_typeof_chtype=$NCURSES_CHTYPE
@ -1681,7 +1764,7 @@ test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
test ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L"
AC_SUBST(cf_cv_1UL)
if test $NCURSES_MMASK_T = auto ; then
if test "$NCURSES_MMASK_T" = auto ; then
cf_cv_typeof_mmask_t=long
else
cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
@ -1712,6 +1795,7 @@ setenv \
setvbuf \
sigaction \
sigvec \
snprintf \
strdup \
strstr \
sysconf \
@ -1784,7 +1868,7 @@ if test "$with_hashed_db" != no ; then
fi
dnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS
if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
CF_STRIP_G_OPT(CFLAGS)
CF_STRIP_G_OPT(CXXFLAGS)
fi
@ -1798,8 +1882,8 @@ if test -n "$CXX" ; then
CF_STDCPP_LIBRARY
CF_PROG_CC_C_O(CXX,[$CXXFLAGS $CPPFLAGS])
case $GXX_VERSION in
(1*|2.[0-6]*)
case "$GXX_VERSION" in
(1.*|2.[[0-6]]*|[[1-9]][[0-9]].*)
cf_cxx_library=yes
;;
(*-2.7*|2.7*)
@ -1855,11 +1939,11 @@ AC_SUBST(CXXLIBS)
# specify the type of bool in a configure-script option and postpone
# integration with the C++ compiler provided that the types are compatible.
USE_CXX_BOOL=1
if test $cf_cv_cc_bool_type = 1
if test "$cf_cv_cc_bool_type" = 1
then
# oops: C has a bool. Unlikely, but C++ could differ.
USE_CXX_BOOL=0
elif test $cf_cv_builtin_bool = 0
elif test "$cf_cv_builtin_bool" = 0
then
# C++ has no bool
USE_CXX_BOOL=0
@ -1968,15 +2052,27 @@ LIB_SUBSETS="${LIB_SUBSETS}base"
# 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
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*)
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
if test "x$with_exp_win32" = xyes ; then
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
else
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
fi
CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
;;
(*)
LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
;;
esac
elif test "x$with_exp_win32" = xyes ; then
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*)
LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
;;
(*)
;;
esac
fi
test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
@ -2022,8 +2118,8 @@ fi
# do not want -ldl in build except as needed for -lncurses dependency
if test "x$with_dlsym" = xyes ; then
if test $DFT_LWR_MODEL = shared || \
test $DFT_LWR_MODEL = libtool ; then
if test "$DFT_LWR_MODEL" = shared || \
test "$DFT_LWR_MODEL" = libtool ; then
CF_REMOVE_LIB(LIBS,$LIBS,dl)
fi
fi
@ -2051,9 +2147,9 @@ if test "$with_ticlib" != no ; then
if test "x$with_ticlib" != xyes ; then
TICS_NAME=$with_ticlib
TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
TICS_LIB_SUFFIX="${with_ticlib}"
else
TICS_SUFFIX=${DFT_LIB_SUFFIX}
@ -2078,9 +2174,9 @@ if test "$with_termlib" != no ; then
if test "x$with_termlib" != xyes ; then
TINFO_NAME=$with_termlib
TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
TINFO_LIB_SUFFIX="${with_termlib}"
else
TINFO_SUFFIX=${DFT_LIB_SUFFIX}
@ -2128,7 +2224,7 @@ else
fi
if test "$DFT_LWR_MODEL" = shared ; then
case $cf_cv_system_name in
case "$cf_cv_system_name" in
(cygwin*|msys*)
# "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
TINFO_SUFFIX=.dll
@ -2154,7 +2250,7 @@ fi
TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
AC_SUBST(TINFO_LDFLAGS2)
case $DFT_LWR_MODEL in
case "$DFT_LWR_MODEL" in
(normal|debug|profile)
CF_LDFLAGS_STATIC
;;
@ -2164,8 +2260,8 @@ AC_MSG_CHECKING(where we will install curses.h)
AC_SUBST(includesubdir)
includesubdir=
if test "$with_overwrite" = no && \
( test "x$includedir" = 'x${prefix}/include' || \
test "x$includedir" = "x${prefix}/include" )
{ test "x$includedir" = 'x${prefix}/include' || \
test "x$includedir" = "x${prefix}/include"; }
then
includesubdir="/ncurses${USE_LIB_SUFFIX}"
fi
@ -2181,6 +2277,17 @@ fi
fi
WITH_OVERWRITE=$with_overwrite
### At least on MinGW a shared library build without libtool
### requires adding the additional libs to the link list.
case "$cf_cv_system_name" in
(*mingw32*|*mingw64*)
if test "$DFT_LWR_MODEL" != "libtool"; then
SHLIB_LIST="$SHLIB_LIST ${LIBS}"
fi
;;
*) ;;
esac
AC_SUBST(WITH_OVERWRITE)
AC_SUBST(TICS_LIST)
AC_SUBST(TINFO_LIST)
@ -2193,6 +2300,12 @@ AC_SUBST(NCURSES_TREE)
### predefined stuff for the test programs
AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs])
# pkgsrc uses these
CF_WITH_LIB_BASENAME(FORM_NAME,form)
CF_WITH_LIB_BASENAME(MENU_NAME,menu)
CF_WITH_LIB_BASENAME(PANEL_NAME,panel)
CF_WITH_LIB_BASENAME(CXX_NAME,cxx,ncurses++)
### Construct the list of subdirectories for which we'll customize makefiles
### with the appropriate compile-rules.
@ -2215,9 +2328,6 @@ AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as
AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}",[Define to 1 if machine has ample memory for tic])
### Now that we're done running tests, add the compiler-warnings, if any
CF_ADD_CFLAGS($EXTRA_CFLAGS)
### Define substitutions for header files to avoid name-pollution
CF_SUBST_IF(["x$cf_cv_have_tcgetattr" = xyes], HAVE_TCGETATTR, 1, 0)
CF_SUBST_IF(["x$ac_cv_header_stdint_h" = xyes], HAVE_STDINT_H, 1, 0)
@ -2246,19 +2356,8 @@ AC_SUBST(MAKE_TESTS)
ADAHTML_DIR=../../doc/html/ada
AC_SUBST(ADAHTML_DIR)
# these could be configurable, but are not currently
PANEL_NAME=panel
MENU_NAME=menu
FORM_NAME=form
CXX_NAME=ncurses++
AC_SUBST(PANEL_NAME)
AC_SUBST(MENU_NAME)
AC_SUBST(FORM_NAME)
AC_SUBST(CXX_NAME)
# workaround for OS/2 (20151017)
case $cf_cv_system_name in
case "$cf_cv_system_name" in
(os2*)
LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
;;
@ -2269,7 +2368,7 @@ esac
AC_SUBST(LIBTOOL_OPTS_CXX)
# workaround for g++ versus Solaris (20131116)
case $cf_cv_system_name in
case "$cf_cv_system_name" in
(solaris2*)
case "x$CPPFLAGS" in
(*-D_XOPEN_SOURCE_EXTENDED*)
@ -2369,7 +2468,7 @@ fi
test "x$cf_with_trace" = xyes && NCURSES_INLINE=
UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
if test $cf_filter_syms = yes
if test "$cf_filter_syms" = yes
then
RESULTING_SYMS=resulting.map
fi
@ -2400,25 +2499,27 @@ AC_OUTPUT( \
$SUB_MAKEFILES \
Makefile,[
if test "x$cf_with_tests" != xno ; then
CF_PRG_RULES([$srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD"], test)
CF_PRG_RULES(["$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD"], test)
fi
CF_LIB_RULES($SRC_SUBDIRS)
if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
if test -z "$USE_OLD_MAKERULES" ; then
$AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
$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
AWK="$AWK"
ALTERNATE_SYMS="$ALTERNATE_SYMS"
AWK="$AWK"
CXX_NAME="$CXX_NAME"
DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
DFT_LWR_MODEL="$DFT_LWR_MODEL"
ECHO_LD="$ECHO_LD"
EXTRA_SUFFIX="$EXTRA_SUFFIX"
FORM_NAME="$FORM_NAME"
LDCONFIG="$LDCONFIG"
LIBTOOL_VERSION="$LIBTOOL_VERSION"
LIB_NAME="$LIB_NAME"
@ -2428,10 +2529,12 @@ LIB_SUFFIX="$LIB_SUFFIX"
LIB_TRACING="$LIB_TRACING"
LN_S="$LN_S"
MAKE_TERMINFO="$MAKE_TERMINFO"
MENU_NAME="$MENU_NAME"
NCURSES_MAJOR="$NCURSES_MAJOR"
NCURSES_MINOR="$NCURSES_MINOR"
NCURSES_OSPEED="$NCURSES_OSPEED"
NCURSES_PATCH="$NCURSES_PATCH"
PANEL_NAME="$PANEL_NAME"
SRC_SUBDIRS="$SRC_SUBDIRS"
TERMINFO="$TERMINFO"
TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
@ -2453,6 +2556,8 @@ WITH_CURSES_H="$with_curses_h"
WITH_ECHO="${enable_echo:=yes}"
WITH_OVERWRITE="$with_overwrite"
cf_LIST_MODELS="$cf_list_models"
cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
cf_cv_abi_version="$cf_cv_abi_version"
cf_cv_do_relink="$cf_cv_do_relink"
cf_cv_do_reranlib="$cf_cv_do_reranlib"

View File

@ -1,120 +0,0 @@
extproc perl -S -w
# $Id: convert_configure.pl,v 1.4 2020/02/02 23:34:34 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 1998-2000,2006 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. #
##############################################################################
# The converted script is written to stdout, so run this script as
# convert_configure configure > configure.cmd
#
# When the converted script runs, it expects that /tmp dir is
# available (so we create it).
#
# run the result like this:
# .\configure
# Some frequent manual intervention:
# a) Some makefiles hardwire SHELL = /bin/sh ==> change to: sh
# b) Some makefiles recognize that exe files terminate on .exe
# You need to give this script -no-zexe option...
shift, $no_zexe = 1 if @ARGV and $ARGV[0] eq '-no-zexe';
mkdir '/tmp', 0777 unless -d '/tmp';
print <<EOF;
extproc sh
EOF
print <<EOF unless $no_zexe;
# Make sensible defaults:
CC="gcc -Zexe -Zmt"
export CC
CXX="gcc -Zexe -Zmt"
export CXX
#GCCOPT="$GCCOPT -Zexe"
#export GCCOPT
EOF
print <<EOF;
CONFIG_SHELL=sh
export CONFIG_SHELL
# Optimization (GNU make 3.74 cannot be loaded :-():
emxload -m 30 sh.exe ls.exe tr.exe id.exe sed.exe # make.exe
emxload -m 30 grep.exe egrep.exe fgrep.exe cat.exe rm.exe mv.exe cp.exe
emxload -m 30 uniq.exe basename.exe sort.exe awk.exe echo.exe
EOF
$checking_path = 0;
while (<>) {
if (/for\s+(\w+)\s+in\s*\$(PATH|ac_dummy)\s*;/) {
$checking_path = 1;
$varname = $1;
$subst= <<EOS
$varname="`echo -E \\"\$$varname\\" | tr \\\\\\\\\\\\\\\\ / `"
EOS
}
if (/if\s+test\s+-z\s+\"\$INSTALL\"/) {
$checking_install = 1;
}
$checking_install = $checking_path = 0 if /^\s*done\s*$/;
# We want to create an extra line like this one:
# ac_dir="`echo -E \"$ac_dir\" | tr \\\\\\\\ / `"
s{^((\s*)if\s+test)\s*-f\s*(\$$varname/\S+)\s*;}
{$2$subst$1 -f $3 -o -f $3.exe ;}
if $checking_path; # Checking for executables
# change |/usr/sbin/*| to |/usr/sbin/*|?:[\\/]os2[\\/]install[\\/]*|
# in the list of things to skip (with both cases)
s{\Q|/usr/sbin/*|}
{|/usr/sbin/*|?:[\\\\/]os2[\\\\/]install[\\\\/]*|?:[\\\\/]OS2[\\\\/]INSTALL[\\\\/]*|}
if $checking_install; # Do not accept d:/os2/install/install.exe
s/^(host|build)=NONE$/$1=x86-emx-os2/; # Make default host/build
s/"\$\{IFS}:"$/"\${IFS};"/; # Fix IFS line
s/\bIFS=\":\"$/IFS=";"/; # Fix another IFS line
s/\btest\s+-s\s+conftest\b/test -f conftest/g; # Fix exe test
# This one is needed for curses:
s/^\s*host=`.*\$ac_config_sub \$host_alias`/$&\nif test -z "\$host"; then host=\$host_alias; fi/;
s,/bin/sh(?![/\w]),sh,g;
s,^(\s*/usr/sbin/sendmail\s*)\\$,$1 "`whence sendmail | tr '\\\\\\\\' / `" \\,;
print;
}
__END__
Changes: 98/11 : support check for executables in ncurses.
99/2 : support INSTALL,
new IFS=':' style
99/11 : find sendmail
00/01 : export CONFIG_SHELL
00/10 : new syntax for host=`...` line

View File

@ -1,5 +1,5 @@
##############################################################################
# Copyright 2018-2019,2020 Thomas E. Dickey #
# Copyright 2018-2020,2021 Thomas E. Dickey #
# Copyright 1998-2017,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -26,7 +26,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.1335 2020/02/15 09:30:48 tom Exp $
# $Id: dist.mk,v 1.1401 2021/02/20 12:06:34 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -38,7 +38,7 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 2
NCURSES_PATCH = 20200215
NCURSES_PATCH = 20210220
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
@ -97,7 +97,7 @@ doc/hackguide.doc: doc/html/hackguide.html
# If that conflicts with the --without-manpage-renames, you can install those
# in a different location using the --with-install-prefix option of the
# configure script.
MANPROG = tbl | nroff -mandoc -rLL=78n -rLT=78n -Tascii
MANPROG = tbl | nroff -mandoc -rHY=0 -rLL=78n -rLT=78n -Tascii
manhtml:
@for f in doc/html/man/*.html; do \

View File

@ -1,5 +1,5 @@
<!--
$Id: announce.html,v 1.61 2020/02/09 21:26:51 tom Exp $
$Id: announce.html,v 1.64 2020/10/19 08:18:48 tom Exp $
****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* *
@ -356,7 +356,7 @@
<li>
<p>marked <a href=
"https://invisible-island.net/ncurses/man/curs_printw.3x.html#h3-PORTABILITY">
"https://invisible-island.net/ncurses/man/curs_printw.3x.html#h2-PORTABILITY">
<tt>vwprintw</tt></a> and <tt>vwscanw</tt> as deprecated;
recommend using <a href=
"https://invisible-island.net/ncurses/man/curs_printw.3x.html">
@ -520,7 +520,8 @@
<h3><a name="h3-programs" id="h3-programs">Program
improvements</a></h3>
<p>Several improvements were made to the utility programs:</p>
<p id="h4-utilities">Several improvements were made to the
utility programs:</p>
<dl>
<dt><span class="part-name">clear</span>
@ -1073,7 +1074,7 @@
with a different developer.</li>
<li><a href=
"https://invisible-island.net/ncurses/man/tabs.1">tabs.1</a>
"https://invisible-island.net/ncurses/man/tabs.1.html">tabs.1</a>
tells more than you wanted to know about the tool.</li>
<li><a href=
@ -1117,7 +1118,7 @@
the line-drawing characters.</li>
<li><a href=
"https://invisible-island.net/ncurses/man/curs_color.3x.html#h3-RETURN-VALUE">
"https://invisible-island.net/ncurses/man/curs_color.3x.html#h2-RETURN-VALUE">
curs_color.3x</a> improves discussion of error returns and
extensions.</li>

View File

@ -1,6 +1,6 @@
# $Id: Makefile.in,v 1.65 2020/02/02 23:34:34 tom Exp $
# $Id: Makefile.in,v 1.71 2021/01/23 20:42:08 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 2020,2021 Thomas E. Dickey #
# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
@ -90,16 +90,18 @@ ETAGS = @ETAGS@
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@
INCDIR = $(top_srcdir)/include
BASE_DIR = $(top_srcdir)/ncurses
CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H -DBUILDING_FORM @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@ -149,11 +151,24 @@ $(DESTDIR)$(libdir) :
cp $(srcdir)/form.h $@
HEADER_DEPS = \
$(srcdir)/form.priv.h \
$(srcdir)/form.h \
../include/mf_common.h \
../include/curses.h \
../include/eti.h
../include/eti.h \
../include/mf_common.h \
../include/ncurses_cfg.h \
../include/ncurses_def.h \
../include/ncurses_dll.h \
../include/term.h \
../include/unctrl.h \
$(BASE_DIR)/curses.priv.h \
$(BASE_DIR)/new_pair.h \
$(INCDIR)/nc_alloc.h \
$(INCDIR)/nc_panel.h \
$(INCDIR)/nc_string.h \
$(INCDIR)/nc_termios.h \
$(INCDIR)/nc_tparm.h \
$(INCDIR)/term_entry.h \
$(srcdir)/form.h \
$(srcdir)/form.priv.h
tags:
$(CTAGS) *.[ch]
@ -175,7 +190,7 @@ realclean :: distclean
../include/mf_common.h \
../include/eti.h :
cd ../menu && $(MAKE) $@
( cd ../menu && $(MAKE) $@ )
###############################################################################
# The remainder of this file is automatically generated during configuration

View File

@ -33,37 +33,37 @@
#include "form.priv.h"
MODULE_ID("$Id: f_trace.c,v 1.5 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: f_trace.c,v 1.6 2020/05/24 01:40:20 anonymous.maarten Exp $")
NCURSES_EXPORT(FIELD **)
FORM_EXPORT(FIELD **)
_nc_retrace_field_ptr(FIELD **code)
{
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
_nc_retrace_field(FIELD *code)
{
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_retrace_field_type(FIELDTYPE *code)
{
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(FORM *)
FORM_EXPORT(FORM *)
_nc_retrace_form(FORM *code)
{
T((T_RETURN("%p"), (void *)code));
return code;
}
NCURSES_EXPORT(Form_Hook)
FORM_EXPORT(Form_Hook)
_nc_retrace_form_hook(Form_Hook code)
{
TR_FUNC_BFR(1);

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_arg.c,v 1.18 2020/12/11 22:05:24 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -61,7 +61,7 @@ MODULE_ID("$Id: fld_arg.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_fieldtype_arg(FIELDTYPE *typ,
void *(*const make_arg)(va_list *),
void *(*const copy_arg)(const void *),
@ -90,11 +90,11 @@ set_fieldtype_arg(FIELDTYPE *typ,
| Facility : libnform
| Function : void *field_arg(const FIELD *field)
|
| Description : Retrieve pointer to the fields argument structure.
| Description : Retrieve pointer to the field's argument structure.
|
| Return Values : Pointer to structure or NULL if none is defined.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void *)
FORM_EXPORT(void *)
field_arg(const FIELD *field)
{
T((T_CALLED("field_arg(%p)"), (const void *)field));

View File

@ -33,14 +33,14 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_attr.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_attr.c,v 1.15 2020/12/11 22:05:24 tom Exp $")
/*----------------------------------------------------------------------------
Field-Attribute manipulation routines
--------------------------------------------------------------------------*/
/* "Template" macro to generate a function to set a fields attribute */
/* "Template" macro to generate a function to set a field's attribute */
#define GEN_FIELD_ATTR_SET_FCT( name ) \
NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
FORM_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
{\
int res = E_BAD_ARGUMENT;\
T((T_CALLED("set_field_" #name "(%p,%s)"), (void *)field, _traceattr(attr)));\
@ -63,9 +63,9 @@ NCURSES_IMPEXP int NCURSES_API set_field_ ## name (FIELD * field, chtype attr)\
RETURN(res);\
}
/* "Template" macro to generate a function to get a fields attribute */
/* "Template" macro to generate a function to get a field's attribute */
#define GEN_FIELD_ATTR_GET_FCT( name ) \
NCURSES_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
FORM_IMPEXP chtype NCURSES_API field_ ## name (const FIELD * field)\
{\
T((T_CALLED("field_" #name "(%p)"), (const void *) field));\
returnAttr( A_ATTRIBUTES & (Normalize_Field( field ) -> name) );\
@ -88,7 +88,7 @@ GEN_FIELD_ATTR_SET_FCT(fore)
| Facility : libnform
| Function : chtype field_fore(const FIELD *)
|
| Description : Retrieve fields foreground attribute
| Description : Retrieve field's foreground attribute
|
| Return Values : The foreground attribute
+--------------------------------------------------------------------------*/
@ -99,7 +99,7 @@ GEN_FIELD_ATTR_GET_FCT(fore)
| Function : int set_field_back(FIELD *field, chtype attr)
|
| Description : Sets the background of the field used to display the
| fields extend.
| field's extend.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid attributes
@ -111,7 +111,7 @@ GEN_FIELD_ATTR_SET_FCT(back)
| Facility : libnform
| Function : chtype field_back(const
|
| Description : Retrieve fields background attribute
| Description : Retrieve field's background attribute
|
| Return Values : The background attribute
+--------------------------------------------------------------------------*/

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_current.c,v 1.16 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_current.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
| E_INVALID_FIELD - current field can't be left
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_current_field(FORM *form, FIELD *field)
{
int err = E_OK;
@ -113,7 +113,7 @@ set_current_field(FORM *form, FIELD *field)
| E_BAD_ARGUMENT - invalid form pointer
| E_REQUEST_DENIED - there is no current field to unfocus
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
unfocus_current_field(FORM *const form)
{
T((T_CALLED("unfocus_current_field(%p)"), (const void *)form));
@ -137,7 +137,7 @@ unfocus_current_field(FORM *const form)
|
| Return Values : Pointer to the current field.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
current_field(const FORM *form)
{
T((T_CALLED("current_field(%p)"), (const void *)form));
@ -154,7 +154,7 @@ current_field(const FORM *form)
| Return Values : >= 0 : field index
| -1 : fieldpointer invalid or field not connected
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_index(const FIELD *field)
{
T((T_CALLED("field_index(%p)"), (const void *)field));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_def.c,v 1.42 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_def.c,v 1.43 2020/05/24 01:40:20 anonymous.maarten Exp $")
/* this can't be readonly */
static FIELD default_field =
@ -66,7 +66,7 @@ static FIELD default_field =
NCURSES_FIELD_EXTENSION
};
NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
FORM_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
/*---------------------------------------------------------------------------
| Facility : libnform
@ -82,7 +82,7 @@ NCURSES_EXPORT_VAR(FIELD *) _nc_Default_Field = &default_field;
| Return Values : Pointer to argument structure. Maybe NULL.
| In case of an error in *err an error counter is increased.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(TypeArgument *)
FORM_EXPORT(TypeArgument *)
_nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
{
TypeArgument *res = (TypeArgument *)0;
@ -130,7 +130,7 @@ _nc_Make_Argument(const FIELDTYPE *typ, va_list *ap, int *err)
| Return Values : Pointer to argument structure. Maybe NULL.
| In case of an error in *err an error counter is increased.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(TypeArgument *)
FORM_EXPORT(TypeArgument *)
_nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
{
TypeArgument *res = (TypeArgument *)0;
@ -179,7 +179,7 @@ _nc_Copy_Argument(const FIELDTYPE *typ, const TypeArgument *argp, int *err)
|
| Return Values : -
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void)
FORM_EXPORT(void)
_nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
{
if (typ != 0 && (typ->status & _HAS_ARGS) != 0)
@ -212,7 +212,7 @@ _nc_Free_Argument(const FIELDTYPE *typ, TypeArgument *argp)
| Return Values : TRUE - copy worked
| FALSE - error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
_nc_Copy_Type(FIELD *dst, FIELD const *src)
{
int err = 0;
@ -247,7 +247,7 @@ _nc_Copy_Type(FIELD *dst, FIELD const *src)
|
| Return Values : -
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void)
FORM_EXPORT(void)
_nc_Free_Type(FIELD *field)
{
assert(field != 0);
@ -274,7 +274,7 @@ _nc_Free_Type(FIELD *field)
|
| Return Values : Pointer to the new field or NULL if failure.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
{
static const FIELD_CELL blank = BLANK;
@ -354,7 +354,7 @@ new_field(int rows, int cols, int frow, int fcol, int nrow, int nbuf)
| E_BAD_ARGUMENT - invalid field pointer
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
free_field(FIELD *field)
{
T((T_CALLED("free_field(%p)"), (void *)field));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_dup.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_dup.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -48,7 +48,7 @@ MODULE_ID("$Id: fld_dup.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
|
| Return Values : Pointer to the new field or NULL if failure
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
dup_field(FIELD *field, int frow, int fcol)
{
FIELD *New_Field = (FIELD *)0;
@ -61,8 +61,8 @@ dup_field(FIELD *field, int frow, int fcol)
{
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = (short) frow;
New_Field->fcol = (short) fcol;
New_Field->frow = (short)frow;
New_Field->fcol = (short)fcol;
New_Field->link = New_Field;
New_Field->rows = field->rows;
New_Field->cols = field->cols;
@ -80,13 +80,12 @@ dup_field(FIELD *field, int frow, int fcol)
if (_nc_Copy_Type(New_Field, field))
{
size_t i, len;
size_t len;
len = Total_Buffer_Size(New_Field);
if ((New_Field->buf = (FIELD_CELL *)malloc(len)))
if ((New_Field->buf = (FIELD_CELL *)malloc(len * 20)))
{
for (i = 0; i < len; ++i)
New_Field->buf[i] = field->buf[i];
memcpy(New_Field->buf, field->buf, len);
returnField(New_Field);
}
}

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_ftchoice.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,7 @@ MODULE_ID("$Id: fld_ftchoice.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid arguments
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_fieldtype_choice(FIELDTYPE *typ,
bool (*const next_choice) (FIELD *, const void *),
bool (*const prev_choice) (FIELD *, const void *))

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_ftlink.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_ftlink.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
|
| Return Values : Fieldtype pointer or NULL if error occurred.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
link_fieldtype(FIELDTYPE *type1, FIELDTYPE *type2)
{
FIELDTYPE *nftyp = (FIELDTYPE *)0;

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_info.c,v 1.15 2020/12/12 01:05:42 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -42,12 +42,12 @@ MODULE_ID("$Id: fld_info.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
| int *frow, int *fcol,
| int *nrow, int *nbuf)
|
| Description : Retrieve infos about the fields creation parameters.
| Description : Retrieve information about the field's creation parameters.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid field pointer
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_info(const FIELD *field,
int *rows, int *cols,
int *frow, int *fcol,
@ -83,13 +83,13 @@ field_info(const FIELD *field,
| int *drows, int *dcols,
| int *maxgrow)
|
| Description : Retrieve informations about a dynamic fields current
| Description : Retrieve information about a dynamic field's current
| dynamic parameters.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
dynamic_field_info(const FIELD *field, int *drows, int *dcols, int *maxgrow)
{
T((T_CALLED("dynamic_field_info(%p,%p,%p,%p)"),

View File

@ -33,19 +33,19 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_just.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_just.c,v 1.16 2020/12/11 23:16:37 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_just(FIELD *field, int just)
|
| Description : Set the fields type of justification.
| Description : Set the field's type of justification.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - one of the arguments was incorrect
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_just(FIELD *field, int just)
{
int res = E_BAD_ARGUMENT;
@ -60,7 +60,7 @@ set_field_just(FIELD *field, int just)
Normalize_Field(field);
if (field->just != just)
{
field->just = (short) just;
field->just = (short)just;
res = _nc_Synchronize_Attributes(field);
}
else
@ -73,11 +73,11 @@ set_field_just(FIELD *field, int just)
| Facility : libnform
| Function : int field_just( const FIELD *field )
|
| Description : Retrieve the fields type of justification
| Description : Retrieve the field's type of justification
|
| Return Values : The justification type.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_just(const FIELD *field)
{
T((T_CALLED("field_just(%p)"), (const void *)field));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_link.c,v 1.16 2020/12/11 23:20:32 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -49,7 +49,7 @@ MODULE_ID("$Id: fld_link.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
|
| Return Values : Pointer to the new field or NULL if failure
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
link_field(FIELD *field, int frow, int fcol)
{
FIELD *New_Field = (FIELD *)0;
@ -62,8 +62,8 @@ link_field(FIELD *field, int frow, int fcol)
{
T((T_CREATE("field %p"), (void *)New_Field));
*New_Field = *_nc_Default_Field;
New_Field->frow = (short) frow;
New_Field->fcol = (short) fcol;
New_Field->frow = (short)frow;
New_Field->fcol = (short)fcol;
New_Field->link = field->link;
field->link = New_Field;

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_max.c,v 1.17 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_max.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_max_field(FIELD *field, int maxgrow)
{
T((T_CALLED("set_max_field(%p,%d)"), (void *)field, maxgrow));

View File

@ -33,20 +33,20 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_move.c,v 1.15 2020/12/11 23:48:05 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int move_field(FIELD *field,int frow, int fcol)
|
| Description : Moves the disconnected field to the new location in
| the forms subwindow.
| the form's subwindow.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument passed
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
move_field(FIELD *field, int frow, int fcol)
{
T((T_CALLED("move_field(%p,%d,%d)"), (void *)field, frow, fcol));
@ -57,8 +57,8 @@ move_field(FIELD *field, int frow, int fcol)
if (field->form)
RETURN(E_CONNECTED);
field->frow = (short) frow;
field->fcol = (short) fcol;
field->frow = (short)frow;
field->fcol = (short)fcol;
RETURN(E_OK);
}

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_newftyp.c,v 1.22 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_newftyp.c,v 1.23 2020/05/24 01:40:20 anonymous.maarten Exp $")
static FIELDTYPE default_fieldtype =
{
@ -53,7 +53,7 @@ static FIELDTYPE default_fieldtype =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE *)
FORM_EXPORT_VAR(FIELDTYPE *)
_nc_Default_FieldType = &default_fieldtype;
/*---------------------------------------------------------------------------
@ -71,7 +71,7 @@ NCURSES_EXPORT_VAR(FIELDTYPE *)
|
| Return Values : Fieldtype pointer or NULL if error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
new_fieldtype(bool (*const field_check) (FIELD *, const void *),
bool (*const char_check) (int, const void *))
{
@ -121,7 +121,7 @@ new_fieldtype(bool (*const field_check) (FIELD *, const void *),
| E_CONNECTED - there are fields referencing the type
| E_BAD_ARGUMENT - invalid fieldtype pointer
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
free_fieldtype(FIELDTYPE *typ)
{
T((T_CALLED("free_fieldtype(%p)"), (void *)typ));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_opts.c,v 1.15 2020/12/11 22:05:24 tom Exp $")
/*----------------------------------------------------------------------------
Field-Options manipulation routines
@ -51,7 +51,7 @@ MODULE_ID("$Id: fld_opts.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
| E_BAD_ARGUMENT - invalid options
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_opts(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
@ -68,11 +68,11 @@ set_field_opts(FIELD *field, Field_Options opts)
| Facility : libnform
| Function : Field_Options field_opts(const FIELD *field)
|
| Description : Retrieve the fields options.
| Description : Retrieve the field's options.
|
| Return Values : The options.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(Field_Options)
FORM_EXPORT(Field_Options)
field_opts(const FIELD *field)
{
T((T_CALLED("field_opts(%p)"), (const void *)field));
@ -92,7 +92,7 @@ field_opts(const FIELD *field)
| E_BAD_ARGUMENT - invalid options
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_opts_on(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;
@ -120,7 +120,7 @@ field_opts_on(FIELD *field, Field_Options opts)
| E_BAD_ARGUMENT - invalid options
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_opts_off(FIELD *field, Field_Options opts)
{
int res = E_BAD_ARGUMENT;

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_pad.c,v 1.13 2020/12/11 22:05:24 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,7 +46,7 @@ MODULE_ID("$Id: fld_pad.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
| E_BAD_ARGUMENT - invalid field pointer or pad character
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_pad(FIELD *field, int ch)
{
int res = E_BAD_ARGUMENT;
@ -71,11 +71,11 @@ set_field_pad(FIELD *field, int ch)
| Facility : libnform
| Function : int field_pad(const FIELD *field)
|
| Description : Retrieve the fields pad character.
| Description : Retrieve the field's pad character.
|
| Return Values : The pad character.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_pad(const FIELD *field)
{
T((T_CALLED("field_pad(%p)"), (const void *)field));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_page.c,v 1.15 2020/12/11 23:15:26 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -45,7 +45,7 @@ MODULE_ID("$Id: fld_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_CONNECTED - field is connected
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_new_page(FIELD *field, bool new_page_flag)
{
T((T_CALLED("set_new_page(%p,%d)"), (void *)field, new_page_flag));
@ -66,13 +66,13 @@ set_new_page(FIELD *field, bool new_page_flag)
| Facility : libnform
| Function : bool new_page(const FIELD *field)
|
| Description : Retrieve the info whether or not the field starts a
| new page on the form.
| Description : Retrieve the information whether or not the field starts
| a new page on the form.
|
| Return Values : TRUE - field starts a new page
| FALSE - field doesn't start a new page
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
new_page(const FIELD *field)
{
T((T_CALLED("new_page(%p)"), (const void *)field));

View File

@ -33,18 +33,18 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_stat.c,v 1.15 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_stat.c,v 1.17 2020/12/11 22:05:24 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_status(FIELD *field, bool status)
|
| Description : Set or clear the 'changed' indication flag for that
| fields primary buffer.
| field's primary buffer.
|
| Return Values : E_OK - success
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_status(FIELD *field, bool status)
{
T((T_CALLED("set_field_status(%p,%d)"), (void *)field, status));
@ -64,12 +64,12 @@ set_field_status(FIELD *field, bool status)
| Function : bool field_status(const FIELD *field)
|
| Description : Retrieve the value of the 'changed' indication flag
| for that fields primary buffer.
| for that field's primary buffer.
|
| Return Values : TRUE - buffer has been changed
| FALSE - buffer has not been changed
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
field_status(const FIELD *field)
{
T((T_CALLED("field_status(%p)"), (const void *)field));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_type.c,v 1.19 2020/12/11 23:20:37 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -46,8 +46,8 @@ MODULE_ID("$Id: fld_type.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
set_field_type(FIELD *field, FIELDTYPE *type,...)
FORM_EXPORT(int)
set_field_type(FIELD *field, FIELDTYPE *type, ...)
{
va_list ap;
int res = E_SYSTEM_ERROR;
@ -88,7 +88,7 @@ set_field_type(FIELD *field, FIELDTYPE *type,...)
|
| Return Values : Pointer to fieldtype of NULL if none is defined.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
field_type(const FIELD *field)
{
T((T_CALLED("field_type(%p)"), (const void *)field));

View File

@ -33,18 +33,18 @@
#include "form.priv.h"
MODULE_ID("$Id: fld_user.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fld_user.c,v 1.19 2020/12/12 01:05:34 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_field_userptr(FIELD *field, void *usrptr)
|
| Description : Set the pointer that is reserved in any field to store
| application relevant informations
| application relevant information.
|
| Return Values : E_OK - on success
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_userptr(FIELD *field, void *usrptr)
{
T((T_CALLED("set_field_userptr(%p,%p)"), (void *)field, (void *)usrptr));
@ -58,12 +58,12 @@ set_field_userptr(FIELD *field, void *usrptr)
| Function : void *field_userptr(const FIELD *field)
|
| Description : Return the pointer that is reserved in any field to
| store application relevant informations.
| store application relevant information.
|
| Return Values : Value of pointer. If no such pointer has been set,
| NULL is returned
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void *)
FORM_EXPORT(void *)
field_userptr(const FIELD *field)
{
T((T_CALLED("field_userptr(%p)"), (const void *)field));

View File

@ -31,7 +31,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.h,v 0.30 2020/02/02 23:34:34 tom Exp $ */
/* $Id: form.h,v 0.31 2020/07/04 20:38:43 tom Exp $ */
#ifndef FORM_H
#define FORM_H
@ -44,6 +44,17 @@
extern "C" {
#endif
#if defined(BUILDING_FORM)
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define FORM_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
#define FORM_WRAPPED_VAR(type,name) extern FORM_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define FORM_EXPORT(type) FORM_IMPEXP type NCURSES_API
#define FORM_EXPORT_VAR(type) FORM_IMPEXP type
#ifndef FORM_PRIV_H
typedef void *FIELD_CELL;
#endif
@ -309,136 +320,136 @@ typedef void (*Form_Hook)(FORM *);
/*************************
* standard field types *
*************************/
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALPHA;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ALNUM;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_ENUM;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_INTEGER;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_NUMERIC;
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_REGEXP;
/************************************
* built-in additional field types *
* They are not defined in SVr4 *
************************************/
extern NCURSES_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
extern FORM_EXPORT_VAR(FIELDTYPE *) TYPE_IPV4; /* Internet IP Version 4 address */
/***********************
* FIELDTYPE routines *
***********************/
extern NCURSES_EXPORT(FIELDTYPE *) new_fieldtype (
extern FORM_EXPORT(FIELDTYPE *) new_fieldtype (
bool (* const field_check)(FIELD *,const void *),
bool (* const char_check)(int,const void *));
extern NCURSES_EXPORT(FIELDTYPE *) link_fieldtype(
extern FORM_EXPORT(FIELDTYPE *) link_fieldtype(
FIELDTYPE *, FIELDTYPE *);
extern NCURSES_EXPORT(int) free_fieldtype (FIELDTYPE *);
extern NCURSES_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
extern FORM_EXPORT(int) free_fieldtype (FIELDTYPE *);
extern FORM_EXPORT(int) set_fieldtype_arg (FIELDTYPE *,
void * (* const make_arg)(va_list *),
void * (* const copy_arg)(const void *),
void (* const free_arg)(void *));
extern NCURSES_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
extern FORM_EXPORT(int) set_fieldtype_choice (FIELDTYPE *,
bool (* const next_choice)(FIELD *,const void *),
bool (* const prev_choice)(FIELD *,const void *));
/*******************
* FIELD routines *
*******************/
extern NCURSES_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
extern NCURSES_EXPORT(FIELD *) dup_field (FIELD *,int,int);
extern NCURSES_EXPORT(FIELD *) link_field (FIELD *,int,int);
extern FORM_EXPORT(FIELD *) new_field (int,int,int,int,int,int);
extern FORM_EXPORT(FIELD *) dup_field (FIELD *,int,int);
extern FORM_EXPORT(FIELD *) link_field (FIELD *,int,int);
extern NCURSES_EXPORT(int) free_field (FIELD *);
extern NCURSES_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
extern NCURSES_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
extern NCURSES_EXPORT(int) set_max_field ( FIELD *,int);
extern NCURSES_EXPORT(int) move_field (FIELD *,int,int);
extern NCURSES_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
extern NCURSES_EXPORT(int) set_new_page (FIELD *,bool);
extern NCURSES_EXPORT(int) set_field_just (FIELD *,int);
extern NCURSES_EXPORT(int) field_just (const FIELD *);
extern NCURSES_EXPORT(int) set_field_fore (FIELD *,chtype);
extern NCURSES_EXPORT(int) set_field_back (FIELD *,chtype);
extern NCURSES_EXPORT(int) set_field_pad (FIELD *,int);
extern NCURSES_EXPORT(int) field_pad (const FIELD *);
extern NCURSES_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
extern NCURSES_EXPORT(int) set_field_status (FIELD *,bool);
extern NCURSES_EXPORT(int) set_field_userptr (FIELD *, void *);
extern NCURSES_EXPORT(int) set_field_opts (FIELD *,Field_Options);
extern NCURSES_EXPORT(int) field_opts_on (FIELD *,Field_Options);
extern NCURSES_EXPORT(int) field_opts_off (FIELD *,Field_Options);
extern FORM_EXPORT(int) free_field (FIELD *);
extern FORM_EXPORT(int) field_info (const FIELD *,int *,int *,int *,int *,int *,int *);
extern FORM_EXPORT(int) dynamic_field_info (const FIELD *,int *,int *,int *);
extern FORM_EXPORT(int) set_max_field ( FIELD *,int);
extern FORM_EXPORT(int) move_field (FIELD *,int,int);
extern FORM_EXPORT(int) set_field_type (FIELD *,FIELDTYPE *,...);
extern FORM_EXPORT(int) set_new_page (FIELD *,bool);
extern FORM_EXPORT(int) set_field_just (FIELD *,int);
extern FORM_EXPORT(int) field_just (const FIELD *);
extern FORM_EXPORT(int) set_field_fore (FIELD *,chtype);
extern FORM_EXPORT(int) set_field_back (FIELD *,chtype);
extern FORM_EXPORT(int) set_field_pad (FIELD *,int);
extern FORM_EXPORT(int) field_pad (const FIELD *);
extern FORM_EXPORT(int) set_field_buffer (FIELD *,int,const char *);
extern FORM_EXPORT(int) set_field_status (FIELD *,bool);
extern FORM_EXPORT(int) set_field_userptr (FIELD *, void *);
extern FORM_EXPORT(int) set_field_opts (FIELD *,Field_Options);
extern FORM_EXPORT(int) field_opts_on (FIELD *,Field_Options);
extern FORM_EXPORT(int) field_opts_off (FIELD *,Field_Options);
extern NCURSES_EXPORT(chtype) field_fore (const FIELD *);
extern NCURSES_EXPORT(chtype) field_back (const FIELD *);
extern FORM_EXPORT(chtype) field_fore (const FIELD *);
extern FORM_EXPORT(chtype) field_back (const FIELD *);
extern NCURSES_EXPORT(bool) new_page (const FIELD *);
extern NCURSES_EXPORT(bool) field_status (const FIELD *);
extern FORM_EXPORT(bool) new_page (const FIELD *);
extern FORM_EXPORT(bool) field_status (const FIELD *);
extern NCURSES_EXPORT(void *) field_arg (const FIELD *);
extern FORM_EXPORT(void *) field_arg (const FIELD *);
extern NCURSES_EXPORT(void *) field_userptr (const FIELD *);
extern FORM_EXPORT(void *) field_userptr (const FIELD *);
extern NCURSES_EXPORT(FIELDTYPE *) field_type (const FIELD *);
extern FORM_EXPORT(FIELDTYPE *) field_type (const FIELD *);
extern NCURSES_EXPORT(char *) field_buffer (const FIELD *,int);
extern FORM_EXPORT(char *) field_buffer (const FIELD *,int);
extern NCURSES_EXPORT(Field_Options) field_opts (const FIELD *);
extern FORM_EXPORT(Field_Options) field_opts (const FIELD *);
/******************
* FORM routines *
******************/
extern NCURSES_EXPORT(FORM *) new_form (FIELD **);
extern FORM_EXPORT(FORM *) new_form (FIELD **);
extern NCURSES_EXPORT(FIELD **) form_fields (const FORM *);
extern NCURSES_EXPORT(FIELD *) current_field (const FORM *);
extern FORM_EXPORT(FIELD **) form_fields (const FORM *);
extern FORM_EXPORT(FIELD *) current_field (const FORM *);
extern NCURSES_EXPORT(WINDOW *) form_win (const FORM *);
extern NCURSES_EXPORT(WINDOW *) form_sub (const FORM *);
extern FORM_EXPORT(WINDOW *) form_win (const FORM *);
extern FORM_EXPORT(WINDOW *) form_sub (const FORM *);
extern NCURSES_EXPORT(Form_Hook) form_init (const FORM *);
extern NCURSES_EXPORT(Form_Hook) form_term (const FORM *);
extern NCURSES_EXPORT(Form_Hook) field_init (const FORM *);
extern NCURSES_EXPORT(Form_Hook) field_term (const FORM *);
extern FORM_EXPORT(Form_Hook) form_init (const FORM *);
extern FORM_EXPORT(Form_Hook) form_term (const FORM *);
extern FORM_EXPORT(Form_Hook) field_init (const FORM *);
extern FORM_EXPORT(Form_Hook) field_term (const FORM *);
extern NCURSES_EXPORT(int) free_form (FORM *);
extern NCURSES_EXPORT(int) set_form_fields (FORM *,FIELD **);
extern NCURSES_EXPORT(int) field_count (const FORM *);
extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *);
extern NCURSES_EXPORT(int) unfocus_current_field (FORM *);
extern NCURSES_EXPORT(int) field_index (const FIELD *);
extern NCURSES_EXPORT(int) set_form_page (FORM *,int);
extern NCURSES_EXPORT(int) form_page (const FORM *);
extern NCURSES_EXPORT(int) scale_form (const FORM *,int *,int *);
extern NCURSES_EXPORT(int) set_form_init (FORM *,Form_Hook);
extern NCURSES_EXPORT(int) set_form_term (FORM *,Form_Hook);
extern NCURSES_EXPORT(int) set_field_init (FORM *,Form_Hook);
extern NCURSES_EXPORT(int) set_field_term (FORM *,Form_Hook);
extern NCURSES_EXPORT(int) post_form (FORM *);
extern NCURSES_EXPORT(int) unpost_form (FORM *);
extern NCURSES_EXPORT(int) pos_form_cursor (FORM *);
extern NCURSES_EXPORT(int) form_driver (FORM *,int);
extern FORM_EXPORT(int) free_form (FORM *);
extern FORM_EXPORT(int) set_form_fields (FORM *,FIELD **);
extern FORM_EXPORT(int) field_count (const FORM *);
extern FORM_EXPORT(int) set_form_win (FORM *,WINDOW *);
extern FORM_EXPORT(int) set_form_sub (FORM *,WINDOW *);
extern FORM_EXPORT(int) set_current_field (FORM *,FIELD *);
extern FORM_EXPORT(int) unfocus_current_field (FORM *);
extern FORM_EXPORT(int) field_index (const FIELD *);
extern FORM_EXPORT(int) set_form_page (FORM *,int);
extern FORM_EXPORT(int) form_page (const FORM *);
extern FORM_EXPORT(int) scale_form (const FORM *,int *,int *);
extern FORM_EXPORT(int) set_form_init (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_form_term (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_field_init (FORM *,Form_Hook);
extern FORM_EXPORT(int) set_field_term (FORM *,Form_Hook);
extern FORM_EXPORT(int) post_form (FORM *);
extern FORM_EXPORT(int) unpost_form (FORM *);
extern FORM_EXPORT(int) pos_form_cursor (FORM *);
extern FORM_EXPORT(int) form_driver (FORM *,int);
# if NCURSES_WIDECHAR
extern NCURSES_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
extern FORM_EXPORT(int) form_driver_w (FORM *,int,wchar_t);
# endif
extern NCURSES_EXPORT(int) set_form_userptr (FORM *,void *);
extern NCURSES_EXPORT(int) set_form_opts (FORM *,Form_Options);
extern NCURSES_EXPORT(int) form_opts_on (FORM *,Form_Options);
extern NCURSES_EXPORT(int) form_opts_off (FORM *,Form_Options);
extern NCURSES_EXPORT(int) form_request_by_name (const char *);
extern FORM_EXPORT(int) set_form_userptr (FORM *,void *);
extern FORM_EXPORT(int) set_form_opts (FORM *,Form_Options);
extern FORM_EXPORT(int) form_opts_on (FORM *,Form_Options);
extern FORM_EXPORT(int) form_opts_off (FORM *,Form_Options);
extern FORM_EXPORT(int) form_request_by_name (const char *);
extern NCURSES_EXPORT(const char *) form_request_name (int);
extern FORM_EXPORT(const char *) form_request_name (int);
extern NCURSES_EXPORT(void *) form_userptr (const FORM *);
extern FORM_EXPORT(void *) form_userptr (const FORM *);
extern NCURSES_EXPORT(Form_Options) form_opts (const FORM *);
extern FORM_EXPORT(Form_Options) form_opts (const FORM *);
extern NCURSES_EXPORT(bool) data_ahead (const FORM *);
extern NCURSES_EXPORT(bool) data_behind (const FORM *);
extern FORM_EXPORT(bool) data_ahead (const FORM *);
extern FORM_EXPORT(bool) data_behind (const FORM *);
#if NCURSES_SP_FUNCS
extern NCURSES_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
extern FORM_EXPORT(FORM *) NCURSES_SP_NAME(new_form) (SCREEN*, FIELD **);
#endif
#ifdef __cplusplus

View File

@ -31,7 +31,7 @@
* Author: Juergen Pfeifer, 1995,1997 *
****************************************************************************/
/* $Id: form.priv.h,v 0.45 2020/02/02 23:34:34 tom Exp $ */
/* $Id: form.priv.h,v 0.47 2020/12/11 23:20:11 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
@ -69,9 +69,9 @@
/***********************
* 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;
extern FORM_EXPORT_VAR(FORM *) _nc_Default_Form;
extern FORM_EXPORT_VAR(FIELD *) _nc_Default_Field;
extern FORM_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
/* form status values */
#define _OVLMODE (0x04U) /* Form is in overlay mode */
@ -110,7 +110,7 @@ extern NCURSES_EXPORT_VAR(FIELDTYPE *) _nc_Default_FieldType;
#define Get_Form_Screen(form) CURRENT_SCREEN
#endif
/* Retrieve forms window */
/* Retrieve form's window */
#define Get_Form_Window(form) \
((form)->sub \
? (form)->sub \
@ -176,32 +176,32 @@ TypeArgument;
#define C_ZEROS '\0'
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*);
extern NCURSES_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *);
extern NCURSES_EXPORT(void) _nc_Free_Type (FIELD *);
extern FORM_EXPORT(TypeArgument *) _nc_Make_Argument (const FIELDTYPE*, va_list*, int*);
extern FORM_EXPORT(TypeArgument *) _nc_Copy_Argument (const FIELDTYPE*, const TypeArgument*, int*);
extern FORM_EXPORT(void) _nc_Free_Argument (const FIELDTYPE*, TypeArgument*);
extern FORM_EXPORT(bool) _nc_Copy_Type (FIELD*, FIELD const *);
extern FORM_EXPORT(void) _nc_Free_Type (FIELD *);
extern NCURSES_EXPORT(int) _nc_Synchronize_Attributes (FIELD*);
extern NCURSES_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options);
extern NCURSES_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*);
extern NCURSES_EXPORT(int) _nc_Refresh_Current_Field (FORM*);
extern NCURSES_EXPORT(FIELD *) _nc_First_Active_Field (FORM*);
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*);
extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form);
extern FORM_EXPORT(int) _nc_Synchronize_Attributes (FIELD*);
extern FORM_EXPORT(int) _nc_Synchronize_Options (FIELD*, Field_Options);
extern FORM_EXPORT(int) _nc_Set_Form_Page (FORM*, int, FIELD*);
extern FORM_EXPORT(int) _nc_Refresh_Current_Field (FORM*);
extern FORM_EXPORT(FIELD *) _nc_First_Active_Field (FORM*);
extern FORM_EXPORT(bool) _nc_Internal_Validation (FORM*);
extern FORM_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
extern FORM_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
extern FORM_EXPORT(void) _nc_Unset_Current_Field(FORM *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 FORM_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALNUM(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ALPHA(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_ENUM(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_NUMERIC(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_REGEXP(void);
extern FORM_EXPORT(FIELDTYPE *) _nc_TYPE_IPV4(void);
extern NCURSES_EXPORT(FIELDTYPE *)
extern FORM_EXPORT(FIELDTYPE *)
_nc_generic_fieldtype(bool (*const field_check) (FORM*,
FIELD *,
const void *),
@ -212,18 +212,18 @@ _nc_generic_fieldtype(bool (*const field_check) (FORM*,
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* );
extern FORM_EXPORT(int) _nc_set_generic_fieldtype(FIELD*, FIELDTYPE*, int (*)(void**));
extern FORM_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*);
extern FORM_EXPORT(void) _nc_get_fieldbuffer(FORM*, FIELD*, FIELD_CELL*);
#if USE_WIDEC_SUPPORT
extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
extern FORM_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
#endif
#ifdef TRACE
@ -234,11 +234,11 @@ extern NCURSES_EXPORT(wchar_t *) _nc_Widen_String(char *, int *);
#define returnFieldType(code) TRACE_RETURN1(code,field_type)
#define returnFormHook(code) TRACE_RETURN1(code,form_hook)
extern NCURSES_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
extern NCURSES_EXPORT(FIELD *) _nc_retrace_field (FIELD *);
extern NCURSES_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *);
extern NCURSES_EXPORT(FORM *) _nc_retrace_form (FORM *);
extern NCURSES_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
extern FORM_EXPORT(FIELD **) _nc_retrace_field_ptr (FIELD **);
extern FORM_EXPORT(FIELD *) _nc_retrace_field (FIELD *);
extern FORM_EXPORT(FIELDTYPE *) _nc_retrace_field_type (FIELDTYPE *);
extern FORM_EXPORT(FORM *) _nc_retrace_form (FORM *);
extern FORM_EXPORT(Form_Hook) _nc_retrace_form_hook (Form_Hook);
#else /* !TRACE */

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_cursor.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -49,7 +49,7 @@ MODULE_ID("$Id: frm_cursor.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
| E_BAD_ARGUMENT - Invalid form pointer
| E_NOT_POSTED - Form is not posted
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
pos_form_cursor(FORM *form)
{
int res;

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_data.c,v 1.19 2020/12/11 23:20:37 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_data.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
| Return Values : TRUE - there are off-screen data behind
| FALSE - there are no off-screen data behind
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
data_behind(const FORM *form)
{
bool result = FALSE;
@ -104,7 +104,7 @@ Only_Padding(WINDOW *w, int len, int pad)
}
}
#else
cell = (FIELD_CELL) winch(w);
cell = (FIELD_CELL)winch(w);
if (ChCharOf(cell) != ChCharOf(pad))
{
result = FALSE;
@ -132,7 +132,7 @@ Only_Padding(WINDOW *w, int len, int pad)
| Return Values : TRUE - there are off-screen data ahead
| FALSE - there are no off-screen data ahead
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
data_ahead(const FORM *form)
{
bool result = FALSE;

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_def.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_def.c,v 1.29 2020/12/11 23:47:16 tom Exp $")
/* this can't be readonly */
static FORM default_form =
@ -62,14 +62,14 @@ static FORM default_form =
NULL /* fieldterm */
};
NCURSES_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
FORM_EXPORT_VAR(FORM *) _nc_Default_Form = &default_form;
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static FIELD *Insert_Field_By_Position(
| FIELD *new_field,
| FIELD *new_field,
| FIELD *head )
|
|
| Description : Insert new_field into sorted fieldlist with head "head"
| and return new head of sorted fieldlist. Sorting
| criteria is (row,column). This is a circular list.
@ -113,9 +113,9 @@ Insert_Field_By_Position(FIELD *newfield, FIELD *head)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static void Disconnect_Fields(FORM *form)
|
|
| Description : Break association between form and array of fields.
|
| Return Values : -
@ -143,9 +143,9 @@ Disconnect_Fields(FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static int Connect_Fields(FORM *form, FIELD **fields)
|
|
| Description : Set association between form and array of fields.
|
| Return Values : E_OK - no error
@ -200,14 +200,14 @@ Connect_Fields(FORM *form, FIELD **fields)
for (j = 0; j < field_cnt; j++)
{
if (j == 0)
pg->pmin = (short) j;
pg->pmin = (short)j;
else
{
if (fields[j]->status & _NEWPAGE)
{
pg->pmax = (short) (j - 1);
pg->pmax = (short)(j - 1);
pg++;
pg->pmin = (short) j;
pg->pmin = (short)j;
}
}
@ -215,14 +215,14 @@ Connect_Fields(FORM *form, FIELD **fields)
maximum_col_in_field = fields[j]->fcol + fields[j]->cols;
if (form->rows < maximum_row_in_field)
form->rows = (short) maximum_row_in_field;
form->rows = (short)maximum_row_in_field;
if (form->cols < maximum_col_in_field)
form->cols = (short) maximum_col_in_field;
form->cols = (short)maximum_col_in_field;
}
pg->pmax = (short) (field_cnt - 1);
form->maxfield = (short) field_cnt;
form->maxpage = (short) page_nr;
pg->pmax = (short)(field_cnt - 1);
form->maxfield = (short)field_cnt;
form->maxpage = (short)page_nr;
/* Sort fields on form pages */
for (page_nr = 0; page_nr < form->maxpage; page_nr++)
@ -231,8 +231,8 @@ Connect_Fields(FORM *form, FIELD **fields)
for (j = form->page[page_nr].pmin; j <= form->page[page_nr].pmax; j++)
{
fields[j]->index = (short) j;
fields[j]->page = (short) page_nr;
fields[j]->index = (short)j;
fields[j]->page = (short)page_nr;
fld = Insert_Field_By_Position(fields[j], fld);
}
if (fld)
@ -250,10 +250,10 @@ Connect_Fields(FORM *form, FIELD **fields)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : static int Associate_Fields(FORM *form, FIELD **fields)
|
| Description : Set association between form and array of fields.
|
| Description : Set association between form and array of fields.
| If there are fields, position to first active field.
|
| Return Values : E_OK - success
@ -283,9 +283,9 @@ Associate_Fields(FORM *form, FIELD **fields)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : FORM *new_form_sp(SCREEN* sp, FIELD** fields )
|
|
| Description : Create new form with given array of fields.
|
| Return Values : Pointer to form. NULL if error occurred.
@ -295,7 +295,7 @@ Associate_Fields(FORM *form, FIELD **fields)
| E_CONNECTED - a field is already connected
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FORM *)
FORM_EXPORT(FORM *)
NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
{
int err = E_SYSTEM_ERROR;
@ -331,9 +331,9 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| 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.
@ -344,7 +344,7 @@ NCURSES_SP_NAME(new_form) (NCURSES_SP_DCLx FIELD **fields)
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(FORM *)
FORM_EXPORT(FORM *)
new_form(FIELD **fields)
{
return NCURSES_SP_NAME(new_form) (CURRENT_SCREEN, fields);
@ -352,16 +352,16 @@ new_form(FIELD **fields)
#endif
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int free_form( FORM *form )
|
|
| Description : Release internal memory associated with form.
|
| Return Values : E_OK - no error
| E_BAD_ARGUMENT - invalid form pointer
| E_POSTED - form is posted
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
free_form(FORM *form)
{
T((T_CALLED("free_form(%p)"), (void *)form));
@ -381,9 +381,9 @@ free_form(FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int set_form_fields( FORM *form, FIELD **fields )
|
|
| Description : Set a new association of an array of fields to a form
|
| Return Values : E_OK - no error
@ -392,7 +392,7 @@ free_form(FORM *form)
| E_POSTED - form is posted
| E_SYSTEM_ERROR - not enough memory
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_fields(FORM *form, FIELD **fields)
{
FIELD **old;
@ -416,14 +416,14 @@ set_form_fields(FORM *form, FIELD **fields)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : FIELD **form_fields( const FORM *form )
|
|
| Description : Retrieve array of fields
|
| Return Values : Pointer to field array
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD **)
FORM_EXPORT(FIELD **)
form_fields(const FORM *form)
{
T((T_CALLED("form_field(%p)"), (const void *)form));
@ -431,14 +431,14 @@ form_fields(const FORM *form)
}
/*---------------------------------------------------------------------------
| Facility : libnform
| Facility : libnform
| Function : int field_count( const FORM *form )
|
|
| Description : Retrieve number of fields
|
| Return Values : Number of fields, -1 if none are defined
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
field_count(const FORM *form)
{
T((T_CALLED("field_count(%p)"), (const void *)form));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_driver.c,v 1.129 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_driver.c,v 1.133 2020/12/12 00:36:42 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
@ -131,34 +131,34 @@ static int FE_Delete_Previous(FORM *);
/* Calculate the position of a single row in a field buffer */
#define Position_Of_Row_In_Buffer(field,row) ((row)*(field)->dcols)
/* Calculate start address for the fields buffer# N */
/* Calculate start address for the field's buffer# N */
#define Address_Of_Nth_Buffer(field,N) \
((field)->buf + (N)*(1+Buffer_Length(field)))
/* Calculate the start address of the row in the fields specified buffer# N */
/* Calculate the start address of the row in the field's specified buffer# N */
#define Address_Of_Row_In_Nth_Buffer(field,N,row) \
(Address_Of_Nth_Buffer(field,N) + Position_Of_Row_In_Buffer(field,row))
/* Calculate the start address of the row in the fields primary buffer */
/* Calculate the start address of the row in the field's primary buffer */
#define Address_Of_Row_In_Buffer(field,row) \
Address_Of_Row_In_Nth_Buffer(field,0,row)
/* Calculate the start address of the row in the forms current field
/* Calculate the start address of the row in the form's current field
buffer# N */
#define Address_Of_Current_Row_In_Nth_Buffer(form,N) \
Address_Of_Row_In_Nth_Buffer((form)->current,N,(form)->currow)
/* Calculate the start address of the row in the forms current field
/* Calculate the start address of the row in the form's current field
primary buffer */
#define Address_Of_Current_Row_In_Buffer(form) \
Address_Of_Current_Row_In_Nth_Buffer(form,0)
/* Calculate the address of the cursor in the forms current field
/* Calculate the address of the cursor in the form's current field
primary buffer */
#define Address_Of_Current_Position_In_Nth_Buffer(form,N) \
(Address_Of_Current_Row_In_Nth_Buffer(form,N) + (form)->curcol)
/* Calculate the address of the cursor in the forms current field
/* Calculate the address of the cursor in the form's current field
buffer# N */
#define Address_Of_Current_Position_In_Buffer(form) \
Address_Of_Current_Position_In_Nth_Buffer(form,0)
@ -187,7 +187,7 @@ static int FE_Delete_Previous(FORM *);
/* Logic to determine whether or not a dynamic field may still grow */
#define Growable(field) ((field)->status & _MAY_GROW)
/* Macro to set the attributes for a fields window */
/* Macro to set the attributes for a field's window */
#define Set_Field_Window_Attributes(field,win) \
( wbkgdset((win),(chtype)((chtype)((field)->pad) | (field)->back)), \
(void) wattrset((win), (int)(field)->fore) )
@ -548,7 +548,7 @@ Buffer_To_Window(const FIELD *field, WINDOW *win)
|
| Return Values : -
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void)
FORM_EXPORT(void)
_nc_get_fieldbuffer(FORM *form, FIELD *field, FIELD_CELL *buf)
{
int pad;
@ -826,7 +826,7 @@ Field_encloses(FIELD *field, int ry, int rx)
| E_SYSTEM_ERROR - form has no current field or
| field-window
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Position_Form_Cursor(FORM *form)
{
FIELD *field;
@ -860,7 +860,7 @@ _nc_Position_Form_Cursor(FORM *form)
| Facility : libnform
| Function : int _nc_Refresh_Current_Field(FORM * form)
|
| Description : Propagate the changes in the fields window to the
| Description : Propagate the changes in the field's window to the
| window of the form.
|
| Return Values : E_OK - on success
@ -868,7 +868,7 @@ _nc_Position_Form_Cursor(FORM *form)
| E_SYSTEM_ERROR - general error
+--------------------------------------------------------------------------*/
static bool move_after_insert = TRUE;
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Refresh_Current_Field(FORM *form)
{
WINDOW *formwin;
@ -1263,7 +1263,7 @@ Synchronize_Linked_Fields(FIELD *field)
| Facility : libnform
| Function : int _nc_Synchronize_Attributes(FIELD * field)
|
| Description : If a fields visual attributes have changed, this
| Description : If a field's visual attributes have changed, this
| routine is called to propagate those changes to the
| screen.
|
@ -1271,7 +1271,7 @@ Synchronize_Linked_Fields(FIELD *field)
| E_BAD_ARGUMENT - invalid field pointer
| E_SYSTEM_ERROR - some severe basic error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Synchronize_Attributes(FIELD *field)
{
FORM *form;
@ -1329,7 +1329,7 @@ _nc_Synchronize_Attributes(FIELD *field)
| Function : int _nc_Synchronize_Options(FIELD * field,
| Field_Options newopts)
|
| Description : If a fields options have changed, this routine is
| Description : If a field's options have changed, this routine is
| called to propagate these changes to the screen and
| to really change the behavior of the field.
|
@ -1338,7 +1338,7 @@ _nc_Synchronize_Attributes(FIELD *field)
| E_CURRENT - field is the current one
| E_SYSTEM_ERROR - some severe basic error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Synchronize_Options(FIELD *field, Field_Options newopts)
{
Field_Options oldopts;
@ -1491,7 +1491,7 @@ _nc_Unset_Current_Field(FORM *form)
| E_SYSTEM_ERROR - some severe basic error
| E_NOT_CONNECTED - no fields are connected to the form
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Set_Current_Field(FORM *form, FIELD *newfield)
{
FIELD *field;
@ -3225,7 +3225,7 @@ Check_Field(FORM *form, FIELDTYPE *typ, FIELD *field, TypeArgument *argp)
| Return Values : TRUE - field is valid
| FALSE - field is invalid
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(bool)
FORM_EXPORT(bool)
_nc_Internal_Validation(FORM *form)
{
FIELD *field;
@ -3284,7 +3284,7 @@ FV_Validation(FORM *form)
|
| Description : Get the next field after the given field on the current
| page. The order of fields is the one defined by the
| fields array. Only visible and active fields are
| field's array. Only visible and active fields are
| counted.
|
| Return Values : Pointer to the next field.
@ -3319,7 +3319,7 @@ Next_Field_On_Page(FIELD *field)
|
| Return Values : Pointer to calculated field.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELD *)
FORM_EXPORT(FIELD *)
_nc_First_Active_Field(FORM *form)
{
FIELD **last_on_page = &form->field[form->page[form->curpage].pmax];
@ -3367,7 +3367,7 @@ _nc_First_Active_Field(FORM *form)
|
| Description : Get the previous field before the given field on the
| current page. The order of fields is the one defined by
| the fields array. Only visible and active fields are
| the field's array. Only visible and active fields are
| counted.
|
| Return Values : Pointer to the previous field.
@ -3501,10 +3501,10 @@ Right_Neighbor_Field(FIELD *field)
| Function : static FIELD *Upper_Neighbor_Field(FIELD * field)
|
| Description : Because of the row-major nature of sorting the fields,
| it is more difficult to define whats the upper neighbor
| it is more difficult to define what the upper neighbor
| field really means. We define that it must be on a
| 'previous' line (cyclic order!) and is the rightmost
| field laying on the left side of the given field. If
| field lying on the left side of the given field. If
| this set is empty, we take the first field on the line.
|
| Return Values : Pointer to the upper neighbor field.
@ -3551,7 +3551,7 @@ Upper_Neighbor_Field(FIELD *field)
| Function : static FIELD *Down_Neighbor_Field(FIELD * field)
|
| Description : Because of the row-major nature of sorting the fields,
| its more difficult to define whats the down neighbor
| it's more difficult to define what the down neighbor
| field really means. We define that it must be on a
| 'next' line (cyclic order!) and is the leftmost
| field laying on the right side of the given field. If
@ -3873,7 +3873,7 @@ FN_Down_Field(FORM *form)
| E_BAD_ARGUMENT - invalid field pointer
| E_SYSTEM_ERROR - some severe basic error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_Set_Form_Page(FORM *form, int page, FIELD *field)
{
int res = E_OK;
@ -3952,7 +3952,7 @@ Previous_Page_Number(const FORM *form)
| that the field is left and a new field is entered.
| So the field must be validated and the field init/term
| hooks must be called. Because also the page is changed,
| the forms init/term hooks must be called also.
| the form's init/term hooks must be called also.
|
| Return Values : E_OK - success
| E_INVALID_FIELD - field is invalid
@ -4354,10 +4354,10 @@ static const Binding_Info bindings[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1] =
| E_NOT_CONNECTED - no fields are connected to the form
| E_UNKNOWN_COMMAND - command not known
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_driver(FORM *form, int c)
{
const Binding_Info *BI = (Binding_Info *) 0;
const Binding_Info *BI = (Binding_Info *)0;
int res = E_UNKNOWN_COMMAND;
move_after_insert = TRUE;
@ -4412,7 +4412,7 @@ form_driver(FORM *form, int c)
NULL /* Choice Request is generic */
};
size_t nMethods = (sizeof(Generic_Methods) / sizeof(Generic_Methods[0]));
size_t method = (size_t) ((BI->keycode >> ID_Shft) & 0xffff); /* see ID_Mask */
size_t method = (size_t)((BI->keycode >> ID_Shft) & 0xffff); /* see ID_Mask */
if ((method >= nMethods) || !(BI->cmd))
res = E_SYSTEM_ERROR;
@ -4561,10 +4561,10 @@ form_driver(FORM *form, int c)
| E_NOT_CONNECTED - no fields are connected to the form
| E_UNKNOWN_COMMAND - command not known
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_driver_w(FORM *form, int type, wchar_t c)
{
const Binding_Info *BI = (Binding_Info *) 0;
const Binding_Info *BI = (Binding_Info *)0;
int res = E_UNKNOWN_COMMAND;
T((T_CALLED("form_driver(%p,%d)"), (void *)form, (int)c));
@ -4618,7 +4618,7 @@ form_driver_w(FORM *form, int type, wchar_t c)
NULL /* Choice Request is generic */
};
size_t nMethods = (sizeof(Generic_Methods) / sizeof(Generic_Methods[0]));
size_t method = (size_t) (BI->keycode >> ID_Shft) & 0xffff; /* see ID_Mask */
size_t method = (size_t)(BI->keycode >> ID_Shft) & 0xffff; /* see ID_Mask */
if ((method >= nMethods) || !(BI->cmd))
res = E_SYSTEM_ERROR;
@ -4736,14 +4736,14 @@ form_driver_w(FORM *form, int type, wchar_t c)
| For dynamic fields this may grow the fieldbuffers if
| the length of the value exceeds the current buffer
| length. For buffer 0 only printable values are allowed.
| For static fields, the value needs not to be zero ter-
| minated. It is copied up to the length of the buffer.
| For static fields, the value must not be zero terminated.
| It is copied up to the length of the buffer.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid argument
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_field_buffer(FIELD *field, int buffer, const char *value)
{
FIELD_CELL *p;
@ -4860,7 +4860,7 @@ set_field_buffer(FIELD *field, int buffer, const char *value)
|
| Return Values : Pointer to buffer or NULL if arguments were invalid.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(char *)
FORM_EXPORT(char *)
field_buffer(const FIELD *field, int buffer)
{
char *result = 0;
@ -4928,7 +4928,7 @@ field_buffer(const FIELD *field, int buffer)
| Convert a multibyte string to a wide-character string. The result must be
| freed by the caller.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(wchar_t *)
FORM_EXPORT(wchar_t *)
_nc_Widen_String(char *source, int *lengthp)
{
wchar_t *result = 0;
@ -4972,7 +4972,7 @@ _nc_Widen_String(char *source, int *lengthp)
{
result[need] = wch;
}
passed += (size_t) status;
passed += (size_t)status;
++need;
}
else

View File

@ -33,11 +33,11 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_hook.c,v 1.19 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_hook.c,v 1.20 2020/05/24 01:40:20 anonymous.maarten Exp $")
/* "Template" macro to generate function to set application specific hook */
#define GEN_HOOK_SET_FUNCTION( typ, name ) \
NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\
FORM_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook func)\
{\
TR_FUNC_BFR(1); \
T((T_CALLED("set_" #typ"_"#name"(%p,%s)"), (void *) form, TR_FUNC_ARG(0, func)));\
@ -47,7 +47,7 @@ NCURSES_IMPEXP int NCURSES_API set_ ## typ ## _ ## name (FORM *form, Form_Hook f
/* "Template" macro to generate function to get application specific hook */
#define GEN_HOOK_GET_FUNCTION( typ, name ) \
NCURSES_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
FORM_IMPEXP Form_Hook NCURSES_API typ ## _ ## name ( const FORM *form )\
{\
T((T_CALLED(#typ "_" #name "(%p)"), (const void *) form));\
returnFormHook( Normalize_Form( form ) -> typ ## name );\

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_opts.c,v 1.20 2020/12/12 00:37:00 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -45,12 +45,12 @@ MODULE_ID("$Id: frm_opts.c,v 1.18 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_opts(FORM *form, Form_Options opts)
{
T((T_CALLED("set_form_opts(%p,%d)"), (void *)form, opts));
opts &= (Form_Options) ALL_FORM_OPTS;
opts &= (Form_Options)ALL_FORM_OPTS;
if ((unsigned)opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else
@ -68,11 +68,11 @@ set_form_opts(FORM *form, Form_Options opts)
|
| Return Values : The option flags.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(Form_Options)
FORM_EXPORT(Form_Options)
form_opts(const FORM *form)
{
T((T_CALLED("form_opts(%p)"), (const void *)form));
returnCode((Form_Options) ((unsigned)Normalize_Form(form)->opts & ALL_FORM_OPTS));
returnCode((Form_Options)((unsigned)Normalize_Form(form)->opts & ALL_FORM_OPTS));
}
/*---------------------------------------------------------------------------
@ -85,12 +85,12 @@ form_opts(const FORM *form)
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_opts_on(FORM *form, Form_Options opts)
{
T((T_CALLED("form_opts_on(%p,%d)"), (void *)form, opts));
opts &= (Form_Options) ALL_FORM_OPTS;
opts &= (Form_Options)ALL_FORM_OPTS;
if ((unsigned)opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else
@ -110,12 +110,12 @@ form_opts_on(FORM *form, Form_Options opts)
| Return Values : E_OK - success
| E_BAD_ARGUMENT - invalid options
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_opts_off(FORM *form, Form_Options opts)
{
T((T_CALLED("form_opts_off(%p,%d)"), (void *)form, opts));
opts &= (Form_Options) ALL_FORM_OPTS;
opts &= (Form_Options)ALL_FORM_OPTS;
if ((unsigned)opts & ~ALL_FORM_OPTS)
RETURN(E_BAD_ARGUMENT);
else

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_page.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -47,7 +47,7 @@ MODULE_ID("$Id: frm_page.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
| E_INVALID_FIELD - current field can't be left
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_page(FORM *form, int page)
{
int err = E_OK;
@ -96,7 +96,7 @@ set_form_page(FORM *form, int page)
| Return Values : >= 0 : current page number
| -1 : invalid form pointer
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_page(const FORM *form)
{
T((T_CALLED("form_page(%p)"), (const void *)form));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_post.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -48,7 +48,7 @@ MODULE_ID("$Id: frm_post.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
| E_NO_ROOM - form doesn't fit into subwindow
| E_SYSTEM_ERROR - system error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
post_form(FORM *form)
{
WINDOW *formwin;
@ -98,7 +98,7 @@ post_form(FORM *form)
| E_NOT_POSTED - form isn't posted
| E_BAD_STATE - called from a hook routine
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
unpost_form(FORM *form)
{
T((T_CALLED("unpost_form(%p)"), (void *)form));

View File

@ -38,7 +38,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_req_name.c,v 1.20 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_req_name.c,v 1.21 2020/05/24 01:40:20 anonymous.maarten Exp $")
#define DATA(s) { s }
@ -120,7 +120,7 @@ static const char request_names[MAX_FORM_COMMAND - MIN_FORM_COMMAND + 1][13] =
| Return Values : Pointer to name - on success
| NULL - on invalid request code
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(const char *)
FORM_EXPORT(const char *)
form_request_name(int request)
{
T((T_CALLED("form_request_name(%d)"), request));
@ -143,7 +143,7 @@ form_request_name(int request)
| Return Values : Request Id - on success
| E_NO_MATCH - request not found
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
form_request_by_name(const char *str)
{
/* because the table is so small, it doesn't really hurt

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_scale.c,v 1.12 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -45,7 +45,7 @@ MODULE_ID("$Id: frm_scale.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
| E_BAD_ARGUMENT - invalid form pointer
| E_NOT_CONNECTED - no fields connected to form
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
scale_form(const FORM *form, int *rows, int *cols)
{
T((T_CALLED("scale_form(%p,%p,%p)"),

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_sub.c,v 1.14 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_sub.c,v 1.13 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_POSTED - form is posted
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_sub(FORM *form, WINDOW *win)
{
T((T_CALLED("set_form_sub(%p,%p)"), (void *)form, (void *)win));
@ -73,7 +73,7 @@ set_form_sub(FORM *form, WINDOW *win)
|
| Return Values : The pointer to the Subwindow.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(WINDOW *)
FORM_EXPORT(WINDOW *)
form_sub(const FORM *form)
{
const FORM *f;

View File

@ -33,18 +33,18 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_user.c,v 1.16 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_user.c,v 1.18 2020/12/12 01:05:20 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int set_form_userptr(FORM *form, void *usrptr)
|
| Description : Set the pointer that is reserved in any form to store
| application relevant informations
| application relevant information.
|
| Return Values : E_OK - on success
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_userptr(FORM *form, void *usrptr)
{
T((T_CALLED("set_form_userptr(%p,%p)"), (void *)form, (void *)usrptr));
@ -58,12 +58,12 @@ set_form_userptr(FORM *form, void *usrptr)
| Function : void *form_userptr(const FORM *form)
|
| Description : Return the pointer that is reserved in any form to
| store application relevant informations.
| store application relevant information.
|
| Return Values : Value of pointer. If no such pointer has been set,
| NULL is returned
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(void *)
FORM_EXPORT(void *)
form_userptr(const FORM *form)
{
T((T_CALLED("form_userptr(%p)"), (const void *)form));

View File

@ -33,7 +33,7 @@
#include "form.priv.h"
MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: frm_win.c,v 1.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -44,7 +44,7 @@ MODULE_ID("$Id: frm_win.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
| Return Values : E_OK - success
| E_POSTED - form is posted
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
set_form_win(FORM *form, WINDOW *win)
{
T((T_CALLED("set_form_win(%p,%p)"), (void *)form, (void *)win));
@ -73,7 +73,7 @@ set_form_win(FORM *form, WINDOW *win)
|
| Return Values : The pointer to the Window or stdscr if there is none.
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(WINDOW *)
FORM_EXPORT(WINDOW *)
form_win(const FORM *form)
{
WINDOW *result;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_alnum.c,v 1.25 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_alnum.c,v 1.29 2020/12/12 01:15:37 tom Exp $")
#define thisARG alnumARG
@ -56,7 +56,7 @@ thisARG;
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
thisARG *argp = (thisARG *)0;
if (arg)
{
@ -140,7 +140,7 @@ static bool
Check_This_Character(int c, const void *argp GCC_UNUSED)
{
#if USE_WIDEC_SUPPORT
if (iswalnum((wint_t) c))
if (iswalnum((wint_t)c))
return TRUE;
#endif
return (isalnum(UChar(c)) ? TRUE : FALSE);
@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALNUM = &typeTHIS;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_ALNUM(void)
{
return TYPE_ALNUM;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_alpha.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_alpha.c,v 1.31 2020/12/12 01:15:37 tom Exp $")
#define thisARG alphaARG
@ -56,7 +56,7 @@ thisARG;
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
thisARG *argp = (thisARG *)0;
if (arg)
{
@ -140,7 +140,7 @@ static bool
Check_This_Character(int c, const void *argp GCC_UNUSED)
{
#if USE_WIDEC_SUPPORT
if (iswalpha((wint_t) c))
if (iswalpha((wint_t)c))
return TRUE;
#endif
return (isalpha(UChar(c)) ? TRUE : FALSE);
@ -186,14 +186,14 @@ static FIELDTYPE typeTHIS =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_ALPHA = &typeTHIS;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_ALPHA(void)
{
return TYPE_ALPHA;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_enum.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_enum.c,v 1.31 2020/12/12 01:15:37 tom Exp $")
typedef struct
{
@ -66,7 +66,7 @@ static void *
Generic_Enum_Type(void *arg)
{
enumARG *argp = (enumARG *)0;
enumParams *params = (enumParams *) arg;
enumParams *params = (enumParams *)arg;
if (params)
{
@ -425,15 +425,14 @@ static FIELDTYPE typeENUM =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE *)
TYPE_ENUM = &typeENUM;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_ENUM(void)
{
return TYPE_ENUM;

View File

@ -35,27 +35,28 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_generic.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_generic.c,v 1.14 2020/12/12 17:27:44 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
* with C language. In particular, 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
* iterator based callback mechanism that allows 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
* language like C# or Java, uses its 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
* For that purpose we have extended the fieldtype structure by a new element
* that gets the arguments from a single struct passed by the caller.
*
*/
@ -99,7 +100,7 @@ Generic_This_Type(void *arg)
|
| Return Values : Fieldtype pointer or NULL if error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_generic_fieldtype(bool (*const field_check) (FORM *, FIELD *, const void *),
bool (*const char_check) (int, FORM *, FIELD *, const
void *),
@ -220,7 +221,7 @@ GenericArgument(const FIELDTYPE *typ,
| Return Values : E_OK if all went well
| E_SYSTEM_ERROR if an error occurred
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(int)
FORM_EXPORT(int)
_nc_set_generic_fieldtype(FIELD *field,
FIELDTYPE *ftyp,
int (*argiterator) (void **))
@ -273,9 +274,9 @@ _nc_set_generic_fieldtype(FIELD *field,
| 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
| Return Values : The field's Window or NULL on error
+--------------------------------------------------------------------------*/
NCURSES_EXPORT(WINDOW *)
FORM_EXPORT(WINDOW *)
_nc_form_cursor(const FORM *form, int *pRow, int *pCol)
{
int code = E_SYSTEM_ERROR;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_int.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_int.c,v 1.31 2020/12/12 01:15:37 tom Exp $")
#if USE_WIDEC_SUPPORT
#define isDigit(c) (iswdigit((wint_t)(c)) || isdigit(UChar(c)))
@ -72,8 +72,8 @@ integerPARM;
static void *
Generic_This_Type(void *arg)
{
thisARG *argp = (thisARG *) 0;
thisARG *param = (thisARG *) arg;
thisARG *argp = (thisARG *)0;
thisARG *param = (thisARG *)arg;
if (param)
{
@ -120,11 +120,12 @@ static void *
Copy_This_Type(const void *argp)
{
const thisARG *ap = (const thisARG *)argp;
thisARG *result = (thisARG *) 0;
thisARG *result = (thisARG *)0;
if (argp)
{
result = typeMalloc(thisARG, 1);
if (result)
{
T((T_CREATE("thisARG %p"), (void *)result));
@ -278,14 +279,14 @@ static FIELDTYPE typeTHIS =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_INTEGER = &typeTHIS;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_INTEGER(void)
{
return TYPE_INTEGER;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_ipv4.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_ipv4.c,v 1.14 2020/12/12 01:15:37 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
@ -104,14 +104,14 @@ static FIELDTYPE typeIPV4 =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_IPV4 = &typeIPV4;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_IPV4(void)
{
return TYPE_IPV4;

View File

@ -35,7 +35,7 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_num.c,v 1.32 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_num.c,v 1.36 2020/12/12 01:15:37 tom Exp $")
#if HAVE_LOCALE_H
#include <locale.h>
@ -83,8 +83,8 @@ thisPARM;
static void *
Generic_This_Type(void *arg)
{
thisARG *argn = (thisARG *) 0;
thisPARM *args = (thisPARM *) arg;
thisARG *argn = (thisARG *)0;
thisPARM *args = (thisPARM *)arg;
if (args)
{
@ -139,11 +139,12 @@ static void *
Copy_This_Type(const void *argp)
{
const thisARG *ap = (const thisARG *)argp;
thisARG *result = (thisARG *) 0;
thisARG *result = (thisARG *)0;
if (argp)
{
result = typeMalloc(thisARG, 1);
if (result)
{
T((T_CREATE("thisARG %p"), (void *)result));
@ -324,14 +325,14 @@ static FIELDTYPE typeTHIS =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_NUMERIC = &typeTHIS;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_NUMERIC(void)
{
return TYPE_NUMERIC;

View File

@ -35,12 +35,12 @@
#include "form.priv.h"
MODULE_ID("$Id: fty_regex.c,v 1.28 2020/02/02 23:34:34 tom Exp $")
MODULE_ID("$Id: fty_regex.c,v 1.32 2020/12/12 01:15:37 tom Exp $")
#if HAVE_REGEX_H_FUNCS || HAVE_LIB_PCRE2 /* We prefer POSIX regex */
#if HAVE_PCRE2_POSIX_H
#include <pcre2-posix.h>
#if HAVE_PCRE2POSIX_H
#include <pcre2posix.h>
#elif HAVE_PCREPOSIX_H
#include <pcreposix.h>
#else
@ -340,14 +340,14 @@ static FIELDTYPE typeREGEXP =
#endif
};
NCURSES_EXPORT_VAR(FIELDTYPE*) TYPE_REGEXP = &typeREGEXP;
FORM_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
programming languages with restrictions on interop with C level
constructs (e.g. variable access or va_list + ellipsis constructs)
*/
NCURSES_EXPORT(FIELDTYPE *)
FORM_EXPORT(FIELDTYPE *)
_nc_TYPE_REGEXP(void)
{
return TYPE_REGEXP;

View File

@ -30,7 +30,7 @@
# Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995
# and: Eric S. Raymond <esr@snark.thyrsus.com>
#
# $Id: Caps,v 1.45 2020/02/02 23:34:34 tom Exp $
# $Id: Caps,v 1.46 2020/10/17 21:30:19 tom Exp $
#
# This is the master termcap/terminfo capability table.
#
@ -189,8 +189,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -28,7 +28,7 @@
#
# Author: Thomas E. Dickey
#
# $Id: Caps-ncurses,v 1.8 2020/02/02 23:34:34 tom Exp $
# $Id: Caps-ncurses,v 1.10 2020/09/29 19:05:19 tom Exp $
#
#############################################################################
#
@ -342,6 +342,7 @@ infoalias ksel kslt IBM key_select
# are not listed here.
#
used_by ncurses
userdef CO num n number of indexed colors overlaying RGB space
userdef E3 str - clears the terminal's scrollback buffer.
userdef RGB bool - use direct colors with 1/3 of color-pair bits per color.
userdef RGB num n use direct colors with given number of bits per color.
@ -361,6 +362,15 @@ userdef xm str nnnsnn mouse response, p6 = x-ordinate starting region
userdef xm str nnnsnnn mouse response, p7 = y-ordinate ending region
userdef xm str nnnsnnnn mouse response, p8 = x-ordinate ending region
#
used_by mintty
userdef Rmol str - remove overline-mode
userdef Smol str - set overline-mode
userdef blink2 str - turn on rapid blinking
userdef norm str - turn off bold and half-bright mode
userdef opaq str - turn off blank mode
userdef setal str n set underline-color
userdef smul2 str - begin double underline mode
#
used_by screen
userdef AN bool - turn on autonuke.
userdef AX bool - understands ANSI set default fg/bg color (\E[39m / \E[49m).

View File

@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.aix4,v 1.17 2020/02/02 23:34:34 tom Exp $
# $Id: Caps.aix4,v 1.18 2020/10/17 21:30:19 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with AIX 4.x's terminfo.
@ -189,8 +189,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.hpux11,v 1.15 2020/02/02 23:34:34 tom Exp $
# $Id: Caps.hpux11,v 1.16 2020/10/17 21:30:19 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with HPUX 11.x's terminfo.
@ -189,8 +189,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -30,7 +30,7 @@
# Author: Thomas Dickey
# and: Ilya Zakharevich
#
# $Id: Caps.keys,v 1.14 2020/02/02 23:34:34 tom Exp $
# $Id: Caps.keys,v 1.15 2020/10/17 21:30:19 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is illustrates an experimental extension to describe alt-, shift- and
@ -191,8 +191,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.osf1r5,v 1.13 2020/02/02 23:34:34 tom Exp $
# $Id: Caps.osf1r5,v 1.14 2020/10/17 21:30:19 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with OSF/1 version 5 (Tru64) terminfo.
@ -189,8 +189,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -29,7 +29,7 @@
#
# Author: Thomas Dickey
#
# $Id: Caps.uwin,v 1.12 2020/02/02 23:34:34 tom Exp $
# $Id: Caps.uwin,v 1.13 2020/10/17 21:30:19 tom Exp $
#
# This is an adaptation of ncurses' termcap/terminfo capability table, which
# is designed to align with U/Win's terminfo.
@ -189,8 +189,12 @@
#%indicates that padding may be specified
#%.TP
#%#[1-9]
#%in the description field indicates that the string is passed through tparm with
#%parms as given (#\fIi\fP).
#%in the description field indicates that the string is passed
#%through \fBtparm\fP(3X) with parameters as given (#\fIi\fP).
#%.IP
#%If no parameters are listed in the description,
#%passing the string through \fBtparm\fP(3X) may give unexpected results,
#%e.g., if it contains percent (%%) signs.
#%.TP
#%(P*)
#%indicates that padding may vary in proportion to the number of

View File

@ -1,5 +1,5 @@
#! /bin/sh
# $Id: MKkey_defs.sh,v 1.19 2020/02/02 23:34:34 tom Exp $
# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 2001-2013,2017 Free Software Foundation, Inc. #
@ -63,8 +63,7 @@ fi
# add keys that we generate automatically:
cat >>$data <<EOF
key_resize kr1 str R1 KEY_RESIZE + ----- Terminal resize event
key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event
key_resize kr1 str R1 KEY_RESIZE + NCURSES_EXT_FUNCS Terminal resize event
EOF
THIS=./`basename $0`
@ -142,6 +141,12 @@ $5 != "-" && $6 != "-" {
maxkey = thiskey;
if (pass == 2 || pass == 3) {
showkey=sprintf(octal_fmt, thiskey);
ifdef = 0;
if (index($7,"NCURSES_") == 1) {
ifdef = 1;
printf "\n";
printf "#ifdef %s\n", $7;
}
if ($5 == "KEY_F(0)" ) {
printf "#define "
print_cols("KEY_F0", 16);
@ -160,6 +165,9 @@ $5 != "-" && $6 != "-" {
printf " %s", $i
print " */"
}
if (ifdef != 0) {
printf "#endif\n";
}
}
}
END {

View File

@ -60,7 +60,7 @@ BEGIN {
print "/* and: Thomas E. Dickey 1995-on */"
print "/****************************************************************************/"
print ""
print "/* $Id: MKterm.h.awk.in,v 1.74 2020/02/02 23:34:34 tom Exp $ */"
print "/* $Id: MKterm.h.awk.in,v 1.78 2020/10/31 23:14:24 tom Exp $ */"
print ""
print "/*"
print "** term.h -- Definition of struct term"
@ -82,6 +82,24 @@ BEGIN {
print " * definition (based on the system for which this was configured)."
print " */"
print ""
print "#ifndef __NCURSES_H"
print ""
print "typedef struct screen SCREEN;"
print ""
print "#if @NCURSES_SP_FUNCS@"
print "#undef NCURSES_SP_FUNCS"
print "#define NCURSES_SP_FUNCS @NCURSES_PATCH@"
print "#undef NCURSES_SP_NAME"
print "#define NCURSES_SP_NAME(name) name##_sp"
print ""
print "/* Define the sp-funcs helper function */"
print "#undef NCURSES_SP_OUTC"
print "#define NCURSES_SP_OUTC NCURSES_SP_NAME(NCURSES_OUTC)"
print "typedef int (*NCURSES_SP_OUTC)(SCREEN*, int);"
print "#endif"
print ""
print "#endif /* __NCURSES_H */"
print ""
print "#undef NCURSES_CONST"
print "#define NCURSES_CONST @NCURSES_CONST@"
print ""
@ -127,9 +145,14 @@ BEGIN {
print ""
print "#else /* !HAVE_TERMIO_H */"
print ""
print "#if _WIN32"
print "# include <ncurses_mingw.h>"
print "# define TTY struct termios"
print "#if (defined(_WIN32) || defined(_WIN64))"
print "#if @EXP_WIN32_DRIVER@"
print "#include <win32_curses.h>"
print "#define TTY struct winconmode"
print "#else"
print "#include <ncurses_mingw.h>"
print "#define TTY struct termios"
print "#endif"
print "#else"
print "#undef TERMIOS"
print "#include <sgtty.h>"
@ -143,6 +166,9 @@ BEGIN {
print "#ifdef TERMIOS"
print "#define GET_TTY(fd, buf) tcgetattr(fd, buf)"
print "#define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)"
print "#elif @EXP_WIN32_DRIVER@ && (defined(_WIN32) || defined(_WIN64))"
print "#define GET_TTY(fd, buf) _nc_console_getmode(_nc_console_fd2handle(fd),buf)"
print "#define SET_TTY(fd, buf) _nc_console_setmode(_nc_console_fd2handle(fd),buf)"
print "#else"
print "#define GET_TTY(fd, buf) gtty(fd, buf)"
print "#define SET_TTY(fd, buf) stty(fd, buf)"
@ -298,6 +324,7 @@ END {
print "extern NCURSES_EXPORT(int) _nc_read_termtype (TERMTYPE2 *, char *, int);"
print "extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);"
print "extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);"
print "extern NCURSES_EXPORT(char *) _nc_tiparm(int, const char *, ...);"
print ""
print "#endif /* NCURSES_INTERNALS */"
print ""
@ -330,7 +357,6 @@ END {
print "extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) tparm (const char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */"
print "#endif"
print ""
print "extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */"
@ -361,7 +387,6 @@ END {
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, ...); /* special */"
print "#else"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm) (SCREEN*, const char *, long,long,long,long,long,long,long,long,long); /* special */"
print "extern NCURSES_EXPORT(char *) NCURSES_SP_NAME(tparm_varargs) (SCREEN*, const char *, ...); /* special */"
print "#endif"
print ""
print "/* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */"

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.46 2020/02/02 23:34:34 tom Exp $
# $Id: Makefile.in,v 1.51 2020/09/18 22:55:10 tom Exp $
##############################################################################
# Copyright 2019,2020 Thomas E. Dickey #
# Copyright 1998-2013,2015 Free Software Foundation, Inc. #
@ -28,7 +28,7 @@
# authorization. #
##############################################################################
#
# Author: Thomas E. Dickey 1996-2001
# Author: Thomas E. Dickey 1996-on
#
# Makefile for ncurses source code.
#
@ -59,6 +59,10 @@ INSTALL_DATA = @INSTALL_DATA@
AWK = @AWK@
LN_S = @LN_S@
CC = @CC@
CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
CPPFLAGS = -DHAVE_CONFIG_H -I. @CPPFLAGS@
CTAGS = @CTAGS@
ETAGS = @ETAGS@
@ -100,6 +104,7 @@ curses.h : $(CAPLIST) \
$(srcdir)/MKkey_defs.sh
cat curses.head >$@
AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@
$(SHELL) -c 'if test "@NCURSES_WGETCH_EVENTS@" = "1" ; then cat $(srcdir)/curses.events >>$@ ; fi'
$(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi'
cat $(srcdir)/curses.tail >>$@
@ -141,6 +146,17 @@ distclean :: clean
realclean :: distclean
# Verify that each header-file can be compiled without including another.
check:
@$(SHELL) -c "for header in *.h;\
do \
echo \"** testing \$${header}\" ; \
echo \"#include <\$${header}>\" >headers.c; \
echo \"int main(void) { return 0; }\" >>headers.c; \
$(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
done"
-@rm -f headers.*
###############################################################################
# The remainder of this file is automatically generated during configuration
###############################################################################

View File

@ -0,0 +1,55 @@
/* $Id*/
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
* (see that file for the relevant copyright).
*/
/*
* This is an extension to support events...
*/
#ifdef NCURSES_WGETCH_EVENTS
#if !defined(__BEOS__) || defined(__HAIKU__)
/* Fix _nc_timed_wait() on BEOS... */
# define NCURSES_EVENT_VERSION 1
#endif /* !defined(__BEOS__) */
/*
* Bits to set in _nc_event.data.flags
*/
# define _NC_EVENT_TIMEOUT_MSEC 1
# define _NC_EVENT_FILE 2
# define _NC_EVENT_FILE_READABLE 2
# if 0 /* Not supported yet... */
# define _NC_EVENT_FILE_WRITABLE 4
# define _NC_EVENT_FILE_EXCEPTION 8
# endif
typedef struct
{
int type;
union
{
long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */
struct
{
unsigned int flags;
int fd;
unsigned int result;
} fev; /* _NC_EVENT_FILE */
} data;
} _nc_event;
typedef struct
{
int count;
int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */
_nc_event *events[1];
} _nc_eventlist;
extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */
#define KEY_EVENT 0633 /* We were interrupted by an event */
#endif /* NCURSES_WGETCH_EVENTS */

View File

@ -33,7 +33,7 @@
* and: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: curses.h.in,v 1.266 2020/02/08 10:51:53 tom Exp $ */
/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */
#ifndef __NCURSES_H
#define __NCURSES_H
@ -497,55 +497,6 @@ struct _win_st
};
#endif /* NCURSES_OPAQUE */
/*
* This is an extension to support events...
*/
#if @NCURSES_EXT_FUNCS@
#ifdef NCURSES_WGETCH_EVENTS
#if !defined(__BEOS__) || defined(__HAIKU__)
/* Fix _nc_timed_wait() on BEOS... */
# define NCURSES_EVENT_VERSION 1
#endif /* !defined(__BEOS__) */
/*
* Bits to set in _nc_event.data.flags
*/
# define _NC_EVENT_TIMEOUT_MSEC 1
# define _NC_EVENT_FILE 2
# define _NC_EVENT_FILE_READABLE 2
# if 0 /* Not supported yet... */
# define _NC_EVENT_FILE_WRITABLE 4
# define _NC_EVENT_FILE_EXCEPTION 8
# endif
typedef struct
{
int type;
union
{
long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */
struct
{
unsigned int flags;
int fd;
unsigned int result;
} fev; /* _NC_EVENT_FILE */
} data;
} _nc_event;
typedef struct
{
int count;
int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */
_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 */
#endif /* NCURSES_WGETCH_EVENTS */
#endif /* NCURSES_EXT_FUNCS */
/*
* GCC (and some other compilers) define '__attribute__'; we're using this
* macro to alert the compiler to flag inconsistencies in printf/scanf-like
@ -590,7 +541,7 @@ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *)
#endif
#undef GCC_DEPRECATED
#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2))
#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) && !defined(NCURSES_INTERNALS)
#define GCC_DEPRECATED(msg) __attribute__((deprecated))
#else
#define GCC_DEPRECATED(msg) /* nothing */
@ -895,7 +846,6 @@ extern NCURSES_EXPORT(int) putp (const char *); /* implemented */
extern NCURSES_EXPORT(char *) tparm (const char *, ...); /* special */
#else
extern NCURSES_EXPORT(char *) tparm (const char *, NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG,NCURSES_TPARM_ARG); /* special */
extern NCURSES_EXPORT(char *) tparm_varargs (const char *, ...); /* special */
#endif
extern NCURSES_EXPORT(char *) tiparm (const char *, ...); /* special */

View File

@ -1,4 +1,4 @@
# $Id: headers,v 1.14 2020/02/02 23:34:34 tom Exp $
# $Id: headers,v 1.15 2020/08/29 18:51:13 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 1998-2012,2013 Free Software Foundation, Inc. #
@ -49,5 +49,7 @@ $(srcdir)/nc_tparm.h
@ port_win32con
$(srcdir)/ncurses_mingw.h
$(srcdir)/nc_mingw.h
@ port_win32
$(srcdir)/win32_curses.h
# vile:makemode

View File

@ -30,7 +30,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
/* $Id: nc_alloc.h,v 1.26 2020/02/02 23:34:34 tom Exp $ */
/* $Id: nc_alloc.h,v 1.27 2020/07/04 20:01:13 tom Exp $ */
#ifndef NC_ALLOC_included
#define NC_ALLOC_included 1
@ -78,7 +78,7 @@ extern NCURSES_EXPORT(void) _nc_free_tinfo(int) GCC_NORETURN GCC_DEPRECATED("use
#ifdef NCURSES_INTERNALS
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 void _nc_leaks_dump_entry(void);
extern NCURSES_EXPORT(void) _nc_leaks_tic(void);
#if NCURSES_SP_FUNCS

View File

@ -31,12 +31,13 @@
* Author: Thomas Dickey, 2008-on *
****************************************************************************/
/* $Id: nc_mingw.h,v 1.7 2020/02/02 23:34:34 tom Exp $ */
/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */
#ifndef NC_MINGW_H
#define NC_MINGW_H 1
#ifdef _WIN32
#ifdef WINVER
# if WINVER < 0x0501
# error WINVER must at least be 0x0501
@ -52,9 +53,21 @@
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
extern int _nc_gettimeofday(struct timeval *, void *);
#ifdef _MSC_VER
#include <winsock2.h> /* for struct timeval */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <ncurses_dll.h>
NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
@ -65,7 +78,11 @@ extern int _nc_gettimeofday(struct timeval *, void *);
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
extern int _nc_wcwidth(wchar_t);
NCURSES_EXPORT(int) _nc_wcwidth(wchar_t);
#ifdef __cplusplus
}
#endif
#endif /* _WIN32 */

View File

@ -31,7 +31,7 @@
* Author: Thomas E. Dickey 2011 *
****************************************************************************/
/* $Id: nc_termios.h,v 1.7 2020/02/02 23:34:34 tom Exp $ */
/* $Id: nc_termios.h,v 1.8 2020/08/29 20:53:19 tom Exp $ */
#ifndef NC_TERMIOS_included
#define NC_TERMIOS_included 1
@ -70,9 +70,13 @@
#define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
#endif
#if defined(EXP_WIN32_DRIVER)
#undef TERMIOS
#endif
#else /* !HAVE_TERMIO_H */
#if _WIN32
#if defined(_WIN32) && !defined(EXP_WIN32_DRIVER)
/* lflag bits */
#define ISIG 0x0001

View File

@ -31,7 +31,7 @@
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
/* $Id: nc_tparm.h,v 1.10 2020/02/02 23:34:34 tom Exp $ */
/* $Id: nc_tparm.h,v 1.11 2020/05/27 23:33:31 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
@ -77,4 +77,16 @@
#define TPARM_0(a) TPARM_1(a,0)
#endif
#ifdef NCURSES_INTERNALS
#define TIPARM_1(s,a) _nc_tiparm(1,s,a)
#define TIPARM_2(s,a,b) _nc_tiparm(2,s,a,b)
#define TIPARM_3(s,a,b,c) _nc_tiparm(3,s,a,b,c)
#define TIPARM_4(s,a,b,c,d) _nc_tiparm(4,s,a,b,c,d)
#define TIPARM_5(s,a,b,c,d,e) _nc_tiparm(5,s,a,b,c,d,e)
#define TIPARM_6(s,a,b,c,d,e,f) _nc_tiparm(6,s,a,b,c,d,e,f)
#define TIPARM_7(s,a,b,c,d,e,f,g) _nc_tiparm(7,s,a,b,c,d,e,f,g)
#define TIPARM_8(s,a,b,c,d,e,f,g,h) _nc_tiparm(8,s,a,b,c,d,e,f,g,h)
#define TIPARM_9(s,a,b,c,d,e,f,g,h,i) _nc_tiparm(9,s,a,b,c,d,e,f,g,h,i)
#endif
#endif /* NC_TPARM_included */

View File

@ -0,0 +1,183 @@
/****************************************************************************
* Copyright 2018-2019,2020 Thomas E. Dickey *
* Copyright 2008-2010,2017 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_win32.h,v 1.9 2020/09/13 00:17:30 tom Exp $ */
#ifndef NC_WIN32_H
#define NC_WIN32_H 1
#if defined(_WIN32) || defined(_WIN64)
#ifndef _NC_WINDOWS
#define _NC_WINDOWS
#endif
#ifdef TERMIOS
#error TERMIOS must not be defined on Windows
#endif
/* We no longer support WindowsXP.
Minimum requirement is Windows Vista or Server2008,
aka Windows NT 6.0
*/
#ifdef WINVER
# if WINVER < 0x0600
# error WINVER must at least be 0x0600
# endif
#else
# define WINVER 0x0600
#endif
#undef _NC_CHECK_MINTTY
#if WINVER >= 0x0600
#define _NC_CHECK_MINTTY
#endif
#include <windows.h>
#if HAVE_SYS_TIME_H
#include <sys/time.h> /* for struct timeval */
#endif
#ifdef _NC_MSC
#include <winsock2.h> /* for struct timeval */
#endif
#ifdef __cplusplus
extern "C" {
#endif
#include <ncurses_dll.h>
#undef HAVE_GETTIMEOFDAY
#define HAVE_GETTIMEOFDAY 1
extern NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *);
#undef wcwidth
#define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs))
extern NCURSES_EXPORT(int) _nc_wcwidth(wchar_t);
#ifdef EVENTLIST_2nd /* test.priv.h just needs the preceding */
extern NCURSES_EXPORT(void) _nc_console_size(int* Lines, int* Cols);
extern NCURSES_EXPORT(HANDLE) _nc_console_handle(int fd);
extern NCURSES_EXPORT(int) _nc_console_isatty(int fd);
extern NCURSES_EXPORT(int) _nc_console_test(int fd);
extern NCURSES_EXPORT(int) _nc_console_read(SCREEN *sp,HANDLE hdl,int *buf);
extern NCURSES_EXPORT(int) _nc_console_twait(SCREEN *, HANDLE,int,int,int * EVENTLIST_2nd(_nc_eventlist * evl));
extern NCURSES_EXPORT(WORD) _nc_console_MapColor(bool fore, int color);
extern NCURSES_EXPORT(void) _nc_console_selectActiveHandle(void);
extern NCURSES_EXPORT(bool) _nc_console_get_SBI(void);
extern NCURSES_EXPORT(void) _nc_console_set_scrollback(bool normal, CONSOLE_SCREEN_BUFFER_INFO * info);
extern NCURSES_EXPORT(int) _nc_console_testmouse(SCREEN *,HANDLE,int EVENTLIST_2nd(_nc_eventlist*));
extern NCURSES_EXPORT(int) _nc_console_keyok(int keycode,int flag);
extern NCURSES_EXPORT(bool) _nc_console_keyExist(int keycode);
extern NCURSES_EXPORT(bool) _nc_console_checkinit(bool initFlag, bool assumeTermInfo);
extern NCURSES_EXPORT(int) _nc_console_vt_supported(void);
#ifdef _NC_CHECK_MINTTY
extern NCURSES_EXPORT(int) _nc_console_checkmintty(int fd, LPHANDLE pMinTTY);
#endif
#undef VALID_TERM_ENV
#define MS_TERMINAL "ms-terminal"
#define VALID_TERM_ENV(term_env, no_terminal) \
(term_env = (NonEmpty(term_env) \
? term_env \
: (_nc_console_vt_supported() \
? MS_TERMINAL \
: no_terminal)), \
NonEmpty(term_env))
/*
* Various Console mode definitions
*/
/* Flags to enable virtual Terminal processing */
#define VT_FLAG_OUT ENABLE_VIRTUAL_TERMINAL_PROCESSING
#define VT_FLAG_IN ENABLE_VIRTUAL_TERMINAL_INPUT
/* Default flags for input/output modes */
#define CONMODE_IN_DEFAULT (ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT)
#define CONMODE_OUT_DEFAULT (ENABLE_PROCESSED_OUTPUT | DISABLE_NEWLINE_AUTO_RETURN | ENABLE_LVB_GRID_WORLDWIDE)
/* Flags to reset from RAW/CBREAK */
#define CONMODE_NORAW (ENABLE_PROCESSED_INPUT|ENABLE_LINE_INPUT)
#define CONMODE_NOCBREAK (ENABLE_LINE_INPUT)
#if defined(USE_TERM_DRIVER) && defined(USE_WIN32CON_DRIVER)
extern NCURSES_EXPORT_VAR(TERM_DRIVER) _nc_WIN_DRIVER;
#endif
#define CON_NUMPAIRS 64
typedef struct {
BOOL initialized;
BOOL buffered;
BOOL window_only;
BOOL progMode;
BOOL isMinTTY;
BOOL isTermInfoConsole;
HANDLE out;
HANDLE inp;
HANDLE hdl;
HANDLE lastOut;
int numButtons;
LPDWORD ansi_map;
LPDWORD map;
LPDWORD rmap;
WORD pairs[CON_NUMPAIRS];
COORD origin;
CHAR_INFO *save_screen;
COORD save_size;
SMALL_RECT save_region;
CONSOLE_SCREEN_BUFFER_INFO SBI;
CONSOLE_SCREEN_BUFFER_INFO save_SBI;
CONSOLE_CURSOR_INFO save_CI;
TTY originalMode;
} ConsoleInfo;
extern NCURSES_EXPORT_VAR(ConsoleInfo) _nc_CONSOLE;
#define WINCONSOLE _nc_CONSOLE
#define TypeAlloca(type,count)(type*) _alloca(sizeof(type)*(size_t)(count))
#endif /* EVENTLIST_2nd */
#ifdef __cplusplus
}
#endif
#endif /* _WIN32 || _WIN64 */
#endif /* NC_WIN32_H */

View File

@ -31,7 +31,7 @@
* Author: Thomas E. Dickey 1997-on *
****************************************************************************/
/*
* $Id: ncurses_cfg.hin,v 1.12 2020/02/02 23:34:34 tom Exp $
* $Id: ncurses_cfg.hin,v 1.13 2020/03/08 12:37:59 tom Exp $
*
* Both ncurses_cfg.h and ncurses_def.h are internal header-files used when
* building ncurses.
@ -43,7 +43,7 @@
* 971222) to autoconf 2.12 or 2.13 to do this.
*
* See:
* http://invisible-island.net/autoconf/
* https://invisible-island.net/autoconf/
* ftp://ftp.invisible-island.net/autoconf/
*/
#ifndef NC_CONFIG_H

View File

@ -1,4 +1,4 @@
# $Id: ncurses_defs,v 1.92 2020/02/02 23:34:34 tom Exp $
# $Id: ncurses_defs,v 1.95 2020/08/01 19:48:21 tom Exp $
##############################################################################
# Copyright 2018-2019,2020 Thomas E. Dickey #
# Copyright 2000-2016,2017 Free Software Foundation, Inc. #
@ -63,6 +63,8 @@ HAVE_DERWIN 1
HAVE_DIRENT_H
HAVE_DUPWIN 1
HAVE_ERRNO
HAVE_EXIT_CURSES 1
HAVE_EXIT_TERMINFO 1
HAVE_FCNTL_H
HAVE_FILTER 1
HAVE_FORM_H
@ -120,7 +122,7 @@ HAVE_NANOSLEEP
HAVE_NC_ALLOC_H
HAVE_NEWPAD 1
HAVE_PANEL_H
HAVE_PCRE2_POSIX_H
HAVE_PCRE2POSIX_H
HAVE_PCREPOSIX_H
HAVE_POLL
HAVE_POLL_H

View File

@ -26,7 +26,7 @@
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************/
/* $Id: ncurses_dll.h.in,v 1.12 2020/02/02 23:34:34 tom Exp $ */
/* $Id: ncurses_dll.h.in,v 1.17 2020/09/05 17:58:47 juergen Exp $ */
#ifndef NCURSES_DLL_H_incl
#define NCURSES_DLL_H_incl 1
@ -66,52 +66,34 @@
* 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 */
/* "the right way" for proper static and dll+auto-import behavior */
#undef NCURSES_DLL
#define NCURSES_STATIC
#if defined(__CYGWIN__) || defined(_WIN32)
# if defined(NCURSES_DLL)
# if defined(NCURSES_STATIC)
# undef NCURSES_STATIC
# endif
# endif
# undef NCURSES_IMPEXP
# undef NCURSES_API
# undef NCURSES_EXPORT
# undef NCURSES_EXPORT_VAR
# if defined(NCURSES_DLL)
/* building a DLL */
# define NCURSES_IMPEXP __declspec(dllexport)
# elif defined(NCURSES_STATIC)
/* building or linking to a static library */
# define NCURSES_IMPEXP /* nothing */
# else
/* linking to the DLL */
# define NCURSES_IMPEXP __declspec(dllimport)
# endif
# define NCURSES_API __cdecl
# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
#if defined(BUILDING_NCURSES)
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
#else
# define NCURSES_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
#endif
/* Take care of non-cygwin platforms */
#if !defined(NCURSES_IMPEXP)
# define NCURSES_IMPEXP /* nothing */
#endif
#if !defined(NCURSES_API)
# define NCURSES_API /* nothing */
#endif
#if !defined(NCURSES_EXPORT)
# define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
#endif
#if !defined(NCURSES_EXPORT_VAR)
# define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
#define NCURSES_WRAPPED_VAR(type,name) extern NCURSES_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
#define NCURSES_EXPORT(type) NCURSES_IMPEXP type NCURSES_API
#define NCURSES_EXPORT_VAR(type) NCURSES_IMPEXP type
/*
* These symbols hide dllimport/dllexport, for compilers which care about it.
*/
#if defined(__CYGWIN__) || (defined(_WIN32) || defined(_WIN64))
# if defined(NCURSES_STATIC) /* "static" here only implies "not-a-DLL" */
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# else
# define NCURSES_EXPORT_GENERAL_IMPORT __declspec(dllimport)
# define NCURSES_EXPORT_GENERAL_EXPORT __declspec(dllexport)
# endif
# define NCURSES_API __cdecl
#else
# define NCURSES_EXPORT_GENERAL_IMPORT
# define NCURSES_EXPORT_GENERAL_EXPORT
# define NCURSES_API /* FIXME: __attribute__ ((cdecl)) is only available on x86 */
#endif
#endif /* NCURSES_DLL_H_incl */

View File

@ -33,7 +33,7 @@
* and: Thomas E. Dickey 1998-on *
****************************************************************************/
/* $Id: term_entry.h,v 1.59 2020/02/02 23:34:34 tom Exp $ */
/* $Id: term_entry.h,v 1.60 2020/02/29 15:46:00 anonymous.maarten Exp $ */
/*
* term_entry.h -- interface to entry-manipulation code
@ -200,8 +200,8 @@ extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE2 *, bool);
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool);
/* trace_xnames.c */
extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);

View File

@ -0,0 +1,75 @@
/****************************************************************************
* Copyright 2018,2020 Thomas E. Dickey *
* Copyright 2008-2014,2017 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: win32_curses.h,v 1.2 2020/11/14 23:52:46 tom Exp $ */
/*
* This is the interface we use on Windows to mimic the control of the settings
* of what acts like the classic TTY - the Windows Console.
*/
#if (defined(_WIN32) || defined(_WIN64))
#ifndef _NC_WIN32_CURSES_H
#define _NC_WIN32_CURSES_H 1
struct winconmode
{
unsigned long dwFlagIn;
unsigned long dwFlagOut;
};
extern NCURSES_EXPORT(void*) _nc_console_fd2handle(int fd);
extern NCURSES_EXPORT(int) _nc_console_setmode(void* handle, const struct winconmode* arg);
extern NCURSES_EXPORT(int) _nc_console_getmode(void* handle, struct winconmode* arg);
extern NCURSES_EXPORT(int) _nc_console_flush(void* handle);
/*
A few definitions of Unix functions we need to emulate
*/
#define SIGHUP 1
#define SIGKILL 9
#undef getlogin
#define getlogin() getenv("USERNAME")
#undef ttyname
#define ttyname(fd) NULL
#undef sleep
#define sleep(n) Sleep((n) * 1000)
#undef gettimeofday
#define gettimeofday(tv,tz) _nc_gettimeofday(tv,tz)
#endif /* _NC_WIN32_CURSES_H */
#endif /* _WIN32||_WIN64 */

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wch.3x,v 1.26 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_add_wch.3x,v 1.28 2020/10/17 23:10:38 tom Exp $
.TH curs_add_wch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -55,7 +55,7 @@
.B "int mvadd_wch( int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
.br
.B "int mvwadd_wch( WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, const cchar_t *\fIwch\fB );"
.br
.sp
.B "int echo_wchar( const cchar_t *\fIwch\fB );"
.br
.B "int wecho_wchar( WINDOW *\fIwin\fP, const cchar_t *\fIwch\fB );"
@ -212,6 +212,25 @@ U+2550 BOX DRAWINGS DOUBLE HORIZONTAL
.PP
All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success.
.PP
X/Open does not define any error conditions.
This implementation returns an error
.bP
if the window pointer is null or
.bP
if it is not possible to add a complete character in the window.
.PP
The latter may be due to different causes:
.bP
If \fBscrollok\fR is not enabled,
writing a character at the lower right margin succeeds.
However, an error is returned because
it is not possible to wrap to a new line
.bP
If an error is detected when converting a multibyte character to a sequence
of bytes,
or if it is not possible to add all of the resulting bytes in the window,
an error is returned.
.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.

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_add_wchstr.3x,v 1.13 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_add_wchstr.3x,v 1.15 2020/12/19 21:39:06 tom Exp $
.TH curs_add_wchstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -61,7 +61,7 @@
\fBint wadd_wchstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
.br
\fBint wadd_wchnstr(WINDOW *\fR \fIwin\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
.sp
\fBint mvadd_wchstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB);\fR
.br
\fBint mvadd_wchnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const cchar_t *\fR\fIwchstr\fR\fB, int \fR\fIn\fR\fB);\fR
@ -115,8 +115,8 @@ All functions except \fBwadd_wchnstr\fR may be macros.
.SH PORTABILITY
These entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fBcurs_addwstr\fR(3X),
\fBcurses\fR(3X).
\fBcurses\fR(3X),
\fBcurs_addwstr\fR(3X).
.PP
Comparable functions in the narrow-character (ncurses) library are
described in

View File

@ -28,7 +28,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addch.3x,v 1.51 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_addch.3x,v 1.55 2020/10/24 09:12:31 tom Exp $
.TH curs_addch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -48,17 +48,17 @@
.SH SYNOPSIS
\fB#include <curses.h>\fR
.PP
\fBint addch(const chtype ch);\fR
\fBint addch(const chtype \fP\fIch\fP\fB);\fR
.br
\fBint waddch(WINDOW *win, const chtype ch);\fR
\fBint waddch(WINDOW *\fP\fIwin\fP\fB, const chtype \fP\fIch\fP\fB);\fR
.br
\fBint mvaddch(int y, int x, const chtype ch);\fR
\fBint mvaddch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype \fP\fIch\fP\fB);\fR
.br
\fBint mvwaddch(WINDOW *win, int y, int x, const chtype ch);\fR
\fBint mvwaddch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype \fP\fIch\fP\fB);\fR
.sp
\fBint echochar(const chtype \fP\fIch\fP\fB);\fR
.br
\fBint echochar(const chtype ch);\fR
.br
\fBint wechochar(WINDOW *win, const chtype ch);\fR
\fBint wechochar(WINDOW *\fP\fIwin\fP\fB, const chtype \fP\fIch\fP\fB);\fR
.br
.SH DESCRIPTION
.SS Adding characters
@ -94,11 +94,12 @@ scrolling the window if on the last line.
Tabs are considered to be at every eighth column.
The tab interval may be altered by setting the \fBTABSIZE\fR variable.
.PP
If \fIch\fR is any other control character, it
is drawn in \fB^\fR\fIX\fR notation.
If \fIch\fR is any other nonprintable character,
it is drawn in printable form,
i.e., the \fB^\fR\fIX\fR notation used by \fBunctrl\fR(3X).
Calling \fBwinch\fR after adding a
control character does not return the character itself, but instead returns
the ^-representation of the control character.
nonprintable character does not return the character itself,
but instead returns the printable representation of the character.
.PP
Video attributes can be combined with a character argument passed to
\fBaddch\fR or related functions by logical-ORing them into the character.
@ -175,6 +176,19 @@ unless otherwise noted in the preceding routine descriptions.
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.
.PP
If it is not possible to add a complete character,
an error is returned:
.bP
If \fBscrollok\fR is not enabled,
writing a character at the lower right margin succeeds.
However, an error is returned because
it is not possible to wrap to a new line
.bP
If an error is detected when converting a multibyte character to a sequence
of bytes,
or if it is not possible to add all of the resulting bytes in the window,
an error is returned.
.SH NOTES
Note that \fBaddch\fR, \fBmvaddch\fR, \fBmvwaddch\fR, and
\fBechochar\fR may be macros.

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addchstr.3x,v 1.19 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_addchstr.3x,v 1.22 2020/12/19 21:39:20 tom Exp $
.TH curs_addchstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -54,21 +54,21 @@
.nf
\fB#include <curses.h>\fR
.PP
\fBint addchstr(const chtype *chstr);\fR
\fBint addchstr(const chtype *\fP\fIchstr\fP\fB);\fR
.br
\fBint addchnstr(const chtype *chstr, int n);\fR
\fBint addchnstr(const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint waddchstr(WINDOW *win, const chtype *chstr);\fR
\fBint waddchstr(WINDOW *\fP\fIwin\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fR
.br
\fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR
\fBint waddchnstr(WINDOW *\fP\fIwin\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fR
.sp
\fBint mvaddchstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fR
.br
\fBint mvaddchstr(int y, int x, const chtype *chstr);\fR
\fBint mvaddchnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR
\fBint mvwaddchstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB);\fR
.br
\fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR
.br
\fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR
\fBint mvwaddchnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, const chtype *\fP\fIchstr\fP\fB, int \fP\fIn\fP\fB);\fR
.fi
.SH DESCRIPTION
These functions copy the (null-terminated)
@ -109,8 +109,8 @@ All functions except \fBwaddchnstr\fR may be macros.
.SH PORTABILITY
These entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fBcurs_addstr\fR(3X),
\fBcurses\fR(3X).
\fBcurses\fR(3X),
\fBcurs_addstr\fR(3X).
.PP
Comparable functions in the wide-character (ncursesw) library are
described in

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addstr.3x,v 1.20 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_addstr.3x,v 1.23 2020/10/17 23:11:02 tom Exp $
.TH curs_addstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -61,7 +61,7 @@
\fBint waddstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB);\fR
.br
\fBint waddnstr(WINDOW *\fR\fIwin\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
.sp
\fBint mvaddstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB);\fR
.br
\fBint mvaddnstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const char *\fR\fIstr\fR\fB, int \fR\fIn\fR\fB);\fR
@ -73,14 +73,14 @@
.SH DESCRIPTION
These functions write the (null-terminated) character string
\fIstr\fR on the given window.
It is similar to calling \fBwaddch\fR once for each character in the string.
It is similar to calling \fBwaddch\fR once for each byte in the string.
.PP
The \fImv\fR functions perform cursor movement once, before writing any
characters.
Thereafter, the cursor is advanced as a side-effect of writing to the window.
.PP
The four functions with \fIn\fR as the last argument
write at most \fIn\fR characters,
write at most \fIn\fR bytes,
or until a terminating null is reached.
If \fIn\fR is \-1, then the entire string will be added.
.SH RETURN VALUE
@ -98,6 +98,18 @@ if the corresponding calls to \fBwaddch\fP return an error.
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.
If an error is returned by the \fBwmove\fP,
no characters are added to the window.
.PP
If an error is returned by \fBwaddch\fP
(e.g.,
because the window is not large enough,
or an illegal byte sequence was detected)
only part of the string may be added.
Aside from that,
there is a special case in \fBwaddch\fP where an error may be
returned after successfully writing a character to the lower-right corner
of a window when \fBscrollok\fP is disabled.
.SH NOTES
All of these functions except \fBwaddnstr\fR may be macros.
.SH PORTABILITY

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_addwstr.3x,v 1.14 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_addwstr.3x,v 1.15 2020/10/17 23:12:22 tom Exp $
.TH curs_addwstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -61,7 +61,7 @@
\fBint waddwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint waddnwstr(WINDOW *\fR\fIwin\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
.sp
\fBint mvaddwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint mvaddnwstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, const wchar_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_bkgd.3x,v 1.30 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_bkgd.3x,v 1.31 2020/10/17 23:12:52 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
@ -43,11 +43,11 @@
\fBvoid bkgdset(chtype \fP\fIch\fP\fB);\fR
.br
\fBvoid wbkgdset(WINDOW *\fP\fIwin, chtype \fP\fIch\fP\fB);\fR
.br
.sp
\fBint bkgd(chtype \fP\fIch\fP\fB);\fR
.br
\fBint wbkgd(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB);\fR
.br
.sp
\fBchtype getbkgd(WINDOW *\fP\fIwin\fP\fB);\fR
.br
.SH DESCRIPTION

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_bkgrnd.3x,v 1.11 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_bkgrnd.3x,v 1.12 2020/10/17 23:13:15 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
@ -47,11 +47,11 @@
\fBint bkgrnd(\fR\fB const cchar_t *\fR\fIwch\fR\fB);\fR
.br
\fBint wbkgrnd(\fR\fB WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR
.br
.sp
\fBvoid bkgrndset(const cchar_t *\fR\fIwch\fR \fB);\fR
.br
\fBvoid wbkgrndset(WINDOW *\fR\fIwin\fR\fB, const cchar_t *\fR\fIwch\fR\fB);\fR
.br
.sp
\fBint getbkgrnd(cchar_t *\fR\fIwch\fR\fB);\fR
.br
\fBint wgetbkgrnd(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwch\fR\fB);\fR

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_border.3x,v 1.25 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_border.3x,v 1.27 2020/10/18 00:33:06 tom Exp $
.TH curs_border 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -51,31 +51,31 @@
.hy
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBint border(chtype \fP\fIls\fP\fB, chtype \fP\fIrs\fP\fB, chtype \fP\fIts\fP\fB, chtype \fP\fIbs\fP\fB,\fR
\fBchtype \fP\fItl\fP\fB, chtype \fP\fItr\fP\fB, chtype \fP\fIbl\fP\fB, chtype \fP\fIbr\fP\fB);\fR
.br
\fBint border(chtype ls, chtype rs, chtype ts, chtype bs,\fR
\fBchtype tl, chtype tr, chtype bl, chtype br);\fR
\fBint wborder(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIls\fP\fB, chtype \fP\fIrs\fP\fB,\fR
\fBchtype \fP\fIts\fP\fB, chtype \fP\fIbs\fP\fB, chtype \fP\fItl\fP\fB, chtype \fP\fItr\fP\fB,\fR
\fBchtype \fP\fIbl\fP\fB, chtype \fP\fIbr\fP\fB);\fR
.sp
\fBint box(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIverch\fP\fB, chtype \fP\fIhorch\fP\fB);\fR
.sp
\fBint hline(chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint wborder(WINDOW *win, chtype ls, chtype rs,\fR
\fBchtype ts, chtype bs, chtype tl, chtype tr,\fR
\fBchtype bl, chtype br);\fR
\fBint whline(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint box(WINDOW *win, chtype verch, chtype horch);\fR
\fBint vline(chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint hline(chtype ch, int n);\fR
\fBint wvline(WINDOW *\fP\fIwin\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.sp
\fBint mvhline(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint whline(WINDOW *win, chtype ch, int n);\fR
\fBint mvwhline(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint vline(chtype ch, int n);\fR
\fBint mvvline(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint wvline(WINDOW *win, chtype ch, int n);\fR
.br
\fBint mvhline(int y, int x, chtype ch, int n);\fR
.br
\fBint mvwhline(WINDOW *, int y, int x, chtype ch, int n);\fR
.br
\fBint mvvline(int y, int x, chtype ch, int n);\fR
.br
\fBint mvwvline(WINDOW *, int y, int x, chtype ch, int n);\fR
\fBint mvwvline(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, chtype \fP\fIch\fP\fB, int \fP\fIn\fP\fB);\fR
.br
.SH DESCRIPTION
The \fBborder\fR, \fBwborder\fR and \fBbox\fR routines

View File

@ -27,10 +27,14 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_clear.3x,v 1.17 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_clear.3x,v 1.20 2020/10/24 09:19:37 tom Exp $
.TH curs_clear 3X ""
.na
.hy 0
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
..
.SH NAME
\fBerase\fR,
\fBwerase\fR,
@ -43,23 +47,23 @@
.ad
.hy
.SH SYNOPSIS
\fB# include <curses.h>\fR
\fB#include <curses.h>\fR
.sp
\fBint erase(void);\fR
.br
\fBint werase(WINDOW *win);\fR
.br
\fBint werase(WINDOW *\fP\fIwin\fP\fB);\fR
.sp
\fBint clear(void);\fR
.br
\fBint wclear(WINDOW *win);\fR
.br
\fBint wclear(WINDOW *\fP\fIwin\fP\fB);\fR
.sp
\fBint clrtobot(void);\fR
.br
\fBint wclrtobot(WINDOW *win);\fR
.br
\fBint wclrtobot(WINDOW *\fP\fIwin\fP\fB);\fR
.sp
\fBint clrtoeol(void);\fR
.br
\fBint wclrtoeol(WINDOW *win);\fR
\fBint wclrtoeol(WINDOW *\fP\fIwin\fP\fB);\fR
.br
.SH DESCRIPTION
The \fBerase\fR and \fBwerase\fR routines copy blanks to every
@ -82,12 +86,14 @@ Blanks created by erasure have the current background rendition (as set
by \fBwbkgdset\fR) merged into them.
.SH RETURN VALUE
All routines return the integer \fBOK\fR on success and \fBERR\fP on failure.
The SVr4.0 manual says "or a
non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
.PP
X/Open defines no error conditions.
In this implementation,
functions using a window pointer parameter return an error if it is null.
.bP
functions using a window pointer parameter return an error if it is null
.bP
\fBwclrtoeol\fP returns an error
if the cursor position is about to wrap.
.SH NOTES
Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
\fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
@ -97,6 +103,12 @@ The
standard specifies that they return \fBERR\fR on failure, but specifies no
error conditions.
.PP
The SVr4.0 manual says that these functions could
return "a non-negative integer if \fBimmedok\fR is set",
referring to the return-value of \fBwrefresh\fP.
In that implementation, \fBwrefresh\fP would return a count of
the number of characters written to the terminal.
.PP
Some historic curses implementations had, as an undocumented feature, the
ability to do the equivalent of \fBclearok(..., 1)\fR by saying
\fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR.

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_color.3x,v 1.62 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_color.3x,v 1.63 2020/10/24 09:35:23 tom Exp $
.TH curs_color 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -66,31 +66,31 @@
.br
\fBbool can_change_color(void);\fR
.sp
\fBint init_pair(short pair, short f, short b);\fR
\fBint init_pair(short \fP\fIpair\fP\fB, short \fP\fIf\fP\fB, short \fP\fIb\fP\fB);\fR
.br
\fBint init_color(short color, short r, short g, short b);\fR
\fBint init_color(short \fP\fIcolor\fP\fB, short \fP\fIr\fP\fB, short \fP\fIg\fP\fB, short \fP\fIb\fP\fB);\fR
.br
/* extensions */
.br
\fBint init_extended_pair(int pair, int f, int b);\fR
\fBint init_extended_pair(int \fP\fIpair\fP\fB, int \fP\fIf\fP\fB, int \fP\fIb\fP\fB);\fR
.br
\fBint init_extended_color(int color, int r, int g, int b);\fR
\fBint init_extended_color(int \fP\fIcolor\fP\fB, int \fP\fIr\fP\fB, int \fP\fIg\fP\fB, int \fP\fIb\fP\fB);\fR
.sp
\fBint color_content(short color, short *r, short *g, short *b);\fR
\fBint color_content(short \fP\fIcolor\fP\fB, short *\fP\fIr\fP\fB, short *\fP\fIg\fP\fB, short *\fP\fIb\fP\fB);\fR
.br
\fBint pair_content(short pair, short *f, short *b);\fR
\fBint pair_content(short \fP\fIpair\fP\fB, short *\fP\fIf\fP\fB, short *\fP\fIb\fP\fB);\fR
.br
/* extensions */
.br
\fBint extended_color_content(int color, int *r, int *g, int *b);\fR
\fBint extended_color_content(int \fP\fIcolor\fP\fB, int *\fP\fIr\fP\fB, int *\fP\fIg\fP\fB, int *\fP\fIb\fP\fB);\fR
.br
\fBint extended_pair_content(int pair, int *f, int *b);\fR
\fBint extended_pair_content(int \fP\fIpair\fP\fB, int *\fP\fIf\fP\fB, int *\fP\fIb\fP\fB);\fR
.sp
/* extensions */
.br
\fBvoid reset_color_pairs(void);\fR
.sp
\fBint COLOR_PAIR(int n);\fR
\fBint COLOR_PAIR(int \fP\fIn\fP\fB);\fR
.br
\fBPAIR_NUMBER(\fR\fIattrs\fR\fB);\fP
.br

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_delch.3x,v 1.14 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_delch.3x,v 1.15 2020/10/24 09:36:43 tom Exp $
.TH curs_delch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -43,11 +43,11 @@
.sp
\fBint delch(void);\fR
.br
\fBint wdelch(WINDOW *win);\fR
\fBint wdelch(WINDOW *\fP\fIwin\fP\fB);\fR
.br
\fBint mvdelch(int y, int x);\fR
\fBint mvdelch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
\fBint mvwdelch(WINDOW *win, int y, int x);\fR
\fBint mvwdelch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
.SH DESCRIPTION
These routines delete the character under the cursor; all characters to the

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_deleteln.3x,v 1.15 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_deleteln.3x,v 1.17 2020/10/18 00:28:51 tom Exp $
.TH curs_deleteln 3X ""
.SH NAME
\fBdeleteln\fR,
@ -41,15 +41,15 @@
.sp
\fBint deleteln(void);\fR
.br
\fBint wdeleteln(WINDOW *win);\fR
.br
\fBint insdelln(int n);\fR
.br
\fBint winsdelln(WINDOW *win, int n);\fR
\fBint wdeleteln(WINDOW *\fP\fIwin\fP\fB);\fR
.sp
\fBint insdelln(int \fP\fIn\fP\fB);\fR
.br
\fBint winsdelln(WINDOW *\fP\fIwin\fP\fB, int \fP\fIn\fP\fB);\fR
.sp
\fBint insertln(void);\fR
.br
\fBint winsertln(WINDOW *win);\fR
\fBint winsertln(WINDOW *\fP\fIwin\fP\fB);\fR
.br
.SH DESCRIPTION
The \fBdeleteln\fR and \fBwdeleteln\fR routines delete the line under the

View File

@ -29,7 +29,7 @@
.\"
.\" Author: Thomas E. Dickey 1999-on
.\"
.\" $Id: curs_extend.3x,v 1.23 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_extend.3x,v 1.24 2020/10/24 09:37:07 tom Exp $
.TH curs_extend 3X ""
.SH NAME
\fBcurses_version\fP,
@ -40,7 +40,7 @@
.sp
\fBconst char * curses_version(void);\fP
.br
\fBint use_extended_names(bool enable);\fP
\fBint use_extended_names(bool \fP\fIenable\fP\fB);\fP
.SH DESCRIPTION
These functions are extensions to the curses library
which do not fit easily into other categories.

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_get_wch.3x,v 1.13 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_get_wch.3x,v 1.14 2020/10/17 23:17:05 tom Exp $
.TH curs_get_wch 3X ""
.na
.hy 0
@ -57,7 +57,7 @@
\fBint mvget_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR
.br
\fBint mvwget_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwch\fR\fB);\fR
.br
.sp
\fBint unget_wch(const wchar_t \fR\fIwch\fR\fB);\fR
.SH DESCRIPTION
The

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_get_wstr.3x,v 1.20 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_get_wstr.3x,v 1.21 2020/10/17 23:17:24 tom Exp $
.TH curs_get_wstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -61,7 +61,7 @@
\fBint wget_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint wgetn_wstr(WINDOW *\fR\fIwin\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR
.br
.sp
\fBint mvget_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB);\fR
.br
\fBint mvgetn_wstr(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, wint_t *\fR\fIwstr\fR\fB, int \fR\fIn\fR\fB);\fR

View File

@ -28,7 +28,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_getch.3x,v 1.55 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_getch.3x,v 1.57 2020/12/19 21:38:20 tom Exp $
.TH curs_getch 3X ""
.na
.hy 0
@ -55,12 +55,14 @@
\fBint getch(void);\fR
.br
\fBint wgetch(WINDOW *\fP\fIwin);\fR
.br
.sp
\fBint mvgetch(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
\fBint mvwgetch(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
.sp
\fBint ungetch(int \fP\fIch\fP\fB);\fR
.sp
/* extension */
.br
\fBint has_key(int \fP\fIch\fP\fB);\fR
.br
@ -404,9 +406,9 @@ any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_inopts\fR(3X),
\fBcurs_outopts\fR(3X),
\fBcurs_mouse\fR(3X),
\fBcurs_move\fR(3X),
\fBcurs_outopts\fR(3X),
\fBcurs_refresh\fR(3X),
\fBcurs_variables\fR(3X),
\fBresizeterm\fR(3X).

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_getstr.3x,v 1.29 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_getstr.3x,v 1.31 2020/10/18 00:27:44 tom Exp $
.TH curs_getstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -53,21 +53,21 @@
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBint getstr(char *str);\fR
\fBint getstr(char *\fP\fIstr\fP\fB);\fR
.br
\fBint getnstr(char *str, int n);\fR
\fBint getnstr(char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint wgetstr(WINDOW *win, char *str);\fR
\fBint wgetstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB);\fR
.br
\fBint wgetnstr(WINDOW *win, char *str, int n);\fR
\fBint wgetnstr(WINDOW *\fP\fIwin\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fR
.sp
\fBint mvgetstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fR
.br
\fBint mvgetstr(int y, int x, char *str);\fR
\fBint mvwgetstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB);\fR
.br
\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR
\fBint mvgetnstr(int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fR
.br
\fBint mvgetnstr(int y, int x, char *str, int n);\fR
.br
\fBint mvwgetnstr(WINDOW *, int y, int x, char *str, int n);\fR
\fBint mvwgetnstr(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB, char *\fP\fIstr\fP\fB, int \fP\fIn\fP\fB);\fR
.br
.SH DESCRIPTION
The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR,

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_getyx.3x,v 1.19 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_getyx.3x,v 1.20 2020/10/24 09:38:43 tom Exp $
.TH curs_getyx 3X ""
.SH NAME
\fBgetyx\fR,
@ -37,13 +37,13 @@
.SH SYNOPSIS
\fB#include <curses.h>\fR
.sp
\fBvoid getyx(WINDOW *win, int y, int x);\fR
\fBvoid getyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
\fBvoid getparyx(WINDOW *win, int y, int x);\fR
\fBvoid getparyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
\fBvoid getbegyx(WINDOW *win, int y, int x);\fR
\fBvoid getbegyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
\fBvoid getmaxyx(WINDOW *win, int y, int x);\fR
\fBvoid getmaxyx(WINDOW *\fP\fIwin\fP\fB, int \fP\fIy\fP\fB, int \fP\fIx\fP\fB);\fR
.br
.SH DESCRIPTION
The \fBgetyx\fR macro places the current cursor position of the given window in

View File

@ -27,7 +27,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
.\" $Id: curs_in_wch.3x,v 1.9 2020/02/02 23:34:34 tom Exp $
.\" $Id: curs_in_wch.3x,v 1.10 2020/10/17 23:19:29 tom Exp $
.TH curs_in_wch 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
@ -43,11 +43,11 @@
.sp
\fBint in_wch(cchar_t *\fR\fIwcval\fR\fB);\fR
.br
\fBint win_wch(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
.sp
\fBint mvin_wch(int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
.br
\fBint mvwin_wch(WINDOW *\fR\fIwin\fR\fB, int \fR\fIy\fR\fB, int \fR\fIx\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
.br
\fBint win_wch(WINDOW *\fR\fIwin\fR\fB, cchar_t *\fR\fIwcval\fR\fB);\fR
.SH DESCRIPTION
These functions extract the complex character and rendition from
the current position in the named window into the \fBcchar_t\fR object

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