Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 1999 01:12:35 +0100
From:      "Peter Edwards" <peter.edwards@ireland.com>
To:        current@freebsd.org
Subject:   tput(1) appears broken.
Message-ID:  <199908311711302@peter.edwards.ireland.com>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908311711302>