Curses question

smith at groucho smith at groucho
Wed Aug 29 12:12:39 AEST 1990


In article <556 at edpmgt.UUCP> gpitcher at edpmgt.UUCP (Glenn Pitcher) writes:
>
>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?
>
>   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!!!!!
>

  When program B is finished I assume you are doing a refresh in program A.  
Since you did not use the curses routines in program A to change the screen
program A has no way of knowing that the window has changed.  You can use the
touchwin command to force the window to do a total update.
                                          __        
                                         |  | My employer will disavow any 
-----------------------------            |  | knowledge of my actions. 
William Smith                            |. |  
Microelectronics Research Center         \  | 
University of Idaho                      /   \ 
Moscow, ID  83843                        |    \    
(208)885-6500                            |     \  
                                         |      ---|          
E-mail:   wsmith at groucho.mrc.uidaho.edu  |         |   
----------------------------             |         |
                                         |----------          
                                    
                                    
                                    



More information about the Comp.lang.c mailing list