blob: 061233bd5fb3823239b1fba2242cf94f045d4bc8 [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
Guido van Rossum739267b1994-08-29 08:42:37 +000010#ifdef THINK_C
Guido van Rossumd4d77281994-08-19 10:51:31 +000011#include <pascal.h>
12#endif
13
Jack Jansen54956721997-04-08 15:24:58 +000014#include <errno.h>
15#include <string.h>
Jack Jansen0c637701994-12-14 14:10:51 +000016#ifdef __MWERKS__
17#include "errno_unix.h"
Jack Jansenf74f63a1995-06-27 13:18:14 +000018#include <Strings.h>
19#define c2pstr C2PStr
20#define p2cstr P2CStr
Jack Jansen0c637701994-12-14 14:10:51 +000021#endif
Guido van Rossumd4d77281994-08-19 10:51:31 +000022
Jack Jansend50e4e11995-01-18 13:58:04 +000023/* We may be able to use a std routine in think, don't know */
24unsigned char *Pstring(char *);
25
Guido van Rossumd4d77281994-08-19 10:51:31 +000026/* 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
Jack Jansen54956721997-04-08 15:24:58 +000032#ifndef __MSL__
Guido van Rossumd4d77281994-08-19 10:51:31 +000033#define TRUE 1
34#define FALSE 0
Jack Jansen54956721997-04-08 15:24:58 +000035#endif
Guido van Rossumd4d77281994-08-19 10:51:31 +000036#ifndef NULL
37#define NULL 0
38#endif
39#define EOS '\0'
40#define SEP ':'