Which way is better in C ?

Roger Oberholtzer roger
Thu Jan 20 13:35:23 PST 2005


On Thu, 2005-01-20 at 15:26, Ben Duncan wrote:
> While true, ncurses has a lot going, it also leaves a lot to be desired.
> S-Lang has pretty much the same as ncurses, but has a lot of bases covered.
> 
> Example, ncurses leaves one with figuring out function key and special
> key sequences return codes. S-lang simply returns a common "code" for whatever
> function/special key is pressed REGARDLESS of the terminal type.

ncurses does this as well. It requires that they are defined in the
terminfo entry for that terminal, just like all the other definitions.
They are accessed via the KEY_F(num) C macro, where num is '1' ...
number of function keys.

> There are several ready to use wrapper functions ready to run out of the box
> in S-Lang and S-Lang comes with it's own nifty , powerful language.

ncurses also has a menu and window layer. It is called something like
slk. We did not use that. Only ncurses.

> SLrn, jed, most, lynx, dosemu, SLirc, Red Hat installer using newt,
> are all written using S-Lang and/or the S-Lang libraries.

When we did character-based stuff, we used curses. The, we moved to XVT,
which is a cross platform commercial product accessed from C or C++.
When we went to GUIs, we opted for tcl/tk, which we are happy with as we
use it as a C extension to our applications. I am not familiar with
S-Lang. 




More information about the Linux-users mailing list