NetBSD PR lib/23910 was filed over 16 years ago. It describes how NetBSD curses fails to work with Vifm, a Vim interface for a curses GUI file manager. It’s quite a nice idea after playing around with it some as Vim is my favourite text editor.
Since I was the main protagonist in bringing terminfo to NetBSD, I had a reasonable grasp on how our curses worked and I had looked at this bug before, but left scratching my head over it.
POSIX mandates implementations must support upto a short but may exceed it. When NetBSD terminfo was implemented, no terminfo description used over a short, but because ncurses has supported ints for some time, some now do.
Infact, such a terminfo description was imported where colour pairs for screen-256color went up to 65536 which exposed a bug in the existing implementation where it was set to zero. Because the number might mean something more than a range, we need to be able to store it accurately.
I implemented ripoffline(3) in NetBSD and it shipped in-8. It now transpires there were a few problems with the implementation, mainly in regards to screen resizing, which is an extension to POSIX, but supported by ncurses and PDCurses.
Many improvements have been made with regards to compability with NetBSD and the others, but there are the following caveats:
NetBSD will only resize stdscr, curscr and virtscr windows (like PDCurses) NetBSD clears the window when resized NetBSD will re-size and re-position the ripped off lines (like ncurses) NetBSD will not change LINES when ripoffline is called and may offset stdscr to it’s relative position on the screen.
So finally I’ve moved all services from my old server to my Christmas Xen box! This was not without problems due to the fact it had to run NetBSD-current
gcc toolchain is broken for some packages which affected running any PHP build clang toolchain was broken for my config (USE_SSP= yes and CPUFLAGS+=-march=core2) clang compiles as a whole were broken due to a recent efiboot import In hind-sight, I could have had the box up and running a lot sooner if I used NetBSD-7 guests (or maybe just a NetBSD-7 build box), but no, I just had to get-current running.
After starting the year with curses work, I decided to do some more!
Currently we lack Soft Label Key functions as specified by POSIX. What are these? Glad you asked! Soft Label Keys ripoff a line from the bottom of the screen and allow for up to 8 keys to be displayed there. You can define labels for them, colours, etc.
“BIG WHOOP!" I hear you say. “My app already does this, why should I care?