tech-userlevel archive

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

Re: to bump or note to bump



In article <Yk1C+omSyd3qmC4E%internode.on.net@localhost>,
Brett Lymn  <blymn%internode.on.net@localhost> wrote:
>
>Folks,
>  
>This started out innocuously enough, I picked up a PR about fileobj from
>pkgsrc not working properly.  This was partially an upstream problem but
>also an issue with our curses chgat() function.  After a bit of digging 
>I found two things.  Firstly, every other colour capable implementation 
>of curses seems to use colour pair 0 as the default colour - our implementation 
>set the default pair to the last pair.  Secondly, without looking at our
>libcurses code and exploiting access to a static variable there is 
>simply no way of actually using the default colour pair in our libcurses.
>  
>Given these findings I embarked on changing the default colour pair 
>number to be 0.  This actually turned out to be a lot harder than it 
>first seems because the refresh code used a colour pair of 0 to mean 
>"don't apply colour at all" along with a bunch of initialisation issues 
>where the initial colour set wouldn't happen.  After a bit of rework I  
>have all the curses tests passing (some output is different now of 
>course) and using the updated code seems to work fine.  Certainly, the  
>original issue with fileobj is gone.
>  
>The reason I am putting this out here is that there are now some visual 
>differences, mainly with the colour of the background.  In some curses
>applications the assume_default_colors extension is used and the colours
>set to -1 (another curses extension that means "no colour").  Previously
>in NetBSD curses this had no effect, the terminal remained in white
>foreground and black background but now this request is honoured the
>terminal default colour scheme is used.
>
>So, the point of all this blather is even though there have been no
>interface changes as a result of my work there is the potential for a
>significant visual change.  Should I mark this with a libcurses major
>bump? I don't think it necessary but I am putting it out there for
>discussion...

1. Is there a way to have a "compatibility mode"? Or is that too complicated
   or unwanted?
2. Bumping the library version is probably not necessary because there
   is no ABI change, but I can see that perhaps changing how the programs
   look when the library is updated is unexpected and perhaps there is
   a benefit doing so.
3. I noticed that there is no version number in <curses.h>. Perhaps programs
   could use that to check the version and alter their behavior with respect
   to colors if it existed?

Best,

christos



Home | Main Index | Thread Index | Old Index