File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,11 +11,8 @@ chdir(path)
1111 char * path ;
1212{
1313 WDPBRec pb ;
14- char name [MAXPATH ];
1514
16- strncpy (name , path , sizeof name );
17- name [MAXPATH - 1 ]= EOS ;
18- pb .ioNamePtr = (StringPtr ) c2pstr (name );
15+ pb .ioNamePtr = (StringPtr ) Pstring (path );
1916 pb .ioVRefNum = 0 ;
2017 pb .ioWDDirID = 0 ;
2118 if (PBHSetVol (& pb , FALSE) != noErr ) {
Original file line number Diff line number Diff line change @@ -21,10 +21,9 @@ macstat(path, buf)
2121 FileParam f ;
2222 HFileInfo hf ;
2323 } pb ;
24- char name [256 ];
2524 short err ;
2625
27- pb .d .ioNamePtr = (unsigned char * )c2pstr ( strcpy ( name , path ) );
26+ pb .d .ioNamePtr = (unsigned char * )Pstring ( path );
2827 pb .d .ioVRefNum = 0 ;
2928 pb .d .ioFDirIndex = 0 ;
3029 pb .d .ioDrDirID = 0 ;
Original file line number Diff line number Diff line change @@ -12,14 +12,12 @@ mkdir(path, mode)
1212 int mode ; /* Ignored */
1313{
1414 HFileParam pb ;
15- char name [MAXPATH ];
1615
1716 if (!hfsrunning ()) {
1817 errno = ENODEV ;
1918 return -1 ;
2019 }
21- strncpy (name , path , sizeof name );
22- pb .ioNamePtr = (StringPtr ) c2pstr (name );
20+ pb .ioNamePtr = (StringPtr ) Pstring (path );
2321 pb .ioVRefNum = 0 ;
2422 pb .ioDirID = 0 ;
2523 if (PBDirCreate ((HParmBlkPtr )& pb , FALSE) != noErr ) {
Original file line number Diff line number Diff line change @@ -9,10 +9,8 @@ rmdir(path)
99 char * path ;
1010{
1111 IOParam pb ;
12- char name [MAXPATH ];
1312
14- strncpy (name , path , sizeof name );
15- pb .ioNamePtr = (StringPtr ) c2pstr (name );
13+ pb .ioNamePtr = (StringPtr ) Pstring (path );
1614 pb .ioVRefNum = 0 ;
1715 if (PBDelete ((ParmBlkPtr )& pb , FALSE) != noErr ) {
1816 errno = EACCES ;
You can’t perform that action at this time.
0 commit comments