Mercurial > cpython-lru_cache-weakref
annotate Mac/Include/macdefs.h @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 5e2c17b374fb |
| children | 4e9eb866aac6 |
| rev | line source |
|---|---|
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 /* Useful #includes and #defines for programming a set of Unix |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
2 look-alike file system access functions on the Macintosh. |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 */ |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 #include <Types.h> |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
7 #include <Files.h> |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 #include <OSUtils.h> |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 |
|
1822
76d0f2b3b9ee
Completed (hopefully) the unification of THINK 6.0 and MPW 3.2
Guido van Rossum <guido@python.org>
parents:
1795
diff
changeset
|
10 #ifdef THINK_C |
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 #include <pascal.h> |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 #endif |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 |
|
5268
4f331f5bb5f2
Modified for (optional) use of MSL
Jack Jansen <jack.jansen@cwi.nl>
parents:
2794
diff
changeset
|
14 #include <errno.h> |
|
4f331f5bb5f2
Modified for (optional) use of MSL
Jack Jansen <jack.jansen@cwi.nl>
parents:
2794
diff
changeset
|
15 #include <string.h> |
| 2036 | 16 #ifdef __MWERKS__ |
| 17 #include "errno_unix.h" | |
|
5428
5e2c17b374fb
c2pstr has moved to a different include file
Jack Jansen <jack.jansen@cwi.nl>
parents:
5268
diff
changeset
|
18 #include <TextUtils.h> |
| 2036 | 19 #endif |
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
20 |
|
2179
8da03decef59
More Pstring() stuff and some cosmetics
Jack Jansen <jack.jansen@cwi.nl>
parents:
2036
diff
changeset
|
21 /* We may be able to use a std routine in think, don't know */ |
|
8da03decef59
More Pstring() stuff and some cosmetics
Jack Jansen <jack.jansen@cwi.nl>
parents:
2036
diff
changeset
|
22 unsigned char *Pstring(char *); |
|
8da03decef59
More Pstring() stuff and some cosmetics
Jack Jansen <jack.jansen@cwi.nl>
parents:
2036
diff
changeset
|
23 |
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
24 /* Macro to find out whether we can do HFS-only calls: */ |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
25 #define FSFCBLen (* (short *) 0x3f6) |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
26 #define hfsrunning() (FSFCBLen > 0) |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
27 |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
28 /* Universal constants: */ |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
29 #define MAXPATH 256 |
|
5268
4f331f5bb5f2
Modified for (optional) use of MSL
Jack Jansen <jack.jansen@cwi.nl>
parents:
2794
diff
changeset
|
30 #ifndef __MSL__ |
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
31 #define TRUE 1 |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
32 #define FALSE 0 |
|
5268
4f331f5bb5f2
Modified for (optional) use of MSL
Jack Jansen <jack.jansen@cwi.nl>
parents:
2794
diff
changeset
|
33 #endif |
|
1795
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
34 #ifndef NULL |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
35 #define NULL 0 |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
36 #endif |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
37 #define EOS '\0' |
|
fa8bbd09f2e6
Updates for THINK C 6.0. Moved the necessary UNIX emulation routines here.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
38 #define SEP ':' |
