Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 1 | /* 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 | |
Guido van Rossum | 739267b | 1994-08-29 08:42:37 +0000 | [diff] [blame] | 10 | #ifdef THINK_C |
Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 11 | #include <pascal.h> |
| 12 | #endif |
| 13 | |
Jack Jansen | 0c63770 | 1994-12-14 14:10:51 +0000 | [diff] [blame] | 14 | #ifdef __MWERKS__ |
| 15 | #include "errno_unix.h" |
Jack Jansen | f74f63a | 1995-06-27 13:18:14 +0000 | [diff] [blame^] | 16 | #include <Strings.h> |
| 17 | #define c2pstr C2PStr |
| 18 | #define p2cstr P2CStr |
Jack Jansen | 0c63770 | 1994-12-14 14:10:51 +0000 | [diff] [blame] | 19 | #endif |
Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 20 | #include <errno.h> |
| 21 | #include <string.h> |
| 22 | |
Jack Jansen | d50e4e1 | 1995-01-18 13:58:04 +0000 | [diff] [blame] | 23 | /* We may be able to use a std routine in think, don't know */ |
| 24 | unsigned char *Pstring(char *); |
| 25 | |
Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 26 | /* Macro to find out whether we can do HFS-only calls: */ |
| 27 | #define FSFCBLen (* (short *) 0x3f6) |
| 28 | #define hfsrunning() (FSFCBLen > 0) |
| 29 | |
| 30 | /* Universal constants: */ |
| 31 | #define MAXPATH 256 |
| 32 | #define TRUE 1 |
| 33 | #define FALSE 0 |
| 34 | #ifndef NULL |
| 35 | #define NULL 0 |
| 36 | #endif |
| 37 | #define EOS '\0' |
| 38 | #define SEP ':' |