Lines Matching defs:theGlobals

153 							 PreflightGlobals *theGlobals);
163 EnumerateGlobals *theGlobals);
168 PreflightGlobals *theGlobals)
174 theGlobals->myCPB.dirInfo.ioFDirIndex = index;
175 theGlobals->myCPB.dirInfo.ioDrDirID = currentDirID; /* we need to do this every time */
178 theGlobals->result = PBGetCatInfoSync(&theGlobals->myCPB);
179 if ( theGlobals->result == noErr )
181 if ( (theGlobals->copyFilterProc == NULL) ||
182 CallCopyFilterProc(theGlobals->copyFilterProc, &theGlobals->myCPB) ) /* filter if filter proc was supplied */
185 if ( (theGlobals->myCPB.dirInfo.ioFlAttrib & ioDirMask) != 0 )
189 GetLevelSize(theGlobals->myCPB.dirInfo.ioDrDirID, theGlobals); /* recurse */
190 theGlobals->result = noErr; /* clear error return on way back */
199 if ( ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen & 0x000001ff) != 0 )
201 theGlobals->tempBlocks = ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen >> 9) + 1;
205 theGlobals->tempBlocks = (unsigned long)theGlobals->myCPB.hFileInfo.ioFlLgLen >> 9;
208 if ( theGlobals->tempBlocks % theGlobals->dstBlksPerAllocBlk )
210 theGlobals->allocBlksNeeded += (theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk) + 1;
214 theGlobals->allocBlksNeeded += theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk;
218 if ( ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen & 0x000001ff) != 0 )
220 theGlobals->tempBlocks = ((unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen >> 9) + 1;
224 theGlobals->tempBlocks = (unsigned long)theGlobals->myCPB.hFileInfo.ioFlRLgLen >> 9;
227 if ( theGlobals->tempBlocks % theGlobals->dstBlksPerAllocBlk )
229 theGlobals->allocBlksNeeded += (theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk) + 1;
233 theGlobals->allocBlksNeeded += theGlobals->tempBlocks / theGlobals->dstBlksPerAllocBlk;
239 } while ( theGlobals->result == noErr );
253 PreflightGlobals theGlobals;
266 theGlobals.dstBlksPerAllocBlk = ((unsigned long)pb.ioVAlBlkSiz >> 9);
268 theGlobals.allocBlksNeeded = 0;
270 theGlobals.myCPB.dirInfo.ioNamePtr = theGlobals.itemName;
271 theGlobals.myCPB.dirInfo.ioVRefNum = srcVRefNum;
273 theGlobals.copyFilterProc = copyFilterProc;
275 GetLevelSize(srcDirID, &theGlobals);
281 *spaceOK = ((theGlobals.allocBlksNeeded * theGlobals.dstBlksPerAllocBlk) <= dstFreeBlocks);
291 EnumerateGlobals *theGlobals)
301 theGlobals->myCPB.dirInfo.ioFDirIndex = index;
302 theGlobals->myCPB.dirInfo.ioDrDirID = sourceDirID;
303 theGlobals->error = PBGetCatInfoSync(&theGlobals->myCPB);
305 if ( theGlobals->error == noErr )
307 if ( (theGlobals->copyFilterProc == NULL) ||
308 CallCopyFilterProc(theGlobals->copyFilterProc, &theGlobals->myCPB) ) /* filter if filter proc was supplied */
313 if ( (theGlobals->myCPB.hFileInfo.ioFlAttrib & ioDirMask) != 0 )
318 theGlobals->error = DirCreate(theGlobals->destinationVRefNum, dstDirID, theGlobals->itemName, &newDirID);
319 if ( theGlobals->error == noErr )
323 currentSrcDirID = theGlobals->myCPB.dirInfo.ioDrDirID;
326 CopyLevel(theGlobals->myCPB.dirInfo.ioDrDirID, newDirID, theGlobals);
328 if ( !theGlobals->bailout )
332 (void) DTCopyComment(theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL, theGlobals->destinationVRefNum, newDirID, NULL);
336 theGlobals->error = CopyFileMgrAttributes(theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL, theGlobals->destinationVRefNum, newDirID, NULL, true);
339 if ( theGlobals->error != noErr )
341 if ( theGlobals->errorHandler != NULL )
343 theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, copyDirFMAttributesOp,
344 theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL,
345 theGlobals->destinationVRefNum, newDirID, NULL);
351 theGlobals->bailout = true;
358 if ( theGlobals->errorHandler != NULL )
360 theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, dirCreateOp,
361 theGlobals->myCPB.dirInfo.ioVRefNum, currentSrcDirID, NULL,
362 theGlobals->destinationVRefNum, dstDirID, theGlobals->itemName);
368 theGlobals->bailout = true;
372 if ( !theGlobals->bailout )
375 theGlobals->error = noErr;
382 theGlobals->error = FileCopy(theGlobals->myCPB.hFileInfo.ioVRefNum,
383 theGlobals->myCPB.hFileInfo.ioFlParID,
384 theGlobals->itemName,
385 theGlobals->destinationVRefNum,
389 theGlobals->copyBuffer,
390 theGlobals->bufferSize,
394 if ( theGlobals->error != noErr )
396 if ( theGlobals->errorHandler != NULL )
398 theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, fileCopyOp,
399 theGlobals->myCPB.hFileInfo.ioVRefNum, theGlobals->myCPB.hFileInfo.ioFlParID, theGlobals->itemName,
400 theGlobals->destinationVRefNum, dstDirID, NULL);
401 if ( !theGlobals->bailout )
404 theGlobals->error = noErr;
411 theGlobals->bailout = true;
420 if ( theGlobals->error != fnfErr )
422 if ( theGlobals->errorHandler != NULL )
424 theGlobals->bailout = CallCopyErrProc(theGlobals->errorHandler, theGlobals->error, getNextItemOp,
425 theGlobals->myCPB.dirInfo.ioVRefNum, sourceDirID, NULL, 0, 0, NULL);
426 if ( !theGlobals->bailout )
429 theGlobals->error = noErr;
436 theGlobals->bailout = true;
441 } while ( (theGlobals->error == noErr) && (!theGlobals->bailout) ); /* time to fall back a level? */
568 EnumerateGlobals theGlobals;
726 theGlobals.copyBuffer = (Ptr)copyBufferPtr;
727 theGlobals.bufferSize = copyBufferSize;
728 theGlobals.destinationVRefNum = dstVRefNum; /* so we can get to it always */
729 theGlobals.myCPB.hFileInfo.ioNamePtr = (StringPtr)&theGlobals.itemName;
730 theGlobals.myCPB.hFileInfo.ioVRefNum = srcVRefNum;
731 theGlobals.errorHandler = copyErrHandler;
732 theGlobals.bailout = false;
733 theGlobals.copyFilterProc = copyFilterProc;
736 CopyLevel(srcDirID, dstDirID, &theGlobals);
737 error = theGlobals.error; /* get the result */
739 if ( !theGlobals.bailout )
752 theGlobals.bailout = CallCopyErrProc(copyErrHandler, error, copyDirFMAttributesOp,