delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/20/23:20:47

From: hgfernan AT usp DOT br (Hilton Fernandes)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: XBase tools and DJGPP curses libs
Date: 21 Dec 1998 03:55:05 GMT
Organization: Your Organization
Lines: 82
Message-ID: <75kgqp$fei3@serv1.uspnet.usp.br>
References: <74smgj$dnf1 AT serv1 DOT uspnet DOT usp DOT br> <slrn774eog DOT oj DOT davecook AT sputnik DOT escnd1 DOT sdca DOT home DOT com> <slrn77cdb1 DOT ok DOT davecook AT rama DOT escnd1 DOT sdca DOT home DOT com>
NNTP-Posting-Host: tty4.twister.uspnet.usp.br
Mime-Version: 1.0
X-Newsreader: WinVN 0.99.9 (Released Version) (x86 32bit)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks for everyone that answered my quest for Curses experience with
DJGPP and Linux.  I'd like to summarize what i read and what i 
decided about this to the newsgroup.

As Boon van der RJ <rjvdboon AT cs DOT vu DOT nl> commented, the curses for 
DJGPP is PDCurses 2.3, available at 

	ftp://ftp.lightlink.com/pub/hessling/PDCurses/

(Version 2.2 is provided in DJGPP package.) PDCurses is a public domain 
-- not GPL --, port of curses to MS-DOS, Win32 and X11.  The use of curses 
looks like a good way of writing portable apps that do character-based 
screen management.  That means one can use better user interfaces than 
the ones provided by getch(), puts(). :-)  

Linux implementation of curses, called NCurses was not ported to 
DJGPP.

Dave Cook <davecook AT home DOT com> suggests the use of S-Lang, or
slang, instead of curses.  He comments that slang has less features
than curses, but can be easier to port.  It is based at

	http://space.mit.edu/~davis/slang.html

I took a look at it and it is very interesting: you can write your 
screen management apps in an interpreted macro language that looks a lot 
like C!  And it was ported to Unix/Linux, MS-DOS, VMS and OS/2!!!

Canonical apps developed with slang are jed (a text editor) and slrn
(a variant of the Unix newsreader called rn).  

A more recently developed app using slang is mc, GNU's Midnight
Commander, a file manager for Unix, ported to DJGPP by bowman
<bowman AT montana DOT com>.  He comments that some widgets, what MS-Win 
people call controls, can be found in mc's code, in GNOME's site, at

	http://www.gnome.org

Dave Cook <davecook AT home DOT com> also suggested a site called Curses 
Development Kit (CDK), at

	http://www.datasoft.on.ca/~cdk/

I've taken a look at it and it looks very nice: the library creates
widgets / controls using a modular approach like the one used with
the FILE structure and fopen(), fclose() etc.  That is: a
centralized structure that is not accessed directly, but through
specific functions.

It is easy to see that this is practically (and theoretically :-))
object-oriented: to make it canonically object oriented, all you got
to do is to create an object that holds the structure as a private
member, and include member-functions that call the specific
functions.

That makes me decide for curses/PDcurses, instead of S-Lang.  slang
seems to be the wave of the future for character-based interfaces,
but i could find more documentation, samples and libraries still
using curses.  If i keep developing character-based apps, i'll
certainly try slang, that looks very interesting. 

I'm considering to use the screen management library in a practical
training project (mentoring?) that will help people develop an app
in DJGPP, using an OO design, and then port it to Linux.  So, having 
OO libraries is a nice thing.

However, in order to fully accomplish this project, i'll have to make 
CDK use PD Curses as well as it uses Linux NCurses.  

It doesn't look impossible: i was able to make and run some PDCurses
samples without any effort.  Without the same results, i must admit. 
:-)  However, if it is impossible to make the two become like one, 
i'll have to resort to slang.  Not bad alternatives, anyway.

I hope those daydreaming thoughts may be of any help to somebody.


Best regards,
--Hilton



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019