Curses information

Curses information

Post by Shawn J. Walla » Wed, 08 Nov 1995 04:00:00



I am currently doing some coding in C++ on our BSDI server, and wanted a
little info on the Curses lib (I'm new to Unix coding, so curses is new too!)

Anyway, does curses internally support multiple windows?  What I mean is,
if I create window A, and then create B which overlaps A.  When I remove
B, will the curses lib properly redraw A or do I have to code this?

What should I do?

Shawn

 
 
 

Curses information

Post by Anders Sepp » Thu, 09 Nov 1995 04:00:00



Quote:

>I am currently doing some coding in C++ on our BSDI server, and wanted a
>little info on the Curses lib (I'm new to Unix coding, so curses is new too!)

>Anyway, does curses internally support multiple windows?  What I mean is,
>if I create window A, and then create B which overlaps A.  When I remove
>B, will the curses lib properly redraw A or do I have to code this?

>What should I do?

>Shawn

One solution that I have used is to create a third window (C)
which is used to save the part of the screen obscured by B.

It is done by creating C whith the same position and dim as B.
The functions overlay() or overwrite() is used to copy current
screen (curscr or stdscr) to C. Then B is created and displayed.
When B is closed you only have to wrefresh C ( and overlay/
overwrite stdscr).

In this way you don't have to redraw every window below B.

-------------
Anders Seppel

 
 
 

1. curses curses curses

Last year I developed a curses based program on my SUN IPC (Sunos 4.1.2).
Sunos 4.1.2 has a SysV version of curses, that is the version I used.
I recently tried to compile my program with the new SUN C compiler
(version 2.0.1 I think).  The curses routines that come with this compiler
are BSD routines.  BSD curses and SysV curses do not seem to be compatible.
The compilation crashed (unrecognized symbols being a glaring problem).
I logged into a Solaris 2.1 based SUN that also had the new Sun C compiler
installed, and it too had BSD curses.

I would like to know why Sun chose BSD curses for their C compiler.  I
thought they would surely use SysV curses for Solaris 2.x, since it is
SysV based (or does SVR4 use BSD curses by default?).

Is the source for SysV curses available via anon ftp?

Thanks for any help you can send.

--

2. Can't change channels in WinTV Card

3. Information on using curses

4. /var has unexpected inconsistency , ERROR

5. Q:need information about curses?

6. debug rh6.1 installation stage

7. system()'ing a curses app from a curses app

8. Linux/network-novice need help!!!!

9. Curses?. . .Curses!

10. Mini-curses (or many curses?)

11. cursed curses

12. Is _UNIX Curses Explained_ THE book on curses?

13. Curses (Cursed or a blessing?)