home *** CD-ROM | disk | FTP | other *** search
- #include <MacTypes.h>
- #include <FileMgr.h>
-
- #include "fix.h"
-
- void mfs_comment_processing(ParmBlkPtr pb, int is_vol);
- void mfs_bundle_processing(ParmBlkPtr pb, int is_vol);
-
- /* Disk scanning control for an MFS volume. */
-
- void mfs_scan_disk()
- {
- register int index, done, result;
- ParamBlockRec pb;
- unsigned char name[LONG_NAME_SIZE];
-
- pb.volumeParam.ioCompletion = NIL;
- pb.volumeParam.ioNamePtr = name;
- pb.volumeParam.ioVRefNum = volume_refnum;
-
- pb.volumeParam.ioVolIndex = 0;
- PBGetVInfo(&pb, 0);
- if (process_comments)
- mfs_comment_processing(&pb, 1);
- if (process_bundles)
- mfs_bundle_processing(&pb, 1);
-
- index = 1; done = 0;
- while (!done) {
- SystemTask();
- pb.fileParam.ioFDirIndex = index++;
- result = PBGetFInfo(&pb, 0);
- if ((result != noErr) || (pb.fileParam.ioResult != noErr))
- done = 1;
- else {
- if (process_comments)
- mfs_comment_processing(&pb, 0);
- if (process_bundles)
- mfs_bundle_processing(&pb, 0);
- }
- }
- }
-
- /* Do comment processing for a file under MFS. */
-
- static void mfs_comment_processing(pb, is_vol)
- ParmBlkPtr pb;
- int is_vol;
- {
- remove_fcmt(comment_hash(pb->fileParam.ioNamePtr));
- }
-
- /* Do bundle processing for a file under MFS. */
-
- static void mfs_bundle_processing(pb, is_vol)
- ParmBlkPtr pb;
- int is_vol;
- {
- if (!is_vol)
- remove_bndl(pb->fileParam.ioFlFndrInfo.fdCreator);
- }
-