Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23ebeba

Browse files
committed
Made more ppc-savvy
1 parent 4cae5e6 commit 23ebeba

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Mac/Compat/chdir.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
#include "macdefs.h"
66

7+
#ifdef __MWERKS__
8+
/* XXXX All compilers should use this, really */
9+
#include <LowMem.h>
10+
#else
711
/* Last directory used by Standard File */
812
#define SFSaveDisk (*(short *)0x214)
913
#define CurDirStore (*(long *)0x398)
14+
#endif
1015

1116
/* Change current directory. */
1217

@@ -25,8 +30,13 @@ chdir(path)
2530
}
2631
if (PBHGetVol(&pb, FALSE) == noErr) {
2732
/* Set the Standard File directory */
33+
#ifdef __MWERKS__
34+
LMSetSFSaveDisk(-pb.ioWDVRefNum);
35+
LMSetCurDirStore(pb.ioWDDirID);
36+
#else
2837
SFSaveDisk= -pb.ioWDVRefNum;
2938
CurDirStore= pb.ioWDDirID;
39+
#endif
3040
}
3141
return 0;
3242
}

0 commit comments

Comments
 (0)