From dc0449b1ae9dcdb2f36ab6f9d4a08b859ffd0817 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 15 Dec 2020 00:05:02 +0100 Subject: [PATCH] Added is_idcok() and is_idlok() --- curses.h | 2 ++ pdcurses/outopts.c | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/curses.h b/curses.h index a80f51b8..8f5a89c1 100644 --- a/curses.h +++ b/curses.h @@ -1286,6 +1286,8 @@ PDCEX int assume_default_colors(int, int); PDCEX const char *curses_version(void); PDCEX bool has_key(int); PDCEX bool is_cleared(const WINDOW *); +PDCEX bool is_idcok(const WINDOW *); +PDCEX bool is_idlok(const WINDOW *); PDCEX bool is_immedok(const WINDOW *); PDCEX bool is_keypad(const WINDOW *); PDCEX bool is_leaveok(const WINDOW *); diff --git a/pdcurses/outopts.c b/pdcurses/outopts.c index 1f50a8a4..a15a9768 100644 --- a/pdcurses/outopts.c +++ b/pdcurses/outopts.c @@ -21,6 +21,8 @@ outopts int raw_output(bool bf); bool is_cleared(const WINDOW *win); + bool is_idlok(const WINDOW *win); + bool is_idcok(const WINDOW *win); bool is_immedok(const WINDOW *win); bool is_leaveok(const WINDOW *win); bool is_scrollok(const WINDOW *win); @@ -46,7 +48,8 @@ outopts setscrreg() is the stdscr version. idlok() and idcok() do nothing in PDCurses, but are provided for - compatibility with other curses implementations. + compatibility with other curses implementations, likewise is_idlok() + and is_idcok(). raw_output() enables the output of raw characters using the standard *add* and *ins* curses functions (that is, it disables translation of @@ -68,6 +71,9 @@ outopts is_cleared(), is_immedok(), is_leaveok() and is_scrollok() are booleans and returns TRUE or FALSE. + is_idlok() and is_idcok() are provided for compatibility with other curses + implementations, i.e. they always returns FALSE. + ### Portability X/Open ncurses NetBSD clearok Y Y Y @@ -79,6 +85,8 @@ outopts wsetscrreg Y Y Y scrollok Y Y Y is_cleared - Y - + is_idlok - Y - + is_idcok - Y - is_immedok - Y - is_leaveok - Y Y is_scrollok - Y - @@ -189,6 +197,24 @@ bool is_cleared(const WINDOW *win) return win->_clear; } +bool is_idlok(const WINDOW *win) +{ + (void) win; + + PDC_LOG(("is_idlok() - called\n")); + + return FALSE; +} + +bool is_idcok(const WINDOW *win) +{ + (void) win; + + PDC_LOG(("is_idcok() - called\n")); + + return FALSE; +} + bool is_immedok(const WINDOW *win) { PDC_LOG(("is_immedok() - called\n"));