[comp.unix.questions] Curses manual, example?

jc@minya.UUCP (John Chambers) (06/06/89)

Two questions today, folks.  First, does there exist a good
intro/manual for the curses/termcap/terminfo package?  I have
several sets of Unix manuals here, and none of them seem to
have any curses documentation at all.  They have very brief
descriptions of the termcap/terminfo databases, though not
nearly enough to tell one how to create an entry.

I've learned enough from others' examples to have a general
idea of the use of things like clear(), mvaddstr(), refresh()
and a few other functions.  Now I have some applications where
I'd really like to use them, and it'd sure be nice to have a
good, precise manual.

If such is not available (or even if it is), another thing
that would be interesting is to find a sample or three of
a program that acts like I want mine to act.  The basic idea
is a program that produces a set of menus, with a mixture 
of text and fill-in-the-blank fields.  The user would be able
to type stuff in these fields (probably filled with underscores),
and the program would do something useful with the data.  The
Sun 'setup' program is a real good example of what I want, and  
there are a few others around.

Does anyone have routines around that act like this?  I could
start developing them myself, by putting the keyboard in raw
mode and trying to decipher what is typed, keeping track of 
where the cursor is, updating the screen, etc.  But if someone
else already has a package and would like to show off their
expertise, it could save some time.

It'd also be interesting to see others' ideas as to what a good
programmer's interface for such a package might be.  What's a
good way to store a menu in a file?  How should the data fields
be represented?  Is it worthwhile to indicate something about
type (numeric, alpha, etc.)?  If so, what's a good notation if
there are non-hacker users editing the menus?  How (if at all)
would one best associate a data field with adjacent text?

Is there another newsgroup where I'd be likely to get a good
answer to such questions?

Bye for now.


-- 
--
All opinions Copyright 1989 by John Chambers; for licensing information contact:
	John Chambers <{adelie,ima,mit-eddie}!minya!{jc,root}> (617/484-6393)

jiii@visdc.UUCP (John E Van Deusen III) (06/09/89)

In article <11@minya.UUCP> jc@minya.UUCP (John Chambers) writes:
>
> ...does there exist a good intro/manual for the
> curses/termcap/terminfo package?

A good discussion of curses and a lot of other things is contained in
the UNIX Xystem V Programmer's Guide, Prentice Hall, 1987, $34.95,
ISBN 0-13-940438-4.

Curses is relatively new to SysV, so it is not available on older
SysV machines.  Curses/terminfo is not completely compatible with the
BSD Curses package either.  I believe that curses/terminfo works all
right, but older versions of curses/termcap are said to be buggy.
Curses may not be aid to portability that you might hope.
--
John E Van Deusen III, PO Box 9283, Boise, ID  83707, (208) 343-1865

uunet!visdc!jiii

gwyn@smoke.BRL.MIL (Doug Gwyn) (06/09/89)

In article <11@minya.UUCP> jc@minya.UUCP (John Chambers) writes:
>Two questions today, folks.  First, does there exist a good
>intro/manual for the curses/termcap/terminfo package?  I have
>several sets of Unix manuals here, and none of them seem to
>have any curses documentation at all.

It's certainly in the SVR3 Programmer's Guide.

>They have very brief descriptions of the termcap/terminfo
>databases, though not nearly enough to tell one how to create
>an entry.

I think both the 4.3BSD and SVR3 terminfo/termcap manual entries,
which can hardly be described as "brief", contain sufficient
information.  If you have suggestions for improvement please mail
it to me for inclusion in a future revision.

ilan343@violet.berkeley.edu (06/09/89)

In article <11@minya.UUCP> jc@minya.UUCP (John Chambers) writes:
>Two questions today, folks.  First, does there exist a good
>intro/manual for the curses/termcap/terminfo package? 

There are two Nutshell Handbook by John Strang, "Programming with
Curses" and "Termcap & Terminfo".
(Published by O'Reilley & Associates, Inc., you can order by phone
1-800-338-NUTS)
I have the one on Curses. It makes things a little bit easier than
depending on AT&T's manuals and tutorials, it has many more examples
for one thing.

On the same subject. I have seen an add for a curses toolkit,
"Formation" published by Aspen Scientific.
It promises overlapping windowns and pull-down menus, all ready to use.
Does anyone have hands on experience with this package?

tim@ora.UUCP (Tim O'Reilly) (06/11/89)

In article <25365@agate.BERKELEY.EDU>, ilan343@violet.berkeley.edu writes:
> In article <11@minya.UUCP> jc@minya.UUCP (John Chambers) writes:
> >Two questions today, folks.  First, does there exist a good
> >intro/manual for the curses/termcap/terminfo package? 
> 
> There are two Nutshell Handbooks by John Strang, "Programming with
> Curses" and "Termcap & Terminfo".
> (Published by O'Reilly & Associates, Inc., you can order by phone
> 1-800-338-NUTS)

This 800 number is right, but since I've had a couple of
complaints from Europeans about 800 numbers being useless to
them, I thought I should add the regular phone number and
address.

Our order-entry group has moved to California.  The new
address is:
  
     O'Reilly & Associates, Inc.
     632 Petaluma Avenue
     Sebastopol, CA 95472
     707-829-0515

-- 
Tim O'Reilly (617) 354-5800 or (800) 338-NUTS
O'Reilly & Associates, Inc., Publishers of Nutshell Handbooks
90 Sherman Street, Cambridge, MA 02140
UUCP:	uunet!ora!tim      ARPA:   tim@ora.uu.net