Revived various of the compatability routines and made them Carbon-compliant. This is needed because the initial carbon-python does not use GUSI.
diff --git a/Mac/Compat/getwd.c b/Mac/Compat/getwd.c
index 16b010a..a58fb6a 100644
--- a/Mac/Compat/getwd.c
+++ b/Mac/Compat/getwd.c
@@ -59,13 +59,18 @@
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
return NULL;
}
+#ifdef TARGET_API_MAC_CARBON
+ p2cstrcpy(cwd, (StringPtr)cwd);
+ ecwd = strchr(cwd, EOS);
+#else
ecwd= strchr((const char *)p2cstr((unsigned char*)cwd), EOS);
+#endif
ebuf= buf;
*ebuf = EOS;
/* Next, if at least we're running HFS, walk up the path. */
- if (hfsrunning()) {
+ {
long dirid= pb.w.ioWDDirID;
pb.d.ioVRefNum= pb.w.ioWDVRefNum;
while (dirid != ROOTID) {
@@ -78,7 +83,12 @@
return NULL;
}
dirid= pb.d.ioDrParID;
+#ifdef TARGET_API_MAC_CARBON
+ p2cstrcpy(ebuf, (StringPtr)ebuf);
+ ebuf += strlen(ebuf);
+#else
ebuf += strlen((const char *)p2cstr((unsigned char *)ebuf));
+#endif
/* Should check for buf overflow */
}
}