1 /* Chdir for the Macintosh.
2 Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
3 Pathnames must be Macintosh paths, with colons as separators. */
8 /* XXXX All compilers should use this, really */
11 /* Last directory used by Standard File */
12 #define SFSaveDisk (*(short *)0x214)
13 #define CurDirStore (*(long *)0x398)
16 /* Change current directory. */
24 pb
.ioNamePtr
= (StringPtr
) Pstring(path
);
27 if (PBHSetVol(&pb
, FALSE
) != noErr
) {
31 if (PBHGetVol(&pb
, FALSE
) == noErr
) {
32 /* Set the Standard File directory */
34 LMSetSFSaveDisk(-pb
.ioWDVRefNum
);
35 LMSetCurDirStore(pb
.ioWDDirID
);
37 SFSaveDisk
= -pb
.ioWDVRefNum
;
38 CurDirStore
= pb
.ioWDDirID
;