/****************************************************************************
- * Copyright (c) 2017 Free Software Foundation, Inc. *
+ * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 2017 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 *
****************************************************************************/
/*
- * $Id: sp_tinfo.c,v 1.21 2017/06/17 21:19:25 tom Exp $
+ * $Id: sp_tinfo.c,v 1.23 2020/02/02 23:34:34 tom Exp $
*
* TOTO: add option for non-sp-funcs interface
*/
static void
do_stuff(MYDATA * data)
{
- char *s;
SCREEN *sp = data->sp;
+#if NCURSES_EXT_FUNCS
+ char *s;
int my_code = 1234;
const char *my_text = "\033[?m";
+#endif
set_curterm_sp(sp, data->term);
show_string(data, "unctrl", unctrl_sp(sp, 033));
fflush(data->fp);
+#if NCURSES_EXT_FUNCS
define_key_sp(sp, my_text, my_code);
has_key_sp(sp, 0);
key_defined_sp(sp, my_text);
if ((s = keybound_sp(sp, my_code, 0)) != 0)
free(s);
+#endif
keyname_sp(sp, '?');
+#if NCURSES_EXT_FUNCS
keyok_sp(sp, my_code, FALSE);
keyok_sp(sp, my_code, TRUE);
+#endif
savetty_sp(sp);
/*
* These functions are low-level settings for ncurses.
*/
+#if NCURSES_EXT_FUNCS
set_tabsize_sp(sp, 5); /* waddch */
+#endif
typeahead_sp(sp, FALSE); /* waddch */
use_env_sp(sp, FALSE); /* newterm */
use_tioctl_sp(sp, FALSE); /* newterm */