From owner-freebsd-current Tue Aug 31 17:15:41 1999 Delivered-To: freebsd-current@freebsd.org Received: from mail33.prontomail.com (mail33.prontomail.com [209.185.149.133]) by hub.freebsd.org (Postfix) with ESMTP id 195CD14EB1 for ; Tue, 31 Aug 1999 17:15:38 -0700 (PDT) (envelope-from peter.edwards@ireland.com) Received: from peter.edwards (209.185.149.226) by mail33.prontomail.com (NPlex 2.0.123) for current@freebsd.org; Tue, 31 Aug 1999 17:09:08 -0700 From: "Peter Edwards" Message-Id: <199908311711302@peter.edwards.ireland.com> Date: Wed, 1 Sep 1999 01:12:35 +0100 X-Priority: Normal Content-Type: text/plain; charset=ISO-8859-1 To: current@freebsd.org Subject: tput(1) appears broken. X-Mailer: Web Based Pronto Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, (Sorry if this hits the list a couple of times, I had some problems with my mail system) I never thought I'd see "clear" break :-) Here's a fix. It seems to be down to an ncurses change in tgetstr(). The implementation in ncurses just ignores the "area" parameter, while the one in libtermcap is does something quite bizzare with it. tput.c relies on the old functionality. A better patch would probably be to the manpage, though. It doesn't even mention the "area" parameter, apart from in the synopsis. I wonder if "cls" ever broke on DOS? -- Peter. *** tput.c.orig Wed Sep 1 00:00:14 1999 --- tput.c Tue Aug 31 23:55:22 1999 *************** *** 64,70 **** extern char *optarg; extern int optind; int ch, exitval, n; ! char *cptr, *p, *term, buf[1024], tbuf[1024]; term = NULL; while ((ch = getopt(argc, argv, "T:")) != -1) --- 64,70 ---- extern char *optarg; extern int optind; int ch, exitval, n; ! char *cptr, *p, *term, *capstr, buf[1024], tbuf[1024]; term = NULL; while ((ch = getopt(argc, argv, "T:")) != -1) *************** *** 105,112 **** break; } cptr = buf; ! if (tgetstr(p, &cptr)) ! argv = process(p, buf, argv); else if ((n = tgetnum(p)) != -1) (void)printf("%d\n", n); else --- 105,112 ---- break; } cptr = buf; ! if (capstr = tgetstr(p, &cptr)) ! argv = process(p, capstr, argv); else if ((n = tgetnum(p)) != -1) (void)printf("%d\n", n); else _____________________________________ Get your free E-mail at http://www.ireland.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message