cIndex = ltoa(siteIndex); if (!cIndex) goto BAIL;  memset(cDomain, 0 , pDomainRoot[0] + 4); strncpy(cDomain, (char*)&pDomainRoot[1], pDomainRoot[0]); strcat(cDomain, cIndex);
ParseRedirect(FSSpecPtr redirectINI){	short 		fileRefNum;	Boolean		bSuccess = false;	OSErr 		err = noErr;	long		dataSize;	char 		*text = NULL, *cDomain = NULL, *cSection = NULL, *cIndex = NULL;	Str255		pSection, pDomainRoot;	int			siteIndex;	Handle		domainH = NULL;		/* read in text from downloaded site selector */	err = FSpOpenDF(redirectINI, fsRdPerm, &fileRefNum);    if (err != noErr)        return;	err = GetEOF(fileRefNum, &dataSize);        	if (err != noErr)		return;	if (dataSize > 0)	{		text = (char*) NewPtrClear(dataSize);		if (!text)			return;			        err = FSRead(fileRefNum, &dataSize, text);        if (err != noErr)        	goto BAIL;    }	FSClose(fileRefNum);		 	/* parse text for selected site replacing selected 	 * site with parsed text (new site domain) 	 */	if (gControls->cfg->numSites > 0)	{		siteIndex = gControls->opt->siteChoice - 1;				GetIndString(pSection, rParseKeys, sSiteSelector);		GetIndString(pDomainRoot, rParseKeys, sDomain);		cDomain = NewPtrClear(pDomainRoot[0] + 4);		cSection = PascalToC(pSection);		if (!cSection || !cDomain)			goto BAIL;				cIndex = ltoa(siteIndex);		if (!cIndex) 			goto BAIL;				memset(cDomain, 0 , pDomainRoot[0] + 4);		strncpy(cDomain, (char*)&pDomainRoot[1], pDomainRoot[0]);		strcat(cDomain, cIndex);				domainH = NewHandleClear(kValueMaxLen);		if (!domainH ) 			goto BAIL;		if (FillKeyValueUsingName(cSection, cDomain, domainH, text))		{				if (gControls->cfg->site[siteIndex].domain)				DisposeHandle(gControls->cfg->site[siteIndex].domain);			gControls->cfg->site[siteIndex].domain = NewHandleClear(kValueMaxLen);			HLock(domainH);			HLock(gControls->cfg->site[siteIndex].domain);			strcpy(*(gControls->cfg->site[siteIndex].domain), *domainH);			HUnlock(domainH);			HUnlock(gControls->cfg->site[siteIndex].domain);		}		if (domainH)			DisposeHandle(domainH);	}	BAIL:	if (text)		DisposePtr((Ptr) text);	if (cDomain)		DisposePtr((Ptr) cDomain);	if (cSection)		DisposePtr((Ptr) cSection);	if (cIndex)		free(cIndex);}