summaryrefslogtreecommitdiffstats
path: root/contrib/ncurses/ncurses
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-08-30 07:50:31 +0000
committerpeter <peter@FreeBSD.org>1999-08-30 07:50:31 +0000
commit3a5022bc64a1077e792397ea460a51b20aa52c36 (patch)
tree1fff2891299abf3dcb9e1109e41a385a284d1d46 /contrib/ncurses/ncurses
parent0f77396c37b1ea407890ab8991a2a1b45128a9dd (diff)
downloadFreeBSD-src-3a5022bc64a1077e792397ea460a51b20aa52c36.zip
FreeBSD-src-3a5022bc64a1077e792397ea460a51b20aa52c36.tar.gz
Tweaks for using natively under FreeBSD (with native termcap)
Diffstat (limited to 'contrib/ncurses/ncurses')
-rw-r--r--contrib/ncurses/ncurses/tinfo/comp_scan.c2
-rw-r--r--contrib/ncurses/ncurses/tinfo/lib_termcap.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/contrib/ncurses/ncurses/tinfo/comp_scan.c b/contrib/ncurses/ncurses/tinfo/comp_scan.c
index 1529308..39cf2cd 100644
--- a/contrib/ncurses/ncurses/tinfo/comp_scan.c
+++ b/contrib/ncurses/ncurses/tinfo/comp_scan.c
@@ -274,8 +274,10 @@ start_token:
if (desc) {
if (*desc == '\0')
_nc_warning("empty longname field");
+#ifndef FREEBSD_NATIVE
else if (strchr(desc, ' ') == (char *)NULL)
_nc_warning("older tic versions may treat the description field as an alias");
+#endif
}
if (!desc)
desc = buffer + strlen(buffer);
diff --git a/contrib/ncurses/ncurses/tinfo/lib_termcap.c b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
index 488b3c9..04d1b12 100644
--- a/contrib/ncurses/ncurses/tinfo/lib_termcap.c
+++ b/contrib/ncurses/ncurses/tinfo/lib_termcap.c
@@ -49,6 +49,10 @@ MODULE_ID("$Id: lib_termcap.c,v 1.28 1999/02/27 22:12:58 tom Exp $")
char *UP;
char *BC;
+#ifdef FREEBSD_NATIVE
+extern char _nc_termcap[]; /* buffer to copy out */
+#endif
+
/***************************************************************************
*
* tgetent(bufp, term)
@@ -95,6 +99,15 @@ int errcode;
#endif*/
}
+#ifdef FREEBSD_NATIVE
+ /*
+ * This is a REALLY UGLY hack. Basically, if we originate with
+ * a termcap source, try and copy it out.
+ */
+ if (bufp && _nc_termcap[0])
+ strncpy(bufp, _nc_termcap, 1024);
+#endif
+
returnCode(errcode);
}
OpenPOWER on IntegriCloud