summaryrefslogtreecommitdiffstats
path: root/Mac/Include/macdefs.h
blob: dcdedb14743da8f0e28a613f697b0e9cc40422e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Useful #includes and #defines for programming a set of Unix
   look-alike file system access functions on the Macintosh.
   Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
*/

#include <Types.h>
#include <Files.h>
#include <OSUtils.h>

#ifndef MPW
#include <pascal.h>
#endif

#include <errno.h>
#include <string.h>

/* Difference in origin between Mac and Unix clocks: */
#define TIMEDIFF ((unsigned long) \
	(((1970-1904)*365 + (1970-1904)/4) * 24 * 3600))

/* Macro to find out whether we can do HFS-only calls: */
#define FSFCBLen (* (short *) 0x3f6)
#define hfsrunning() (FSFCBLen > 0)

/* Universal constants: */
#define MAXPATH 256
#define TRUE 1
#define FALSE 0
#ifndef NULL
#define NULL 0
#endif
#define EOS '\0'
#define SEP ':'

#if 0 // doesn't work
/* Call Macsbug: */
pascal void Debugger() extern 0xA9FF;
#endif