X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_has_cap.c;h=a501453f2f79d1423568d768c1746d97712ce823;hp=7121fc758f4f366498498c46d9d4d8bbbaac3549;hb=78e49873c69dc0494bb34c62f897f8b446584a33;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/ncurses/tinfo/lib_has_cap.c b/ncurses/tinfo/lib_has_cap.c index 7121fc75..a501453f 100644 --- a/ncurses/tinfo/lib_has_cap.c +++ b/ncurses/tinfo/lib_has_cap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2009 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 * @@ -29,9 +29,10 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-2003 * + * and: Juergen Pfeifer 2009 * ****************************************************************************/ - /* ** lib_has_cap.c ** @@ -43,21 +44,39 @@ #include -MODULE_ID("$Id: lib_has_cap.c,v 1.1 1998/10/23 15:32:21 tom Exp $") +MODULE_ID("$Id: lib_has_cap.c,v 1.5 2009/02/15 00:47:12 tom Exp $") + +NCURSES_EXPORT(bool) +NCURSES_SP_NAME(has_ic) (NCURSES_SP_DCL0) +{ + T((T_CALLED("has_ic()"))); + returnCode(cur_term && + (insert_character || parm_ich + || (enter_insert_mode && exit_insert_mode)) + && (delete_character || parm_dch)); +} + +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(bool) +has_ic(void) +{ + return NCURSES_SP_NAME(has_ic) (CURRENT_SCREEN); +} +#endif -bool has_ic(void) +NCURSES_EXPORT(bool) +NCURSES_SP_NAME(has_il) (NCURSES_SP_DCL0) { - T((T_CALLED("has_ic()"))); - returnCode(cur_term && - (insert_character || parm_ich - || (enter_insert_mode && exit_insert_mode)) - && (delete_character || parm_dch)); + T((T_CALLED("has_il()"))); + returnCode(cur_term + && (insert_line || parm_insert_line) + && (delete_line || parm_delete_line)); } -bool has_il(void) +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(bool) +has_il(void) { - T((T_CALLED("has_il()"))); - returnCode(cur_term - && (insert_line || parm_insert_line) - && (delete_line || parm_delete_line)); + return NCURSES_SP_NAME(has_il) (CURRENT_SCREEN); } +#endif