aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo')
-rw-r--r--contrib/ncurses/ncurses/tinfo/init_keytry.c13
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_napms.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_options.c8
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termcap.c10
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_tputs.c18
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_ttyflags.c4
-rw-r--r--contrib/ncurses/ncurses/tinfo/make_keys.c5
7 files changed, 44 insertions, 18 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/init_keytry.c b/contrib/ncurses/ncurses/tinfo/init_keytry.c
index 77102e5dd197..a720da181e5e 100644
--- a/contrib/ncurses/ncurses/tinfo/init_keytry.c
+++ b/contrib/ncurses/ncurses/tinfo/init_keytry.c
@@ -32,7 +32,7 @@
/* cursor_visible,cursor_normal,cursor_invisible */
#include <tic.h> /* struct tinfo_fkeys */
-MODULE_ID("$Id: init_keytry.c,v 1.1 1999/02/18 22:39:11 tom Exp $")
+MODULE_ID("$Id: init_keytry.c,v 1.2 1999/09/11 17:32:57 Jeffrey.Honig Exp $")
/*
** _nc_init_keytry()
@@ -41,12 +41,23 @@ MODULE_ID("$Id: init_keytry.c,v 1.1 1999/02/18 22:39:11 tom Exp $")
**
*/
+#ifdef BROKEN_LINKER
+#undef _nc_tinfo_fkeys
+#endif
+
/* LINT_PREPRO
#if 0*/
#include <init_keytry.h>
/* LINT_PREPRO
#endif*/
+#ifdef BROKEN_LINKER
+struct tinfo_fkeys *_nc_tinfo_fkeysf(void)
+{
+ return _nc_tinfo_fkeys;
+}
+#endif
+
void _nc_init_keytry(void)
{
size_t n;
diff --git a/contrib/ncurses/ncurses/tinfo/lib_napms.c b/contrib/ncurses/ncurses/tinfo/lib_napms.c
index 6f786c2f092a..a85304bf1cb6 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_napms.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_napms.c
@@ -58,7 +58,7 @@
#endif
#endif
-MODULE_ID("$Id: lib_napms.c,v 1.5 1999/06/06 00:42:47 R.Lindsay.Todd Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.6 1999/10/21 23:01:41 tom Exp $")
int napms(int ms)
{
@@ -71,8 +71,6 @@ int napms(int ms)
ts.tv_nsec = (ms % 1000) * 1000000;
nanosleep(&ts, NULL);
}
-#elif HAVE_USLEEP
- usleep(1000*(unsigned)ms);
#elif USE_FUNC_POLL
{
struct pollfd fds[1];
diff --git a/contrib/ncurses/ncurses/tinfo/lib_options.c b/contrib/ncurses/ncurses/tinfo/lib_options.c
index 654e0edaa7aa..0bc14156d674 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_options.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_options.c
@@ -44,7 +44,7 @@
#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.35 1999/07/04 00:18:28 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.36 1999/10/22 21:38:57 tom Exp $")
int idlok(WINDOW *win, bool flag)
{
@@ -193,7 +193,7 @@ int cursor = SP->_cursor;
break;
}
SP->_cursor = vis;
- (void) fflush(SP->_ofp);
+ _nc_flush();
returnCode(cursor==-1 ? 1 : cursor);
}
@@ -244,13 +244,13 @@ int _nc_keypad(bool flag)
{
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 (flag && !SP->_tried) {
diff --git a/contrib/ncurses/ncurses/tinfo/lib_termcap.c b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
index 488b3c9a2c29..8238b368eea3 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_termcap.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
@@ -39,7 +39,7 @@
#define __INTERNAL_CAPS_VISIBLE
#include <term_entry.h>
-MODULE_ID("$Id: lib_termcap.c,v 1.28 1999/02/27 22:12:58 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.29 1999/09/05 01:06:43 tom Exp $")
/*
some of the code in here was contributed by:
@@ -162,7 +162,7 @@ int i;
*
***************************************************************************/
-char *tgetstr(NCURSES_CONST char *id, char **area GCC_UNUSED)
+char *tgetstr(NCURSES_CONST char *id, char **area)
{
int i;
@@ -175,6 +175,12 @@ int i;
if (!strncmp(id, capname, 2)) {
T(("found match : %s", _nc_visbuf(tp->Strings[i])));
/* setupterm forces cancelled strings to null */
+ if (area != 0
+ && *area != 0
+ && VALID_STRING(tp->Strings[i])) {
+ (void) strcpy(*area, tp->Strings[i]);
+ *area += strlen(*area) + 1;
+ }
returnPtr(tp->Strings[i]);
}
}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_tputs.c b/contrib/ncurses/ncurses/tinfo/lib_tputs.c
index 4ce176b77a44..d3fd46276e6e 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_tputs.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_tputs.c
@@ -46,9 +46,7 @@
#include <termcap.h> /* ospeed */
#include <tic.h>
-MODULE_ID("$Id: lib_tputs.c,v 1.39 1999/02/25 10:44:29 tom Exp $")
-
-#define OUTPUT ((SP != 0) ? SP->_ofp : stdout)
+MODULE_ID("$Id: lib_tputs.c,v 1.41 1999/10/22 23:31:24 tom Exp $")
char PC; /* used by termcap library */
speed_t ospeed; /* used by termcap library */
@@ -70,7 +68,7 @@ int delay_output(int ms)
for (_nc_nulls_sent += nullcount; nullcount > 0; nullcount--)
my_outch(PC);
if (my_outch == _nc_outch)
- (void) fflush(OUTPUT);
+ _nc_flush();
}
returnCode(OK);
@@ -82,7 +80,17 @@ int _nc_outch(int ch)
_nc_outchars++;
#endif /* TRACE */
- putc(ch, OUTPUT);
+ if (SP != 0
+ && SP->_cleanup) {
+ char tmp = ch;
+ /*
+ * POSIX says write() is safe in a signal handler, but the
+ * buffered I/O is not.
+ */
+ write(fileno(NC_OUTPUT), &tmp, 1);
+ } else {
+ putc(ch, NC_OUTPUT);
+ }
return OK;
}
diff --git a/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c b/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c
index 79397f466c5e..0e57c512b20f 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_ttyflags.c
@@ -38,7 +38,7 @@
#include <curses.priv.h>
#include <term.h> /* cur_term */
-MODULE_ID("$Id: lib_ttyflags.c,v 1.2 1999/07/24 22:36:12 tom Exp $")
+MODULE_ID("$Id: lib_ttyflags.c,v 1.3 1999/10/22 21:38:55 tom Exp $")
#undef tabs
@@ -133,7 +133,7 @@ int reset_shell_mode(void)
if (SP)
{
_nc_keypad(FALSE);
- fflush(SP->_ofp);
+ _nc_flush();
NC_BUFFERED(FALSE);
}
returnCode(_nc_set_tty_mode(&cur_term->Ottyb));
diff --git a/contrib/ncurses/ncurses/tinfo/make_keys.c b/contrib/ncurses/ncurses/tinfo/make_keys.c
index e62738503dcf..a1fd1d0b66f8 100644
--- a/contrib/ncurses/ncurses/tinfo/make_keys.c
+++ b/contrib/ncurses/ncurses/tinfo/make_keys.c
@@ -37,7 +37,7 @@
*/
#include <curses.priv.h>
-MODULE_ID("$Id: make_keys.c,v 1.6 1999/02/22 16:55:20 tom Exp $")
+MODULE_ID("$Id: make_keys.c,v 1.7 1999/09/11 17:32:57 Jeffrey.Honig Exp $")
#include <names.c>
@@ -103,6 +103,9 @@ int main(int argc, char *argv[])
"",
"/* This file was generated by MAKE_KEYS */",
"",
+ "#ifdef BROKEN_LINKER",
+ "static",
+ "#endif",
"struct tinfo_fkeys _nc_tinfo_fkeys[] = {",
0
};