diff --git a/setter/src/macos/attr.c b/setter/src/macos/attr.c index e9331f4..50b1ac5 100644 --- a/setter/src/macos/attr.c +++ b/setter/src/macos/attr.c @@ -70,7 +70,7 @@ void FileAttributes(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -85,7 +85,7 @@ void FileAttributes(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pATTRS"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/deleted.c b/setter/src/macos/deleted.c index 48c71d7..a419963 100644 --- a/setter/src/macos/deleted.c +++ b/setter/src/macos/deleted.c @@ -69,7 +69,7 @@ void DeleteFiles(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -84,7 +84,7 @@ void DeleteFiles(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pDELETED"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/dirdepth.c b/setter/src/macos/dirdepth.c index 5c00436..0249550 100644 --- a/setter/src/macos/dirdepth.c +++ b/setter/src/macos/dirdepth.c @@ -69,7 +69,7 @@ void DirectoryDepth(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -84,7 +84,7 @@ void DirectoryDepth(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pDEPTH"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { @@ -112,7 +112,7 @@ void DirectoryDepth(const char* path) dirPB.fileParam.ioNamePtr = str255; // Directory name to create dirPB.fileParam.ioDirID = dirId; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); pos++; /* Mac OS has no limit, but it will crash because the catalog is single threaded */ diff --git a/setter/src/macos/filename.c b/setter/src/macos/filename.c index d10d2ea..4a559fe 100644 --- a/setter/src/macos/filename.c +++ b/setter/src/macos/filename.c @@ -69,7 +69,7 @@ void Filenames(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -84,7 +84,7 @@ void Filenames(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pFILENAME"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/files.c b/setter/src/macos/files.c index c5185fc..1e95126 100644 --- a/setter/src/macos/files.c +++ b/setter/src/macos/files.c @@ -69,7 +69,7 @@ void MillionFiles(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -84,7 +84,7 @@ void MillionFiles(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pMILLION"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); dirId = dirPB.fileParam.ioDirID; diff --git a/setter/src/macos/frag.c b/setter/src/macos/frag.c index 922ac8d..40e4418 100644 --- a/setter/src/macos/frag.c +++ b/setter/src/macos/frag.c @@ -73,7 +73,7 @@ void Fragmentation(const char* path, size_t clusterSize) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -88,7 +88,7 @@ void Fragmentation(const char* path, size_t clusterSize) dirPB.fileParam.ioNamePtr = (StringPtr) "\pFRAGS"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); dirId = dirPB.fileParam.ioDirID; diff --git a/setter/src/macos/links.c b/setter/src/macos/links.c index d5dfa20..8593744 100644 --- a/setter/src/macos/links.c +++ b/setter/src/macos/links.c @@ -113,7 +113,7 @@ void Links(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -128,7 +128,7 @@ void Links(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pLINKS"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/retro68.h b/setter/src/macos/retro68.h index 63305d3..904f77e 100644 --- a/setter/src/macos/retro68.h +++ b/setter/src/macos/retro68.h @@ -11,9 +11,6 @@ enum fsRtDirID = 2 }; -#define PBHGetVInfo(pb, async) ((async) ? PBHGetVInfoAsync(pb) : PBHGetVInfoSync(pb)) -#define PBDirCreate(pb, async) ((async) ? PBDirCreateAsync(pb) : PBDirCreateSync(pb)) - #define FOUR_CHAR_CODE(x) (x) /************** PC-DOS applications and FileTypes **************/ diff --git a/setter/src/macos/rsrcfork.c b/setter/src/macos/rsrcfork.c index 3851758..eb6b2de 100644 --- a/setter/src/macos/rsrcfork.c +++ b/setter/src/macos/rsrcfork.c @@ -108,7 +108,7 @@ void ResourceFork(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -123,7 +123,7 @@ void ResourceFork(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pRSRC"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/time.c b/setter/src/macos/time.c index d21c023..1488d6a 100644 --- a/setter/src/macos/time.c +++ b/setter/src/macos/time.c @@ -71,7 +71,7 @@ void Timestamps(const char* path) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n"); @@ -86,7 +86,7 @@ void Timestamps(const char* path) dirPB.fileParam.ioNamePtr = (StringPtr) "\pTIMES"; // Directory name to create dirPB.fileParam.ioDirID = 0; // ID of parent directory, 0 for root of volume - rc = PBDirCreate(&dirPB, 0); + rc = PBDirCreateSync(&dirPB); if(rc) { diff --git a/setter/src/macos/volume.c b/setter/src/macos/volume.c index 0d46fc9..011287e 100644 --- a/setter/src/macos/volume.c +++ b/setter/src/macos/volume.c @@ -86,7 +86,7 @@ void GetVolumeInfo(const char* path, size_t* clusterSize) hpb.ioNamePtr = str255; hpb.ioVRefNum = 0; hpb.ioVolIndex = -1; - rc = PBHGetVInfo((HParmBlkPtr)&hpb, 0); + rc = PBHGetVInfoSync((HParmBlkPtr)&hpb); if(rc) { printf("Could not get volume information.\n");