[comp.sys.amiga] Curses would be a win

john13@garfield.UUCP (John Russell) (02/20/88)

I know this came up awhile ago, and there wasn't really a big response about
it (unless it was by e-mail). However it's only now that I've started using
curses, so I'll throw in my $0.02.

If I ever write something heavily text-based on the Amiga, curses or its
equivalent is a must. Even for the simplest application, when using the
graphic text functions I find myself re-inventing the wheel a lot... writing
code to emulate some function that's already there in the console handler.
And if I printf all my text, there's still no standardized way to do many
of the things I'd like. Sure there are a few compiler-specific routines
that look a little similar, but almost anything that uses text to a large
degree must have a lot of code written from scratch that has been written
from scratch by hundreds of other software authors.

This leads to visions of curses.library, so that if you are running 5
different textual applications you haven't got 5 seperate "update screen"
functions loaded in.

There's no reason why the text interface on the Amiga can't be as advanced
as its graphical one, which is where most efforts seem to be concentrated.
This is something of how I would do it:

- newwin (or equivalent routine, whatever the curses copyrights dictate)
opens up a CON: window which is _not_ resizable; the presence of a drag
bar is optional -- you might want to open 5 (simple refresh) text windows
in fixed positions on a custom screen. Do I misremember, or does conman have
the ability to specify system gadgets for CON: windows? Will CBM license
conman and replace the old console handler with it in 1.3/4 (hope hope hope)?

- all the good curses-style routines. I have a feeling that these can be
jazzed up quite a bit from "a letter over here, a letter over there" like
you get with unix. And of course underline, italic, bold, and cursor colour
functions.

- standard system calls to do things like "find address of CON: window" (can
conman do this for you?). Mixing in some graphics routines might be
interesting... and if a lot of people are doing it then including the Finkel/
Burns program as a syscall would be a win.

- the _win_st ("WINDOW") structure as defined in unix curses to be substantially
revised for optimal Amiga performance

I may in fact write up at least a skeleton of this idea, depending on whether
I try to go porting a lot of curses-based programs (I know that some of them
will translate better as graphics-oriented though).

John
(Sorry if this has been discussed recently but our newsfeed's been dead for
about the past month -- cold turkey! :-( )
-- 
"Fanaticism is all right... as long as you're ALONE! HAHAHAHA!"
		-- Pat Robertson shares a gem of wisdom told to him by Richard 
		   Nixon, and thus becomes the first politician to whom I can
		   honestly apply the term "scares the willies out of me"

jea@ur-cvsvax.UUCP (Joanne Albano) (02/23/88)

I think Dave Wecker has done this for the AMIGA when he ported
vc. You might start with his code. By the way does anyone have
working source to this port?

-- 
===================================================================
 Joanne Albano, Center for Visual Science     (716) 275-6848
 Room 256 Meliora Hall, Univ. of Rochester, Rochester NY 14627 
 UUCP: ur-cvsvax!jea@rochester.EDU ARPANET: UR-CVSVAX!JEA@ROCHESTER.ARPA