[comp.lang.c] Curses

al@uniblab.UUCP (allan krantz) (06/14/88)

  

   I'm trying to do some things with curses and so far 
   what I have looks a little funny.  I'm using 
   the curses with ZENIX 386 2.2.2.  
 
   I have two windows.  They are both the full width
   of the screen.  The lower window is four lines high
   and the upper window takes what ever is left.
   I want to display some text from a file in the upper window
   and be able to scroll one line at a time.  I have tried
   several things but always end up with the same result.
   The entire screen scrolls, the bottom window is pushed
   back down where it should be, and the new text line 
   shows up where it should be.  The unpleasent result is, 
   when the user hits the scroll key rapidly, the bottom
   window jiggles up and down.   

     If you can help me get things in one window to scroll
   without the other window moving, I would appreciate it.
   Please email any response.

     Thanks


       uunet!uniblab!pebbles!al

val@wsccs.UUCP (Val Kartchner) (12/23/88)

     Does anyone know a good reference for writing screen management
     packages?  I've looked at the description for "Advanded C Programming
     for Displays" (as advertized in the back of the second edition of K&R),
     but it's description is ambiguous.  Any help would be appreciated.

			Thanks in advance,
				-=:[ VAL ]:=-
-- 
----  /\  ----------------------------------------------------------------
     /\/\  .    /\     |  Val Kartchner  {UT@WSC}  |  'vi' must go, this
    /    \/ \/\/  \    |  #include <disclaimer.h>  |  is non-negotiable.
===/ U i n T e c h \===!ihnp4!utah-cs!utah-gr!uplherc!sp7040!obie!val=====  

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

In article <6896@june.cs.washington.edu> ka@june.cs.washington.edu (Kenneth Almquist) writes:
>Well, my memory is pretty fuzzy here, but I was under the impression that
>AT&T had nothing to do with the original development of the terminfo version
>of curses, although Mark Horton did a lot of work on it after AT&T picked
>up the code.  I recall that the code was copyrighted by Pavel Curtis (or
>some such person), and if it had been developed by AT&T then AT&T or Bell
>Labs would be the owner of the copyright.  Anyone know for sure?

Yes, I was peripherally involved with this.  The original termcap-based
curses was developed at Berkeley, and when Mark Horton took a job with
Bell Labs, he developed terminfo as an improved version of termcap, and
adapted curses to work with terminfo.  The current UNIX System V curses
evolved from that, and has been substantially reworked by several people.

Pavel Curtis, desiring to provide terminfo without AT&T licensing,
developed an independent implementation, working just from the specs.
Neither AT&T's nor Pavel's versions are based on the other's code.

shephemd@sage.cc.purdue.edu (CS442 Group 5) (10/06/90)

	I am having problems with the CURSES include file.  I can't
seem to get the curser to backspace when I use scanw.  I've
tried playing around with the tty functions for CURSES, but none 
of them seem to do anything.  Could someone help out who
is familiar with this please.

Thanks,
Mike

kmunn@engws7.ic.sunysb.edu (Kristofer A Munn) (12/15/90)

I have been working with the CURSES Window Manager on a HP-UX system here
at school for a few months now and have become quite fluent with it.  However,
I am disappointed at the limitations the package forces upon the programmer
in the area of text font styles.  The only styles available are normal and
reversed text (using the STANDOUT() || WSTANDOUT(window) functions).  Many
terminal types (ie VT100) can also display boldface, underlined and blinking
text... or mixtures thereof.  CURSES makes no use of these features however,
and I have often found myself wondering if it would be possible to add some
functions to my work which would enhance the standard library for certain
machines.

Has anyone looked into this possibility already?  Thanks...
-- 
Kristofer Munn ----- prisoner of the State University of New York at Stonybrook
Contact at kmunn@ic.sunysb.edu,   kmunn@ccvm.sunysb.edu,    kmunn@sbccvm.bitnet
-------------------------------------------------------------------------------
     I was trying to daydream, but my mind kept wandering. -Steven Wright

john@chinet.chi.il.us (John Mundt) (12/16/90)

In article <1990Dec14.190336.2691@sbcs.sunysb.edu> kmunn@engws7.ic.sunysb.edu (Kristofer A Munn) writes:
>I have been working with the CURSES Window Manager on a HP-UX system here
>at school for a few months now and have become quite fluent with it...
>I am disappointed at the limitations the package forces upon the programmer
>in the area of text font styles.  The only styles available are normal and
>reversed text (using the STANDOUT() || WSTANDOUT(window) functions). 

You might become a bit more fluent with it and try the attron() and
attroff() functions.  :-)

-- 
---------------------
john@admctr.chi.il.us
John Mundt   Teachers' Aide, Inc.  P.O. Box 1666,  Highland Park, IL
(708) 998-5007 || -432-8860 

bakke@plains.NoDak.edu (Jeffrey P. Bakke) (12/16/90)

In article <1990Dec15.220718.3434@chinet.chi.il.us> john@chinet.chi.il.us (John Mundt) writes:
> In article <1990Dec14.190336.2691@sbcs.sunysb.edu> kmunn@engws7.ic.sunysb.edu (Kristofer A Munn) writes:
> >I have been working with the CURSES Window Manager on a HP-UX system here
> >at school for a few months now and have become quite fluent with it...
> >I am disappointed at the limitations the package forces upon the programmer
> >in the area of text font styles.  The only styles available are normal and
> >reversed text (using the STANDOUT() || WSTANDOUT(window) functions). 
> 
> You might become a bit more fluent with it and try the attron() and
> attroff() functions.  :-)

And YOU might want to check what curses implementation that you run on
your system.  We run SunOS 4 and if you use the BSD 4.3 compliant
compiler, you do NOT have attron/attroff + a number of other useful
functions in the curse package.  You have to specificially use
the sysV compiler.  Actually quite a pain here since the recent OS
upgrade we installed has caused the sysV curses to core dump on
initialization.... bummer...


-- 
Jeffrey P. Bakke                      |   There are a finite number of
  INTERNET:   bakke@plains.NoDak.edu  |   jokes in the world...         
  UUCP    : ...!uunet!plains!bakke    |     The overflow began 
  BITNET  : bakke@plains.bitnet       |   decades ago. 
"I am not a number, I am a free man!" - The Prisoner

bo@bodedo.UUCP (Bo Sheffield) (05/12/91)

I have a '386 with SCO Xenix and need information on the curses package. The
only book I was able to find was the Nut Shell guide to curses (71 pages), I
learned a little bit, but still don't have all the information I need. I need
to be able to read in the escape sequences produced by keys like backtab. I
found the keypad function, but I can't seem to get it to work with backtab, it
works with the keys on the keypad and the function keys (except F12). I have
tried altering the terminfo file for ansi terminals but to no avail. I noticed
in the terminfo header file it has backtab defined (#define KEY_BTAB 0541) but
I can't get getch() to return that.  Does anyone have an information on curses
that they could reveal.

 Bo

ronald@robobar.co.uk (Ronald S H Khoo) (05/13/91)

bo@bodedo.UUCP (Bo Sheffield) writes:

> I noticed
> in the terminfo header file it has backtab defined (#define KEY_BTAB 0541) but
> I can't get getch() to return that.

You need to ensure that the key sequence returned by the bactab key is
defined in the terminfo entry.  For example, on the Xenix console,
backtab is <esc>[Z, so you need to

	a) extract the entry for "ansi" from /usr/lib/terminfo/terminfo.src
	b) add cbt=\E[Z, to it.
	c) recompile it with tic.

Oh, and of course, you need to be using terminfo cursesand not termcap curses.
-- 
Ronald Khoo <ronald@robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)