diff options
author | delphij <delphij@FreeBSD.org> | 2014-02-28 19:18:07 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-02-28 19:18:07 +0000 |
commit | 1034bfc077f138b51edf6a5eadcb8ee507386460 (patch) | |
tree | 7b2d708d03277cdd2560e9ce6572bdafc2e58bab /ncurses/base/key_defined.c | |
parent | 084d7341e201b5153031223070580cfac88a038a (diff) | |
download | FreeBSD-src-1034bfc077f138b51edf6a5eadcb8ee507386460.zip FreeBSD-src-1034bfc077f138b51edf6a5eadcb8ee507386460.tar.gz |
Redo import of ncurses 5.9 (stripped).
Diffstat (limited to 'ncurses/base/key_defined.c')
-rw-r--r-- | ncurses/base/key_defined.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ncurses/base/key_defined.c b/ncurses/base/key_defined.c index 759ad82..ef987a5 100644 --- a/ncurses/base/key_defined.c +++ b/ncurses/base/key_defined.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2003,2006 Free Software Foundation, Inc. * + * Copyright (c) 2003-2006,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 * @@ -32,7 +32,7 @@ #include <curses.priv.h> -MODULE_ID("$Id: key_defined.c,v 1.6 2006/12/30 23:22:55 tom Exp $") +MODULE_ID("$Id: key_defined.c,v 1.9 2009/10/24 22:15:47 tom Exp $") static int find_definition(TRIES * tree, const char *str) @@ -65,14 +65,22 @@ find_definition(TRIES * tree, const char *str) * Otherwise, return the keycode's value (neither OK/ERR). */ NCURSES_EXPORT(int) -key_defined(const char *str) +NCURSES_SP_NAME(key_defined) (NCURSES_SP_DCLx const char *str) { int code = ERR; - T((T_CALLED("key_defined(%s)"), _nc_visbuf(str))); - if (SP != 0 && str != 0) { - code = find_definition(SP->_keytry, str); + T((T_CALLED("key_defined(%p, %s)"), (void *) SP_PARM, _nc_visbuf(str))); + if (SP_PARM != 0 && str != 0) { + code = find_definition(SP_PARM->_keytry, str); } returnCode(code); } + +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(int) +key_defined(const char *str) +{ + return NCURSES_SP_NAME(key_defined) (CURRENT_SCREEN, str); +} +#endif |