aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tinfo/lib_termcap.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-01-26 16:43:25 +0000
commit1759abf3ae1a38b7578df7996346544b66e508ad (patch)
tree506da7a5cf693bf8780ad013837cbd67913bedbb /contrib/ncurses/ncurses/tinfo/lib_termcap.c
parent0e3d540892016a47f6a68ec9ba2879d35ce5f7c2 (diff)
downloadsrc-1759abf3ae1a38b7578df7996346544b66e508ad.tar.gz
src-1759abf3ae1a38b7578df7996346544b66e508ad.zip
Import ncurses-5.0-release to update the 5.0-prerelease that we had.vendor/ncurses/5.0
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=56639 svn path=/vendor/ncurses/5.0/; revision=56641; tag=vendor/ncurses/5.0
Diffstat (limited to 'contrib/ncurses/ncurses/tinfo/lib_termcap.c')
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termcap.c10
1 files changed, 8 insertions, 2 deletions
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]);
}
}