Marco van de Voort wrote:
So that it is difficult to create one universal Linux port running everywhere.
I don't have problem so much, since FPC links the default runtime statically.
So does GPC by default. But GPC itself is dynamically linked by default (though it's easy to build a static one, just add `-static' to CFLAGS when building), and there might be problems because of the differing directory structure between Linux distributions.
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 ...)
Yes, usually the terminfo entries should be set (I don't know if ncurses ever uses termcap; terminfo is the newer concept). 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.
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).
Frank