Marco van de Voort wrote:
(Rather OT, but ...)
Not really. Maybe there is something in the GPC code base that has the same problems ;-)
Our CRT unit has a few non-portable routines (which don't even have a curses interface), but AFAIK all of them are known and documented in the unit. In particular, they are Sound/NoSound, TextMode, GetShiftState. The former is quite unimportant IMHO (only there for BP compatibility), so is the second mostly (most people set their text mode via SVGATextMode or run in a GUI window, and don't want their usual programs to mess with the size.
So the only thing I really miss is GetShiftState which we do via ioctl on Linux and other means on DJGPP and MS-Windows. I wish there were escape sequences for it ... perhaps someone will implement them in the future ... ;-)
I don't think ncurses supports calling special functions to set the cursor shape, and there's another problem with those: They won't work across telnet/ssh etc. (because they would go to the remote system where they'd at best fail, rather than to the local system where the terminal is).
That wouldn't be a problem. The curs_set function returns -1 when not supported. So it could return a valid value on the console and -1 over telnet.
In theory perhaps. In practice I guess most programmers would just test it on their local system and not bother to check the return value ...
But thanks for the Linux links. I now know that that cursor stuff is not usually implemented, while I got the feeling of the man page for curs_set that it was normal.
If it documents an error code for "not supported", apparently it isn't supported everywhere. ;-)
P.s. I also had some strange problems with writing to the last character on the screen. I found an old PR for that, that seems to imply that it is a known bug since 1999 (sigh)
The issue in general is known for a long time, but most terminals have solutions for it (including the Linux console and xterms, so I've never had a problem with it; actually I'd be surprised if FreeBSD had a problem with it). What's PR, BTW?
Frank