Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site sdccsu3.UUCP
Path: utzoo!linus!decvax!ittvax!dcdwest!sdcsvax!sdccsu3!taylor
From: taylor@sdccsu3.UUCP
Newsgroups: net.lang.c,net.wanted,net.unix-wizards
Subject: help needed with curses screen control package
Message-ID: <2193@sdccsu3.UUCP>
Date: Sun, 19-Aug-84 10:24:51 EDT
Article-I.D.: sdccsu3.2193
Posted: Sun Aug 19 10:24:51 1984
Date-Received: Tue, 21-Aug-84 04:34:44 EDT
Organization: California State University La Jolla
Lines: 72


	I am having some problems getting the curses screen control 
package to do what I want...and hope someone can offer some help.

	What I want to do is to have the help routine in my program
create its own window, write the help screen to this window, and then
when the user is done reading it remove the window to reveal the original
screen that was 'underneath' (so to speak).
	Using the overwrite (win1, win2) doesn't seem to do the trick!

	Enclosed is a sample program that will give you an idea of what
I am trying to do....if anyone can get this working correctly I would be
most appreciative, as I have been trying all permutations and none have
succeeded.

				Thanks vastly!

						Dave Taylor
We have UNIX 4.2 bsd
-----------
test.c
-----------

#include 

main()
{
	initscr();

	addstr(Hi there");
	refresh();

	delay();

	new_window();

	delay();
}

new_window()
{
/** this routine should overlay on TOP of the other, restoring the other
    when it leaves **/

	WINDOW *test;

	test = newwin(0,0,0,0);

	overwrite(test,stdscr); /** make the screen look like 'test' **/

	waddstr(test, "testing...!");

	wrefresh(test);

	delay();

	overwrite(stdscr,test); /** return to old screen !!!! **/

	refresh();
}

delay()
{
	int i;

	for (i=0;i< 100000 ; i++) ; 

	/** wonderful routine, eh? **/
}
--------
end of test.c
--------