AmendHub

Download

nulleric

/

Fix-a-Fork

/

main.h

 

(View History)

eric   Fix-a-Fork 1.0.0-a Latest amendment: 30 on 2024-04-01

1 /*
2 Copyright Eric Helgeson 2023-2024.
3 */
4 #ifndef __MAIN_H__
5 #define __MAIN_H__
6
7 #include <Files.h>
8 #include <StandardFile.h>
9 #include <Events.h>
10 #include <AppleEvents.h>
11 #include <GestaltEqu.h>
12 #include <Dialogs.h>
13 #include <Types.h>
14
15 #define BUF_SIZE 1024
16
17 // Globals
18 Byte gBuf[BUF_SIZE] = {0};
19 Boolean gHandledByDnD = false;
20
21 OSErr openFile(unsigned char *fName, short fRefNum, short vRefNum, long dirID);
22 pascal OSErr DoOpenDoc(AppleEvent *event, AppleEvent *reply, long handlerRefcon);
23
24 // checks
25 Boolean StringCompare(const char *lhs, const char *rhs);
26 short StringLen(const char *str);
27 Boolean magicCheck(char *magic, short len, short offset, OSType type, OSType creator);
28 Boolean isBinHex4();
29 Boolean isSit5();
30 Boolean isSit15();
31 Boolean isBinSit();
32 Boolean isDsk4();
33 Boolean isZip();
34 Boolean isMar();
35 Boolean isCpt();
36 Boolean isDsk_1024();
37 //Boolean CheckFileExt(const char *ext);
38 short strlen(const char *str);
39 #endif