summaryrefslogtreecommitdiffstats
path: root/Mac/Compat
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Compat')
-rw-r--r--Mac/Compat/chdir.c5
-rw-r--r--Mac/Compat/macstat.c3
-rw-r--r--Mac/Compat/mkdir.c4
-rw-r--r--Mac/Compat/rmdir.c4
4 files changed, 4 insertions, 12 deletions
diff --git a/Mac/Compat/chdir.c b/Mac/Compat/chdir.c
index b8ec6d7..3f89b52 100644
--- a/Mac/Compat/chdir.c
+++ b/Mac/Compat/chdir.c
@@ -11,11 +11,8 @@ chdir(path)
char *path;
{
WDPBRec pb;
- char name[MAXPATH];
- strncpy(name, path, sizeof name);
- name[MAXPATH-1]= EOS;
- pb.ioNamePtr= (StringPtr) c2pstr(name);
+ pb.ioNamePtr= (StringPtr) Pstring(path);
pb.ioVRefNum= 0;
pb.ioWDDirID= 0;
if (PBHSetVol(&pb, FALSE) != noErr) {
diff --git a/Mac/Compat/macstat.c b/Mac/Compat/macstat.c
index 564da10..0f690e0 100644
--- a/Mac/Compat/macstat.c
+++ b/Mac/Compat/macstat.c
@@ -21,10 +21,9 @@ macstat(path, buf)
FileParam f;
HFileInfo hf;
} pb;
- char name[256];
short err;
- pb.d.ioNamePtr = (unsigned char *)c2pstr(strcpy(name, path));
+ pb.d.ioNamePtr = (unsigned char *)Pstring(path);
pb.d.ioVRefNum = 0;
pb.d.ioFDirIndex = 0;
pb.d.ioDrDirID = 0;
diff --git a/Mac/Compat/mkdir.c b/Mac/Compat/mkdir.c
index b064761..3c35eb0 100644
--- a/Mac/Compat/mkdir.c
+++ b/Mac/Compat/mkdir.c
@@ -12,14 +12,12 @@ mkdir(path, mode)
int mode; /* Ignored */
{
HFileParam pb;
- char name[MAXPATH];
if (!hfsrunning()) {
errno= ENODEV;
return -1;
}
- strncpy(name, path, sizeof name);
- pb.ioNamePtr= (StringPtr) c2pstr(name);
+ pb.ioNamePtr= (StringPtr) Pstring(path);
pb.ioVRefNum= 0;
pb.ioDirID= 0;
if (PBDirCreate((HParmBlkPtr)&pb, FALSE) != noErr) {
diff --git a/Mac/Compat/rmdir.c b/Mac/Compat/rmdir.c
index f31052f..2e406c2 100644
--- a/Mac/Compat/rmdir.c
+++ b/Mac/Compat/rmdir.c
@@ -9,10 +9,8 @@ rmdir(path)
char *path;
{
IOParam pb;
- char name[MAXPATH];
- strncpy(name, path, sizeof name);
- pb.ioNamePtr= (StringPtr) c2pstr(name);
+ pb.ioNamePtr= (StringPtr) Pstring(path);
pb.ioVRefNum= 0;
if (PBDelete((ParmBlkPtr)&pb, FALSE) != noErr) {
errno= EACCES;