From c8b9c85ee5bb57d4c11afdc2e3f3109ba32a8846 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 30 Aug 1999 07:50:31 +0000 Subject: Tweaks for using natively under FreeBSD (with native termcap) --- contrib/ncurses/ncurses/tinfo/comp_scan.c | 2 ++ contrib/ncurses/ncurses/tinfo/lib_termcap.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/contrib/ncurses/ncurses/tinfo/comp_scan.c b/contrib/ncurses/ncurses/tinfo/comp_scan.c index 152930885ab7..39cf2cd9f949 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 488b3c9a2c29..04d1b1201cd2 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); } -- cgit v1.3