if (FindRunningAppBySignature('MOSS', &theSpec, &thePSN) == noErr || FindRunningAppBySignature('MOZZ', &theSpec, &thePSN) == noErr) { KeepCheckingVersion: if (VersGreaterThan4(&theSpec)) { Str255 tempStr; SInt16 itemHit; SInt16  stringLen = strlen(*gControls->cfg->welcMsg[1]); if (stringLen > 255) stringLen = 255;  BlockMoveData(*gControls->cfg->welcMsg[1], &tempStr[1], stringLen); tempStr[0] = stringLen;  StandardAlert(kAlertStopAlert, tempStr, nil, nil, &itemHit);  ShowWelcomeWin(); return; } }   if (FindNextRunningAppBySignature('MOSS', &theSpec, &thePSN) == noErr || FindNextRunningAppBySignature('MOZZ', &theSpec, &thePSN) == noErr) goto KeepCheckingVersion;
ShowSetupTypeWin(void){	Str255 				next;	Str255 				back;	MenuHandle 			popupMenu;	PopupPrivateData ** pvtDataHdl;	unsigned char *		currMenuItem;	short 				i;/*		short 				numVols;	unsigned char **	volName;*/	Rect 				viewRect;	long				txtSize;	Str255				instLocTitle, selectFolder;	GrafPtr				oldPort;	ProcessSerialNumber thePSN;	FSSpec				theSpec;		GetPort(&oldPort);		/* Short term fix for #58928 - prevent install if Mozilla or Netscape running */	if (FindRunningAppBySignature('MOSS', &theSpec, &thePSN) == noErr ||		FindRunningAppBySignature('MOZZ', &theSpec, &thePSN) == noErr)	{KeepCheckingVersion:		if (VersGreaterThan4(&theSpec))		{			Str255 tempStr;			SInt16 itemHit;			SInt16  stringLen = strlen(*gControls->cfg->welcMsg[1]);			if (stringLen > 255)				stringLen = 255;			/* copy C to P string */			BlockMoveData(*gControls->cfg->welcMsg[1], &tempStr[1], stringLen);			tempStr[0] = stringLen;			/* Show a Stop alert with the text */			StandardAlert(kAlertStopAlert, tempStr, nil, nil, &itemHit);			/* Bounce user back to Welcome window */			ShowWelcomeWin();			return;		}	}		/* Just because we found one app doesn't mean another copy isn't running so	   keep checking */	if (FindNextRunningAppBySignature('MOSS', &theSpec, &thePSN) == noErr ||		FindNextRunningAppBySignature('MOZZ', &theSpec, &thePSN) == noErr)		goto KeepCheckingVersion;	if (gWPtr != NULL)	{		SetPort(gWPtr);			gCurrWin = kSetupTypeID; 		/* gControls->stw = (SetupTypeWin *) NewPtrClear(sizeof(SetupTypeWin));	*/		GetResourcedString(next, rInstList, sNextBtn);		GetResourcedString(back, rInstList, sBackBtn);			// malloc and get controls		gControls->stw->instType = GetNewControl( rInstType, gWPtr);		gControls->stw->instDescBox = GetNewControl( rInstDescBox, gWPtr);		gControls->stw->destLocBox = GetNewControl( rDestLocBox, gWPtr);		gControls->stw->destLoc = GetNewControl(rDestLoc, gWPtr);		if (!gControls->stw->instType || !gControls->stw->instDescBox || 			!gControls->stw->destLocBox || !gControls->stw->destLoc)		{			ErrorHandler(eMem, nil);			return;		}		// populate popup button menus		HLock((Handle)gControls->stw->instType);		pvtDataHdl = (PopupPrivateData **) (*(gControls->stw->instType))->contrlData;		HLock((Handle)pvtDataHdl);		popupMenu = (MenuHandle) (**pvtDataHdl).mHandle;		for (i=0; i<gControls->cfg->numSetupTypes; i++)		{			HLock(gControls->cfg->st[i].shortDesc);			currMenuItem = CToPascal(*gControls->cfg->st[i].shortDesc);					HUnlock(gControls->cfg->st[i].shortDesc);			InsertMenuItem( popupMenu, currMenuItem, i);		}		HUnlock((Handle)pvtDataHdl);		HUnlock((Handle)gControls->stw->instType);		SetControlMaximum(gControls->stw->instType, gControls->cfg->numSetupTypes);		SetControlValue(gControls->stw->instType, gControls->opt->instChoice);			// setup type desc TE init and default item desc display		HLock((Handle)gControls->stw->instDescBox);		SetRect(&viewRect,  (*(gControls->stw->instDescBox))->contrlRect.left,							(*(gControls->stw->instDescBox))->contrlRect.top,							(*(gControls->stw->instDescBox))->contrlRect.right,							(*(gControls->stw->instDescBox))->contrlRect.bottom);		HUnlock((Handle)gControls->stw->instDescBox);			InsetRect(&viewRect, kTxtRectPad, kTxtRectPad);		TextFont(systemFont);		TextFace(normal);		TextSize(12);			gControls->stw->instDescTxt = TENew( &viewRect, &viewRect);		HLock(gControls->cfg->st[gControls->opt->instChoice - 1].longDesc);		txtSize = strlen(*gControls->cfg->st[gControls->opt->instChoice - 1].longDesc);		TEInsert( *gControls->cfg->st[gControls->opt->instChoice - 1].longDesc, txtSize, gControls->stw->instDescTxt);		TESetAlignment( teFlushDefault, gControls->stw->instDescTxt);		HUnlock(gControls->cfg->st[gControls->opt->instChoice - 1].longDesc);/*    volName = (unsigned char **)NewPtrClear(sizeof(unsigned char *));	GetAllVInfo(volName, &numVols);		gControls->stw->numVols = numVols;	HLock((Handle)gControls->stw->destLoc);	pvtDataHdl = (PopupPrivateData **) (*(gControls->stw->destLoc))->contrlData;	popupMenu = (MenuHandle) (**pvtDataHdl).mHandle;	for (i=0; i<numVols; i++)	{		InsertMenuItem( popupMenu, volName[i], i);	}	InsertMenuItem( popupMenu, "\p-", i);	GetIndString(selectFolder, rStringList, sSelectFolder);	InsertMenuItem( popupMenu, selectFolder, i+1);		HUnlock((Handle)gControls->stw->destLoc);		SetControlMaximum(gControls->stw->destLoc, numVols+2); // 2 extra for divider and "Select Folder..." item	SetControlValue(gControls->stw->destLoc, 1);*/		GetResourcedString(selectFolder, rInstList, sSelectFolder);		SetControlTitle(gControls->stw->destLoc, selectFolder);		GetResourcedString(instLocTitle, rInstList, sInstLocTitle);		SetControlTitle(gControls->stw->destLocBox, instLocTitle);				// show controls		ShowControl(gControls->stw->instType);		ShowControl(gControls->stw->destLoc);		ShowNavButtons( back, next );			DrawDiskNFolder(gControls->opt->vRefNum, gControls->opt->folder);	}			SetPort(oldPort);}