blob: dcdedb14743da8f0e28a613f697b0e9cc40422e5 [file] [log] [blame]
Guido van Rossumd4d77281994-08-19 10:51:31 +00001/* Useful #includes and #defines for programming a set of Unix
2 look-alike file system access functions on the Macintosh.
3 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
4*/
5
6#include <Types.h>
7#include <Files.h>
8#include <OSUtils.h>
9
10#ifndef MPW
11#include <pascal.h>
12#endif
13
14#include <errno.h>
15#include <string.h>
16
17/* Difference in origin between Mac and Unix clocks: */
18#define TIMEDIFF ((unsigned long) \
19 (((1970-1904)*365 + (1970-1904)/4) * 24 * 3600))
20
21/* Macro to find out whether we can do HFS-only calls: */
22#define FSFCBLen (* (short *) 0x3f6)
23#define hfsrunning() (FSFCBLen > 0)
24
25/* Universal constants: */
26#define MAXPATH 256
27#define TRUE 1
28#define FALSE 0
29#ifndef NULL
30#define NULL 0
31#endif
32#define EOS '\0'
33#define SEP ':'
34
35#if 0 // doesn't work
36/* Call Macsbug: */
37pascal void Debugger() extern 0xA9FF;
38#endif