Re: new ncurses lib changed tgetstr() API
>> After the import of ncurses 5.0 (beta?), I noticed strange behavior of clear >> on my xterm. I tracked it down to an API change of tgetstr(), here is the >> new code: >> >> char *tgetstr(NCURSES_CONST char *id, char **area GCC_UNUSED) > >It is definitely bug on ncurses side and must be fixed *there* and not in >userland code. (Peter please back out corresponding tset fix too) >Many programs use area parameter. API change not allowed here. ncurses doesn't claim to document our old API of course. The area arg is not even mentioned in the man page. The new tgetstr() man page seems to be a significant downgrade, not even counting the regression from mandoc format. Bruce To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: new ncurses lib changed tgetstr() API
On Wed, Sep 01, 1999 at 09:52:10AM -0400, Luoqi Chen wrote: > After the import of ncurses 5.0 (beta?), I noticed strange behavior of clear > on my xterm. I tracked it down to an API change of tgetstr(), here is the > new code: > > char *tgetstr(NCURSES_CONST char *id, char **area GCC_UNUSED) It is definitely bug on ncurses side and must be fixed *there* and not in userland code. (Peter please back out corresponding tset fix too) Many programs use area parameter. API change not allowed here. -- Andrey A. Chernov http://nagual.pp.ru/~ache/ MTH/SH/HE S-- W-- N+ PEC>+ D A a++ C G>+ QH+(++) 666+>++ Y To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
new ncurses lib changed tgetstr() API
After the import of ncurses 5.0 (beta?), I noticed strange behavior of clear on my xterm. I tracked it down to an API change of tgetstr(), here is the new code: char *tgetstr(NCURSES_CONST char *id, char **area GCC_UNUSED) { int i; T((T_CALLED("tgetstr(%s,%p)"), id, area)); if (cur_term != 0) { TERMTYPE *tp = &(cur_term->type); for_each_string(i, tp) { const char *capname = ExtStrname(tp, i, strcodes); T(("trying %s", capname)); if (!strncmp(id, capname, 2)) { T(("found match : %s", _nc_visbuf(tp->Strings[i]))); /* setupterm forces cancelled strings to null */ returnPtr(tp->Strings[i]); } } } returnPtr(NULL); } and here is what termcap(3) says, char * tgetstr(const char *id, char **area) The tgetstr() function returns the string value of the capability id, places it in the buffer at area, and advances the area pointer. It decodes the abbreviations for this field described in termcap(5), except for cursor addressing and padding information. The tgetstr() function returns NULL if the capability was not found. The new code doesn't copy the cap string to the provided storage area, and programs like tset and tputs expect that. -lq To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message