if (rv!=ZIP_OK) return rv;
if (rv!=ZIP_OK) goto cleanup;
ExtractCoreFile(short tgtVRefNum, long tgtDirID){	OSErr 			err = noErr;	StringPtr 		coreFile = 0;	short			fullPathLen = 0;	Handle			fullPathH = 0;	Ptr				fullPathStr = 0;	PRInt32			rv = 0;	void			*hZip = 0, *hFind = 0;	/* if there's a core file... */	HLock(gControls->cfg->coreFile);	if (*gControls->cfg->coreFile != NULL)	{		/* make local copy and unlock handle */		coreFile = CToPascal(*gControls->cfg->coreFile);		if (!coreFile)		{			err = memFullErr;			goto cleanup;		}	}	else		return fnfErr;	HUnlock(gControls->cfg->coreFile);		ERR_CHECK_RET(GetFullPath(tgtVRefNum, tgtDirID, coreFile, &fullPathLen, &fullPathH), err);			/* --- o p e n   a r c h i v e --- */		/* extract the full path string from the handle so we can NULL terminate */	HLock(fullPathH);	fullPathStr = NewPtrClear(fullPathLen+1);	strncat(fullPathStr, *fullPathH, fullPathLen);	*(fullPathStr+fullPathLen) = '\0';		rv = ZIP_OpenArchive( fullPathStr, &hZip );		HUnlock(fullPathH);	if (rv!=ZIP_OK) return rv;	/* initialize the search */	hFind = ZIP_FindInit( hZip, "core_" ); /* null to match all files in archive */			/* --- i n f l a t e   a l l   f i l e s --- */		err = InflateFiles(hZip, hFind, tgtVRefNum, tgtDirID);	if (err!=noErr)		goto cleanup;	/* XXX review later: this check may be pointless */			/* --- c l o s e   a r c h i v e --- */cleanup:	//if (hFind)	//	rv = ZIP_FindFree( hFind );#ifdef MIW_DEBUG		if (rv!=ZIP_OK) SysBeep(10);#endif	if (hZip)		rv = ZIP_CloseArchive( &hZip );#ifdef MIW_DEBUG		if (rv!=ZIP_OK) SysBeep(10); #endif	if (coreFile)		DisposePtr((Ptr)coreFile);	if (fullPathH)		DisposeHandle(fullPathH);	if (fullPathStr)		DisposePtr(fullPathStr);	return err;}