00001 /*@A (C) 1992 Allen I. Holub */ 00002 #include "cur.h" 00003 00004 WINDOW *showwin(WINDOW * win ) 00005 { 00006 /* Make a previously hidden window visible again. Return NULL and do 00007 * nothing if the window wasn't hidden, otherwise return the win argument. 00008 */ 00009 00010 SBUF *image; 00011 00012 if( !win->hidden ) 00013 return( NULL ); 00014 00015 image = savescr(((SBUF*)(win->image))->left, ((SBUF*)(win->image))->right, 00016 ((SBUF*)(win->image))->top, ((SBUF*)(win->image))->bottom); 00017 00018 restore( (SBUF *) win->image ); 00019 freescr( (SBUF *) win->image ); 00020 win->image = image; 00021 win->hidden = 0; 00022 00023 /* Move the cursor to compensate for windows that were moved while they 00024 * were hidden. 00025 */ 00026 cmove(win, win->y_org + win->row, win->x_org + win->col ); 00027 return( win ); 00028 }