NameDateSize

..20-Feb-202039

base/20-Feb-202092

build.priv.h20-Feb-20203.8 KiB

curses.priv.h20-Feb-202084.5 KiB

fifo_defs.h20-Feb-20203.4 KiB

llib-lncurses20-Feb-202070 KiB

llib-lncursest20-Feb-202072.3 KiB

llib-lncursestw20-Feb-202087.5 KiB

llib-lncursesw20-Feb-202085.2 KiB

llib-ltic20-Feb-20205.4 KiB

llib-ltict20-Feb-20205.4 KiB

llib-ltictw20-Feb-20205.4 KiB

llib-lticw20-Feb-20205.4 KiB

llib-ltinfo20-Feb-202026.6 KiB

llib-ltinfot20-Feb-202028.7 KiB

llib-ltinfotw20-Feb-202029.9 KiB

llib-ltinfow20-Feb-202027.8 KiB

Makefile.in20-Feb-202010.8 KiB

modules20-Feb-202011 KiB

new_pair.h20-Feb-20204.9 KiB

README20-Feb-20203.2 KiB

README.IZ20-Feb-20205.1 KiB

report_offsets.c20-Feb-20207.4 KiB

SigAction.h20-Feb-20203.9 KiB

tinfo/20-Feb-202059

trace/20-Feb-202014

tty/20-Feb-202010

wcwidth.h03-Mar-201413.7 KiB

widechar/20-Feb-202023

win32con/20-Feb-20205

README

