diff options
author | 1997-11-26 04:01:02 +0000 | |
---|---|---|
committer | 1997-11-26 04:01:02 +0000 | |
commit | 010b00ebb3f4bdd576ec41ca1d5d0a8994e8fe5b (patch) | |
tree | 5ee5e7213ad9b412a927de7effdcb7c8ce4b489e /lib/libcurses/lib_data.c | |
parent | libform from ncurses 4.1. Post 4.1 patches to be applied in a separate commit. (diff) | |
download | wireguard-openbsd-010b00ebb3f4bdd576ec41ca1d5d0a8994e8fe5b.tar.xz wireguard-openbsd-010b00ebb3f4bdd576ec41ca1d5d0a8994e8fe5b.zip |
ncurses 4.1 + changes to work with our terminfo libs (instead of
the ncurses ones). Changes are #ifdef EXTERN_TERMINFO.
Post 4.1 patches will be applied in a separate commit.
Diffstat (limited to 'lib/libcurses/lib_data.c')
-rw-r--r-- | lib/libcurses/lib_data.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/lib/libcurses/lib_data.c b/lib/libcurses/lib_data.c index b3c962e3c16..c7d6c559590 100644 --- a/lib/libcurses/lib_data.c +++ b/lib/libcurses/lib_data.c @@ -26,13 +26,28 @@ ** */ -#include "curses.priv.h" +#include <curses.priv.h> -#include <stdlib.h> +MODULE_ID("Id: lib_data.c,v 1.8 1997/01/18 23:02:54 tom Exp $") WINDOW *stdscr, *curscr, *newscr; /* + * Linked-list of all windows, to support '_nc_resizeall()' and '_nc_freeall()' + */ +WINDOWLIST *_nc_windows; + +/* + * These data correspond to the state of the idcok() and idlok() functions. A + * caveat is in order here: the XSI and SVr4 documentation specify that these + * functions apply to the window which is given as an argument. However, + * ncurses implements this logic only for the newscr/curscr update process, + * _not_ per-window. + */ +bool _nc_idcok = TRUE; +bool _nc_idlok = FALSE; + +/* * The variable 'SP' will be defined as a function on systems that cannot link * data-only modules, since it is used in a lot of places within ncurses and we * cannot guarantee that any application will use any particular function. We @@ -52,7 +67,7 @@ SCREEN *_nc_screen(void) int _nc_alloc_screen(void) { - return ((my_screen = (SCREEN *) calloc(sizeof(*SP), 1)) != NULL); + return ((my_screen = typeCalloc(SCREEN, 1)) != 0); } void _nc_set_screen(SCREEN *sp) |