DisposeHandle(rectH); }
ShowTerminalWin(void){	Str255		next, back;	Handle		rectH;	Rect		viewRect;	short		reserr;#if MOZILLA == 0	MenuHandle 			popupMenu;	PopupPrivateData ** pvtDataHdl;	unsigned char *		currMenuItem;	short 				i, vRefNum;	long 				cwdDirID, dirID;	Boolean				isDir = false;	Str255				pModulesDir;	OSErr 				err = noErr;#endif /* MOZILLA == 0 */	GrafPtr		oldPort;	GetPort(&oldPort);	if (gWPtr != NULL)	{		SetPort(gWPtr);			gCurrWin = kTerminalID; 		/* gControls->tw = (TermWin*) NewPtrClear(sizeof(TermWin)); */			GetIndString(next, rStringList, sInstallBtn);		GetIndString(back, rStringList, sBackBtn);			// malloc and get control		rectH = Get1Resource('RECT', rStartMsgBox);		reserr = ResError();		if (reserr == noErr && rectH != NULL)			viewRect = (Rect) **((Rect **)rectH);		else		{			ErrorHandler(reserr);			return;		}				gControls->tw->siteSelector = NULL;		gControls->tw->saveBitsCheckbox = NULL;				gControls->tw->startMsgBox = viewRect;			gControls->tw->startMsg = TENew(&viewRect, &viewRect);    if (gControls->tw->startMsg == NULL)    {    	ErrorHandler(eMem);    	return;    }    #if MOZILLA == 0	        // site selector		if (gControls->cfg->numSites > 0)		{			gControls->tw->siteSelector = GetNewControl( rSiteSelector, gWPtr );			if (!gControls->tw->siteSelector)			{				ErrorHandler(eMem);				return;			}						// populate popup button menus			HLock((Handle)gControls->tw->siteSelector);			pvtDataHdl = (PopupPrivateData **) (*(gControls->tw->siteSelector))->contrlData;			HLock((Handle)pvtDataHdl);			popupMenu = (MenuHandle) (**pvtDataHdl).mHandle;			for (i=0; i<gControls->cfg->numSites; i++)			{				HLock(gControls->cfg->site[i].desc);				currMenuItem = CToPascal(*gControls->cfg->site[i].desc);						HUnlock(gControls->cfg->site[i].desc);				InsertMenuItem( popupMenu, currMenuItem, i );			}			HUnlock((Handle)pvtDataHdl);			HUnlock((Handle)gControls->tw->siteSelector);			SetControlMaximum(gControls->tw->siteSelector, gControls->cfg->numSites);			SetControlValue(gControls->tw->siteSelector, gControls->opt->siteChoice);			ShowControl(gControls->tw->siteSelector);		}				// save bits after download and install			/* get the "Installer Modules" relative subdir */		ERR_CHECK(GetCWD(&cwdDirID, &vRefNum));		GetIndString(pModulesDir, rStringList, sInstModules);		GetDirectoryID(vRefNum, cwdDirID, pModulesDir, &dirID, &isDir);		if (isDir)		{			if (!ExistArchives(vRefNum, dirID))  // going to download			{				// show check box and message				gControls->tw->saveBitsCheckbox = GetNewControl( rSaveCheckbox, gWPtr );				if (!gControls->tw->saveBitsCheckbox)				{					ErrorHandler(eMem);					return;				}				ShowControl(gControls->tw->saveBitsCheckbox);								// get rect for save bits message				rectH = Get1Resource('RECT', rSaveBitsMsgBox);				reserr = ResError();				if (reserr == noErr && rectH != NULL)					 gControls->tw->saveBitsMsgBox  = (Rect) **((Rect **)rectH);				else				{					ErrorHandler(reserr);					return;				}								// get text edit record for save bits message				gControls->tw->saveBitsMsg = TENew(&gControls->tw->saveBitsMsgBox,												   &gControls->tw->saveBitsMsgBox );			    if (gControls->tw->saveBitsMsg == NULL)			    {			    	ErrorHandler(eMem);			    	return;			    }			    HLock(gControls->cfg->saveBitsMsg);				TESetText(*gControls->cfg->saveBitsMsg, strlen(*gControls->cfg->saveBitsMsg),					gControls->tw->saveBitsMsg);				HUnlock(gControls->cfg->saveBitsMsg);					// show controls				TEUpdate(&gControls->tw->saveBitsMsgBox, gControls->tw->saveBitsMsg);			}		}#endif /* MOZILLA == 0 */				// populate control		HLock(gControls->cfg->startMsg);		TESetText(*gControls->cfg->startMsg, strlen(*gControls->cfg->startMsg), 					gControls->tw->startMsg);		HUnlock(gControls->cfg->startMsg);			// show controls		TEUpdate(&viewRect, gControls->tw->startMsg);		ShowNavButtons( back, next );	}		SetPort(oldPort);}