1-------------------------------------------------------------------------------
2-- Copyright 2020 Thomas E. Dickey                                           --
3-- Copyright 1998-2006,2009 Free Software Foundation, Inc.                   --
4--                                                                           --
5-- Permission is hereby granted, free of charge, to any person obtaining a   --
6-- copy of this software and associated documentation files (the             --
7-- "Software"), to deal in the Software without restriction, including       --
8-- without limitation the rights to use, copy, modify, merge, publish,       --
9-- distribute, distribute with modifications, sublicense, and/or sell copies --
10-- of the Software, and to permit persons to whom the Software is furnished  --
11-- to do so, subject to the following conditions:                            --
12--                                                                           --
13-- The above copyright notice and this permission notice shall be included   --
14-- in all copies or substantial portions of the Software.                    --
15--                                                                           --
16-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
17-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
18-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
19-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
20-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
21-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
22-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
23--                                                                           --
24-- Except as contained in this notice, the name(s) of the above copyright    --
25-- holders shall not be used in advertising or otherwise to promote the      --
26-- sale, use or other dealings in this Software without prior written        --
27-- authorization.                                                            --
28-------------------------------------------------------------------------------
29-- $Id: README,v 1.11 2020/02/02 23:34:34 tom Exp $
30-------------------------------------------------------------------------------
31For discussion of the package internals, see hackguide.html in the doc/html
32directory.
33
34-------------------------------------------------------------------------------
35The llib-lXXXX files could be used as lint-library sources (and were, at one
36time).  However, they are actually used as a documentation aid to keep track
37of changes to the public/private interfaces in ncurses.  Most of the text in
38these files is generated using cproto; some manual cleanup and adjustment of
39types (to reflect #define's in curses.h) is needed.  The functions listed in
40the llib-lXXXX files do not correspond to the default configure options; some
41additional ones are added to include "all" of the entrypoints for each of the
42major configurations (normal, wide-character, threaded):
43
44	--disable-macros
45	--disable-root-environ
46	--enable-expanded
47	--enable-getcap
48	--enable-getcap-cache
49	--enable-sp-funcs
50	--enable-termcap
51	--with-develop
52

README.IZ

1-------------------------------------------------------------------------------
2-- Copyright 2020 Thomas E. Dickey                                           --
3-- Copyright 2002,2006 Free Software Foundation, Inc.                        --
4--                                                                           --
5-- Permission is hereby granted, free of charge, to any person obtaining a   --
6-- copy of this software and associated documentation files (the             --
7-- "Software"), to deal in the Software without restriction, including       --
8-- without limitation the rights to use, copy, modify, merge, publish,       --
9-- distribute, distribute with modifications, sublicense, and/or sell copies --
10-- of the Software, and to permit persons to whom the Software is furnished  --
11-- to do so, subject to the following conditions:                            --
12--                                                                           --
13-- The above copyright notice and this permission notice shall be included   --
14-- in all copies or substantial portions of the Software.                    --
15--                                                                           --
16-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS   --
17-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF                --
18-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN --
19-- NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,       --
20-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR     --
21-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE --
22-- USE OR OTHER DEALINGS IN THE SOFTWARE.                                    --
23--                                                                           --
24-- Except as contained in this notice, the name(s) of the above copyright    --
25-- holders shall not be used in advertising or otherwise to promote the      --
26-- sale, use or other dealings in this Software without prior written        --
27-- authorization.                                                            --
28-------------------------------------------------------------------------------
29-- $Id: README.IZ,v 1.4 2020/02/02 23:34:34 tom Exp $
30---------------------------------------------------------------------
31
32Here is the patch.  I did no testing whatsoever with event watching
33requests present (I need some applications which exercise this before
34this, probably lynx ;-), but the code looks working "the normal way".
35
36I had no way to test that the poll() branch compiles/works...
37
38Here is the API: 
39
40*) two new functions wgetch_events() wgetstrn_event() are introduced,
41   which allow an event-watch specification given as the last argument;
42
43*) if the last argument is NULL, they behave as wgetch() and
44   wgetstrn() (TESTED!);
45
46*) the event specification is a pointer to _nc_eventlist, which
47   contains bookkeeping elements (count and the summary of results),
48   and an array of pointers to _nc_event;
49
50*) each _nc_event is a typed union, with two types supported "as
51   shipped": _NC_EVENT_TIMEOUT_MSEC, _NC_EVENT_FILE.  For
52   _NC_EVENT_FILE the fields are fd, flag, and the output field.
53
54*) The only supported flag "as shipped" is _NC_EVENT_FILE_READABLE.
55   If the file was found readable, the return field is set to this,
56   otherwise to 0;
57
58*) If these functions return KEY_EVENT, this means that the return
59   fields in both the _nc_eventlist and _nc_event structures make
60   sense.  The field result_flags of _nc_eventlist may have a
61   combination of bits _NC_EVENT_TIMEOUT_MSEC and _NC_EVENT_FILE_READABLE
62   set;
63
64*) The timeout_msec field of _NC_EVENT_TIMEOUT_MSEC _nc_event's is
65   updated on return, even if the return is not KEY_EVENT.  However,
66   the change in the value represents only the amount of time spent in
67   waiting for events, not the amount of time spent bookkeeping;
68
69*) the return KEY_EVENT of wgetstrn_event() means that the output
70   string includes the user input typed so far, but the user did not have
71   a chance to press ENTER (or whatever).  This call should be
72   repeated (with "shifted" pointer to a buffer, of course) to
73   complete the input;
74
75*) The presence of this extension can be checked via inspecting
76   #ifdef NCURSES_EVENT_VERSION.  This symbol is not defined on BeOS,
77   since there is no support for this on BeOS.
78
79Known issues:  calls interrupted by KEY_EVENT reset the ESCDELAY
80timer.  This is not entirely new, since other synthetic events behave
81the same (see "if (ch >= KEY_MIN)" branch of kgetch()).  However,
82KEY_EVENT may be generated in a continuous stream (say, when
83downloading a file), thus this may be more important than with other
84synthetic keys.  An additional field in window structure which keeps
85timestamp of the first raw key in the queue may be needed to
86circumvent this.
87
88Another possible issue: KEY_EVENT has a preference over a user input,
89so a stream of KEY_EVENT's can make input hard.  Maybe use
90result_flags as in input parameter too, which specifies whether the
91user input should have higher precedence?
92
93Also: I took an opportunity to document kgetch() better.
94
95Enjoy,
96Ilya
97