nulleric
/Fix-a-Fork
/amendments
/15
learned .sea.bin or .sit.bin
eric made amendment 15 about 1 year ago
--- main.c Thu Nov 9 09:23:48 2023
+++ main.c Thu Nov 9 09:46:55 2023
@@ -90,6 +90,8 @@ OSErr openFile(unsigned char *fName, short fRefNum, sh
found = true;
else if(isSit15())
found = true;
+ else if(isBinSit())
+ found = true;
else if(isDsk4())
found = true;
else if(isZip())
@@ -164,12 +166,27 @@ Boolean isSit15()
stuffitVersion = gBuf[14];
return (stuffitVersion == 0x01 || stuffitVersion == 0x02) && magicCheck("rLau", 10, 'SIT!', 'SIT!');
}
+ return false;
}
Boolean isSit5()
{
short stuffitVersion = gBuf[82]; // 0x05
return (stuffitVersion == 0x05 && magicCheck("StuffIt (c)1997", 0, 'SITD', 'SIT!'));
+}
+
+Boolean isBinSit()
+{
+ short stuffitVersion = 0;
+ if(magicCheck("SIT!", 0 + 128, 'SIT!', 'SIT!'))
+ {
+ gType = 0;
+ gCreator = 0;
+ // 0x01 for 1.5.x, 0x02 for 1.6-4.5
+ stuffitVersion = gBuf[14 + 128];
+ return (stuffitVersion == 0x01 || stuffitVersion == 0x02) && magicCheck("rLau", 10 + 128, 'BINA', 'SITx');
+ }
+ return false;
}
Boolean isDsk4()
--- main.h Thu Nov 9 09:23:29 2023
+++ main.h Thu Nov 9 09:47:04 2023
@@ -22,6 +22,7 @@ Boolean magicCheck(char *magic, short offset, OSType t
Boolean isBinHex4();
Boolean isSit5();
Boolean isSit15();
+Boolean isBinSit();
Boolean isDsk4();
Boolean isZip();
Boolean isMar();