Which way is better in C ?

Bill Campbell linux-sxs
Thu Jan 20 14:11:10 PST 2005


On Thu, Jan 20, 2005, Roger Oberholtzer wrote:
>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. 

``Character-based stuff'' is still far superior to GUIs for heads-down data
entry work where one doesn't want to have to manipulate mice, or anything
else that requires moving fingers from the home keys or numeric keypad.
Even curses based widget sets can be less efficient than programs that
handle the keyboard directly through curses.

Bill
--
INTERNET:   bill at Celestial.COM  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``There is nothing as stupid as an educated man if you get him off the
thing he was educated in.''
    Will Rogers


More information about the Linux-users mailing list