Commit a2d26d1e authored by Jack Jansen's avatar Jack Jansen

Made more ppc-savvy

parent 9a8a96f9
...@@ -4,9 +4,14 @@ ...@@ -4,9 +4,14 @@
#include "macdefs.h" #include "macdefs.h"
#ifdef __MWERKS__
/* XXXX All compilers should use this, really */
#include <LowMem.h>
#else
/* Last directory used by Standard File */ /* Last directory used by Standard File */
#define SFSaveDisk (*(short *)0x214) #define SFSaveDisk (*(short *)0x214)
#define CurDirStore (*(long *)0x398) #define CurDirStore (*(long *)0x398)
#endif
/* Change current directory. */ /* Change current directory. */
...@@ -25,8 +30,13 @@ chdir(path) ...@@ -25,8 +30,13 @@ chdir(path)
} }
if (PBHGetVol(&pb, FALSE) == noErr) { if (PBHGetVol(&pb, FALSE) == noErr) {
/* Set the Standard File directory */ /* Set the Standard File directory */
#ifdef __MWERKS__
LMSetSFSaveDisk(-pb.ioWDVRefNum);
LMSetCurDirStore(pb.ioWDDirID);
#else
SFSaveDisk= -pb.ioWDVRefNum; SFSaveDisk= -pb.ioWDVRefNum;
CurDirStore= pb.ioWDDirID; CurDirStore= pb.ioWDDirID;
#endif
} }
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment