Marco van de Voort wrote:
This was more a FreeBSD issue than a GPC issue. The FPC ide behaved odd on FreeBSD, it turned out that the cursor_normal, cursor_visible and cursor_invisible termcap entries seem to be empty.
Since ncurses also seems to use those (for curs_set) I'm wondering how to control the cursor shape if I'm running on the console. consio.h contains a call to switch between block or normal cursor only, and fbio.h only is valid for framebuffer devices.
But I'm a bit new to ncurses (made only commandline programs before). so it could be something I overlooked.
(Rather OT, but ...)
Not really. Maybe there is something in the GPC code base that has the same problems ;-)
Yes, usually the terminfo entries should be set (I don't know if ncurses ever uses termcap; terminfo is the newer concept).
My fault, terminfo it is. Confused them after reading too many manpages in quick succession.
Linux didn't support escape sequences to set the cursor shape until kernel 2.2 (see /usr/src/linux/Documentation/VGA-softcursor.txt), and after 2.2 came out, I added them to the Linux terminfo, so curs_set now works there. Don't know if FreeBSD supports those sequences.
No it doesn't. Those sequences all over the screen were the reason I found out about this problem :-)
I tried to find IOCTLs that do the same thing, but they only seem to exist for the framebuffer modi, not for plain text.
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.
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.
I already posted to some FreeBSD groups, if I find out something interesting, I'll drop a note.
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)