Curses question

Glenn Pitcher gpitcher at edpmgt.UUCP
Mon Aug 27 08:38:58 AEST 1990


Question... I supposed to write a series of programs which will call each
other via the 'system' library call.  By problem is that all of these
programs use the curses library.  The code fragments below are samples of
what I've come up with and they seem to work OK yet when control is passed
back to program 'A', I can't get the screen to update correctly (even though 
the data is there).  I'm sure the problem is with the fact that both of these
programs are using curses on the same tty so, can somebody tell me how to do
it better?


Code fragments are as follows:

program 'A'
main()
{

     initscr();
     do until user exits
        {
	...draw screen...
	...get option...
	switch (option)
	   {
	   case option 1 :
	      system(...program 'B'...);
	      break;
           }
        }
     endwin();

program 'B'
main() 
{

   initscr();
   ...do various things...
   endwin();
}

Now I did think about using a variation of exec but I need to pass control back
to program 'A' when 'B' has completed.     

WHAT AM I MISSING????  ARRRGGGGG!!!!!

Thank you for your support,
-- 
Glenn Pitcher                              UUCP: {crash,ucsd}!edpmgt!gpitcher
Programmer/Analyst &                                  hp-sdd!teamnet!gpitcher
Unix Guru in training                    
EDP Management, Inc.                         * Proud member of Team.Net *
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



More information about the Comp.lang.c mailing list