bug-ncurses
[Top][All Lists]
Advanced

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

Re: [bug-ncurses] How to use `rep' in xterm since ncurses-6.0-20170729


From: Dr. Werner Fink
Subject: Re: [bug-ncurses] How to use `rep' in xterm since ncurses-6.0-20170729
Date: Wed, 20 Sep 2017 09:13:33 +0200
User-agent: NeoMutt/20170609 (1.8.3)

On Tue, Sep 19, 2017 at 04:30:03PM -0400, Thomas Dickey wrote:
> On Tue, Sep 19, 2017 at 06:28:50PM +0200, Dr. Werner Fink wrote:
> > On Tue, Sep 19, 2017 at 06:23:16PM +0200, Dr. Werner Fink wrote:
> > > Hi
> > > 
> > > just as subject says and some of ncurses based applications show strange
> > > output instead of lines in XTerm  I'd like to ask how to test this with
> > > e.g.  tput?
> > > 
> > 
> > Just tried this
> > 
> >   tput -S <<!
> >   > smacs
> >   > rep - 20
> 
> First, you should update to 20170827:
> 
> http://lists.gnu.org/archive/html/bug-ncurses/2017-08/msg00046.html
> 
> Next:
> 
> tput has to look at the parameters and decide whether they are strings
> or numbers.  It has a table to help it assume that certain parameters
> are strings.  But a character isn't a string - it fits in better as
> a number than as a special case of a string.
> 
> The problem is the "-", which isn't handled by tput.  I noticed this and
> made a note about a couple of similar cases:
> 
>       define_char     defc  ZE Define a character #1, #2 dots wide, descender 
> #3
>       display_pc_char dispc S1 Display PC character #1
> 
> and started to implement another special case for tput's table, but saw
> that I was out of time, and put that aside.  Coming back to it, I
> decided that the way to work with tput would be to pass the character
> value, e.g.,
> 
>       rep 45 20
> 
> The change that I made at the end of July happened to work for the case
> that was reported, but at the end of August, a followup pointed out that
> it broke the more general case:
> 
> http://lists.gnu.org/archive/html/bug-ncurses/2017-08/threads.html#00039
> 
> The current code seems okay now.
> 
> As an aside: ncurses won't try to repeat non-ASCII codes, because the
> existing logic for UTF-8 vs ASCII line-drawing in ncurses would have to
> be integrated with the "rep" (and if you read through PutAttrChar, you'll
> see why I didn't do it yet).

Taken ... I see that `tput rep' only work with the ASCII value of the VT100
name of the glphys but not with the ASCII sign like `-' or the VT100 name
its self like `p'

  for glpyh in 112 113 114 115; do
  tput -S <<-!
  smacs
  rep $glpyh 20
  rmacs
  !
  done

works but using `p q r s' does lead to error signs in XTerm

Werner

-- 
  "Having a smoking section in a restaurant is like having
          a peeing section in a swimming pool." -- Edward Burr

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]