Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cae5e6 commit 23ebebaCopy full SHA for 23ebeba
1 file changed
Mac/Compat/chdir.c
@@ -4,9 +4,14 @@
4
5
#include "macdefs.h"
6
7
+#ifdef __MWERKS__
8
+/* XXXX All compilers should use this, really */
9
+#include <LowMem.h>
10
+#else
11
/* Last directory used by Standard File */
12
#define SFSaveDisk (*(short *)0x214)
13
#define CurDirStore (*(long *)0x398)
14
+#endif
15
16
/* Change current directory. */
17
@@ -25,8 +30,13 @@ chdir(path)
25
30
}
26
31
if (PBHGetVol(&pb, FALSE) == noErr) {
27
32
/* Set the Standard File directory */
33
34
+ LMSetSFSaveDisk(-pb.ioWDVRefNum);
35
+ LMSetCurDirStore(pb.ioWDDirID);
36
28
37
SFSaveDisk= -pb.ioWDVRefNum;
29
38
CurDirStore= pb.ioWDDirID;
39
40
41
return 0;
42
0 commit comments