cLicFName = (unsigned char*)NewPtrClear(strlen(*gControls->cfg->licFileName));
InitLicTxt(void){	Rect	destRect, viewRect;	FSSpec	licFile;	long 	dirID, dataSize;	short 	vRefNum, dataRef, resRef;	unsigned char* 	cLicFName;	Str255			pLicFName;	OSErr	err;	Handle 	text, stylHdl;		ERR_CHECK(GetCWD(&dirID, &vRefNum));		/* open and read license file */	HLock(gControls->cfg->licFileName);	if(**gControls->cfg->licFileName != nil)	{		cLicFName = (unsigned char*)NewPtrClear(strlen(*gControls->cfg->licFileName));		cLicFName = CToPascal(*gControls->cfg->licFileName);				ERR_CHECK(FSMakeFSSpec(vRefNum, dirID, cLicFName, &licFile));		if (cLicFName)			DisposePtr((char*)cLicFName);	}	else /* assume default license filename from str rsrc */	{			GetIndString(pLicFName, rStringList, sLicenseFName);		ERR_CHECK(FSMakeFSSpec(vRefNum, dirID, pLicFName, &licFile));	}	HUnlock(gControls->cfg->licFileName);		/* read license text */	ERR_CHECK(FSpOpenDF( &licFile, fsRdPerm, &dataRef));	ERR_CHECK(GetEOF(dataRef, &dataSize));	if (dataSize > 0)	{		if (!(text = NewHandle(dataSize)))		{			ErrorHandler(eMem);			return;		}		ERR_CHECK(FSRead(dataRef, &dataSize, *text));	}	else		text = nil;	ERR_CHECK(FSClose(dataRef));	/* get 'styl' if license is multistyled */	resRef = FSpOpenResFile( &licFile, fsRdPerm);	ERR_CHECK(ResError());	UseResFile(resRef);	stylHdl = RGetResource('styl', 128);	ERR_CHECK(ResError());		if(stylHdl)		DetachResource(stylHdl);	else		stylHdl = nil;	CloseResFile(resRef);		/* TE specific init */	HLock( (Handle) gControls->lw->licBox);	SetRect(&viewRect, 	(*(gControls->lw->licBox))->contrlRect.left, 						(*(gControls->lw->licBox))->contrlRect.top, 						(*(gControls->lw->licBox))->contrlRect.right, 						(*(gControls->lw->licBox))->contrlRect.bottom);	HUnlock( (Handle) gControls->lw->licBox);	destRect.left = viewRect.left;		viewRect.right = (*(gControls->lw->scrollBar))->contrlRect.left; 	destRect.right = viewRect.right;	destRect.top = viewRect.top;	destRect.bottom = viewRect.bottom * kNumLicScrns;		// gControls->lw->licTxt = (TEHandle) NewPtrClear(sizeof(TEPtr));		TextFont(applFont);	TextFace(normal);	TextSize(9);		HLock(text);	if (stylHdl)	{		gControls->lw->licTxt = TEStyleNew( &destRect, &viewRect );		TEStyleInsert( *text, dataSize, (StScrpRec ** )stylHdl, 						gControls->lw->licTxt);	}	else	{		gControls->lw->licTxt = TENew( &destRect, &viewRect);		TEInsert( *text, dataSize, gControls->lw->licTxt);	}	HUnlock(text);		TextFont(systemFont);	TextSize(12);		TESetAlignment(teFlushDefault, gControls->lw->licTxt);}