mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 18:30:55 +01:00
24069: add zcurses_keycodes
This commit is contained in:
parent
b9f3fc7c81
commit
ea15ee8867
3 changed files with 22 additions and 0 deletions
|
|
@ -1,5 +1,8 @@
|
|||
2007-11-06 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 24069: Doc/Zsh/mod_curses.yo, Src/Modules/curses.c: add
|
||||
$zcurses_keycodes.
|
||||
|
||||
* 24068: Src/builtin.c: attempt to make `printf "%g\n" -0'
|
||||
output "-0", although this depends on the vagaries of the
|
||||
library's strtod() (works on Solaris, doesn't on Fedora 7).
|
||||
|
|
|
|||
|
|
@ -176,6 +176,13 @@ item(tt(zcurses_colors))(
|
|||
Readonly array. The colors supported by tt(zsh/curses); available
|
||||
as soon as the module is loaded.
|
||||
)
|
||||
vindex(zcurses_keycodes)
|
||||
item(tt(zcurses_keycodes))(
|
||||
Readonly array. The values that may be returned in the second
|
||||
parameter supplied to `tt(zcurses input)' in the order in which they
|
||||
are defined internally by curses. Not all function keys
|
||||
are listed, only tt(F0); curses reserves space for tt(F0) up to tt(F63).
|
||||
)
|
||||
vindex(zcurses_windows)
|
||||
item(tt(zcurses_windows))(
|
||||
Readonly array. The current list of windows, i.e. all windows that
|
||||
|
|
|
|||
|
|
@ -1209,6 +1209,16 @@ static const struct gsu_array zcurses_attrs_gsu =
|
|||
{ zcurses_attrgetfn, arrsetfn, stdunsetfn };
|
||||
|
||||
|
||||
static char **
|
||||
zcurses_keycodesgetfn(UNUSED(Param pm))
|
||||
{
|
||||
return zcurses_pairs_to_array(keypad_names);
|
||||
}
|
||||
|
||||
static const struct gsu_array zcurses_keycodes_gsu =
|
||||
{ zcurses_keycodesgetfn, arrsetfn, stdunsetfn };
|
||||
|
||||
|
||||
static char **
|
||||
zcurses_windowsgetfn(UNUSED(Param pm))
|
||||
{
|
||||
|
|
@ -1254,6 +1264,8 @@ static struct paramdef partab[] = {
|
|||
&zcurses_colorsarr_gsu, NULL, NULL),
|
||||
SPECIALPMDEF("zcurses_attrs", PM_ARRAY|PM_READONLY,
|
||||
&zcurses_attrs_gsu, NULL, NULL),
|
||||
SPECIALPMDEF("zcurses_keycodes", PM_ARRAY|PM_READONLY,
|
||||
&zcurses_keycodes_gsu, NULL, NULL),
|
||||
SPECIALPMDEF("zcurses_windows", PM_ARRAY|PM_READONLY,
|
||||
&zcurses_windows_gsu, NULL, NULL),
|
||||
SPECIALPMDEF("ZCURSES_COLORS", PM_INTEGER|PM_READONLY,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue