#include <term.h> /* keypad_xmit, keypad_local, meta_on, meta_off */
/* cursor_visible,cursor_normal,cursor_invisible */
-MODULE_ID("$Id: lib_options.c,v 1.29 1998/02/11 12:13:55 tom Exp $")
-
-int has_ic(void)
-{
- T((T_CALLED("has_ic()")));
- returnCode((insert_character || parm_ich
- || (enter_insert_mode && exit_insert_mode))
- && (delete_character || parm_dch));
-}
-
-int has_il(void)
-{
- T((T_CALLED("has_il()")));
- returnCode((insert_line || parm_insert_line)
- && (delete_line || parm_delete_line));
-}
+MODULE_ID("$Id: lib_options.c,v 1.36 1999/10/22 21:38:57 tom Exp $")
int idlok(WINDOW *win, bool flag)
{
returnCode(ERR);
}
-int wtimeout(WINDOW *win, int delay)
+void wtimeout(WINDOW *win, int delay)
{
T((T_CALLED("wtimeout(%p,%d)"), win, delay));
if (win) {
win->_delay = delay;
- returnCode(OK);
}
- else
- returnCode(ERR);
}
int keypad(WINDOW *win, bool flag)
break;
}
SP->_cursor = vis;
- (void) fflush(SP->_ofp);
+ _nc_flush();
returnCode(cursor==-1 ? 1 : cursor);
}
**
*/
-
+#ifdef NCURSES_EXT_FUNCS
static int has_key_internal(int keycode, struct tries *tp)
{
if (tp == 0)
T((T_CALLED("has_key(%d)"), keycode));
returnCode(has_key_internal(keycode, SP->_keytry));
}
-
-/*
-** init_keytry()
-**
-** Construct the try for the current terminal's keypad keys.
-**
-*/
-
-static void init_keytry(void)
-{
-/* LINT_PREPRO
-#if 0*/
-#include <keys.tries>
-/* LINT_PREPRO
-#endif*/
- 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
- * mouse_activate() (which will call keyok()) are first called.
- */
-
- for (n = 0; n < SIZEOF(table); n++)
- if (table[n].offset < STRCOUNT)
- _nc_add_to_try(&(SP->_keytry),
- CUR Strings[table[n].offset],
- table[n].code);
-}
+#endif /* NCURSES_EXT_FUNCS */
/* Turn the keypad on/off
*
{
TPUTS_TRACE("keypad_xmit");
putp(keypad_xmit);
- (void) fflush(SP->_ofp);
+ _nc_flush();
}
else if (! flag && keypad_local)
{
TPUTS_TRACE("keypad_local");
putp(keypad_local);
- (void) fflush(SP->_ofp);
+ _nc_flush();
}
- if (!SP->_tried) {
- init_keytry();
+ if (flag && !SP->_tried) {
+ _nc_init_keytry();
SP->_tried = TRUE;
}
return(OK);