X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_has_cap.c;h=cbf68b3165082e604aa594149c57e86aeee06dd6;hp=f5af76cff08c2e2d629e05bfff18b7a63c7b30ef;hb=3934889cc6b0f45cf218c88df7f35634d250c9e5;hpb=404cc3f5b0751dd219565139f825c5a4d445f651 diff --git a/ncurses/tinfo/lib_has_cap.c b/ncurses/tinfo/lib_has_cap.c index f5af76cf..cbf68b31 100644 --- a/ncurses/tinfo/lib_has_cap.c +++ b/ncurses/tinfo/lib_has_cap.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2003,2009 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2009,2013 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 * @@ -46,16 +47,16 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_has_cap.c,v 1.8 2009/05/10 00:53:52 tom Exp $") +MODULE_ID("$Id: lib_has_cap.c,v 1.11 2020/02/02 23:34:34 tom Exp $") NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0) { bool code = FALSE; - T((T_CALLED("has_ic(%p)"), SP_PARM)); + T((T_CALLED("has_ic(%p)"), (void *) SP_PARM)); - if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) { + if (HasTInfoTerminal(SP_PARM)) { code = ((insert_character || parm_ich || (enter_insert_mode && exit_insert_mode)) && (delete_character || parm_dch)) ? TRUE : FALSE; @@ -76,8 +77,8 @@ NCURSES_EXPORT(bool) NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0) { bool code = FALSE; - T((T_CALLED("has_il(%p)"), SP_PARM)); - if (IsValidTIScreen(SP_PARM) && IsTermInfo(SP_PARM)) { + T((T_CALLED("has_il(%p)"), (void *) SP_PARM)); + if (HasTInfoTerminal(SP_PARM)) { code = ((insert_line || parm_insert_line) && (delete_line || parm_delete_line)) ? TRUE : FALSE; }