Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WREOPEN.C

 
Output of file : WREOPEN.C contained in archive : WTWG12B.ZIP

/*! wreopen ()
*
* makes the desired window the active window
* Does NOT check that no other window overlaps this one
* you can get screen gibberrish if you switch between
* overlapping windows
*
* The previous window becomes the second window on the chain.
*/


#include "wscreen.h"
#include "wsys.h"





void wreopen(WINDOW *Wnew)
{
WINDOW *p;

int oldpage, newpage;

if ( w0 == Wnew )
{
return;
}

/* find the window that 'points' to the desired new window
*/
for (p = w0; p->winchain != Wnew && p !=NULL; p= p->winchain)
{}


if (p==NULL)
{
werror('W', "WREOPEN-window not found");
}


/* now p points to the window immediately more recent than 'new' one
*/
p->winchain = Wnew->winchain; /* remove new from chain */
Wnew->winchain = w0;
w0 = Wnew;


newpage = w0-> winpage;
oldpage = w0->winchain->winpage;




if (oldpage != newpage)
{
wpage_ram = wvideo_ram + wpage_size*newpage;
}


#ifndef TEXTONLY
/* align BGI graphics driver
*/
walign (oldpage);
#endif /* ! TEXTONLY */

return; /* wreopen */
}


  3 Responses to “Category : C Source Code
Archive   : WTWG12B.ZIP
Filename : WREOPEN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/