NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/53653: Curses doesn't always show line drawing characters correctly on wsvt25



The following reply was made to PR lib/53653; it has been noted by GNATS.

From: Julian Coleman <jdc%coris.org.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost, uwe%NetBSD.org@localhost
Subject: Re: lib/53653: Curses doesn't always show line drawing characters
 correctly on wsvt25
Date: Wed, 10 Oct 2018 21:45:53 +0200

 Hi,
 
 Looking at the output with tracing on, I see for the vt220 case:
 
   1539197247.063514: does_ctrl_o: Testing ^[[m^[(B for ^[(B$<4>
 
 when we check to see if turning off all attributes also turns off ACS.
 However, the terminfo entry for vt220 doesn't contain any delay for sgr0,
 whilst it does for rmacs:
 
   rmacs=\E(B$<4>, sgr0=\E[m\E(B
 
 so we think that sending sgr0 (i.e. when unsetting bold) didn't unset ACS
 mode, and thus we don't set ACS mode again.
 
 This might be a bug in the terminfo entry and it should really have a delay
 in both.  However, stripping the trailing delay from the end of rmacs when
 we check is probably a more sensible solution, so the appended patch does
 that.
 
 Regards,
 
 Julian
 
  - - - - - 8< - - - - - - - - - - - - - - - - - - - - - - - - - 8< - - - - - -
 --- src/lib/libcurses/setterm.c.orig	2018-10-10 20:24:25.000000000 +0100
 +++ src/lib/libcurses/setterm.c	2018-10-10 20:37:54.000000000 +0100
 @@ -348,8 +348,12 @@
  does_ctrl_o(const char *exit_cap, const char *acs_cap)
  {
  	const char *eptr = exit_cap, *aptr = acs_cap;
 +	char *dptr;
  	int l;
  
 +	dptr = strstr(aptr, "$<");
 +	if (dptr != NULL && dptr > aptr)
 +		*dptr = '\0';
  #ifdef DEBUG
  	__CTRACE(__CTRACE_INIT, "does_ctrl_o: Testing %s for %s\n", eptr, aptr);
  #endif
  - - - - - 8< - - - - - - - - - - - - - - - - - - - - - - - - - 8< - - - - - -
 


Home | Main Index | Thread Index | Old Index