aboutsummaryrefslogtreecommitdiff
path: root/ncurses/tinfo/init_keytry.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
committerXin LI <delphij@FreeBSD.org>2014-02-28 19:12:44 +0000
commit4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a (patch)
treeb8f6e12b479a78216f3bffb8e1258d54087268de /ncurses/tinfo/init_keytry.c
parente07762606a5bf651a501cb095c98cba90e4a8fe2 (diff)
downloadsrc-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.tar.gz
src-4b819fa20a8d007a10f2d3e8d6a5dedf7f18fc9a.zip
Undo two previous imports which was never done in preparation of doing a
new import.
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262616
Diffstat (limited to 'ncurses/tinfo/init_keytry.c')
-rw-r--r--ncurses/tinfo/init_keytry.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/ncurses/tinfo/init_keytry.c b/ncurses/tinfo/init_keytry.c
index ea47b382b493..2f6fe4f6fad7 100644
--- a/ncurses/tinfo/init_keytry.c
+++ b/ncurses/tinfo/init_keytry.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2006,2008 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 *
@@ -27,9 +27,16 @@
****************************************************************************/
#include <curses.priv.h>
+
+#include <term.h>
+/* keypad_xmit, keypad_local, meta_on, meta_off */
+/* cursor_visible,cursor_normal,cursor_invisible */
+
#include <tic.h> /* struct tinfo_fkeys */
-MODULE_ID("$Id: init_keytry.c,v 1.17 2010/04/24 22:29:56 tom Exp $")
+#include <term_entry.h>
+
+MODULE_ID("$Id: init_keytry.c,v 1.12 2008/05/24 21:44:51 tom Exp $")
/*
** _nc_init_keytry()
@@ -43,7 +50,7 @@ MODULE_ID("$Id: init_keytry.c,v 1.17 2010/04/24 22:29:56 tom Exp $")
* than cur_term.
*/
#undef CUR
-#define CUR SP_TERMTYPE
+#define CUR (sp->_term)->type.
#if BROKEN_LINKER
#undef _nc_tinfo_fkeys
@@ -66,7 +73,7 @@ _nc_tinfo_fkeysf(void)
NCURSES_EXPORT(void)
_nc_init_keytry(SCREEN *sp)
{
- unsigned n;
+ size_t n;
/* The sp->_keytry value is initialized in newterm(), where the sp
* structure is created, because we can not tell where keypad() or
@@ -90,13 +97,12 @@ _nc_init_keytry(SCREEN *sp)
{
TERMTYPE *tp = &(sp->_term->type);
for (n = STRCOUNT; n < NUM_STRINGS(tp); ++n) {
- const char *name = ExtStrname(tp, (int) n, strnames);
+ const char *name = ExtStrname(tp, n, strnames);
char *value = tp->Strings[n];
if (name != 0
&& *name == 'k'
&& value != 0
- && NCURSES_SP_NAME(key_defined) (NCURSES_SP_ARGx
- value) == 0) {
+ && key_defined(value) == 0) {
(void) _nc_add_to_try(&(sp->_keytry),
value,
n - STRCOUNT + KEY_MAX);