Skip to content

Commit

Permalink
Always use c2pstrcpy in stead of c2pstr, not only when compiling for …
Browse files Browse the repository at this point in the history
…carbon.
  • Loading branch information
jackjansen committed Jan 12, 2001
1 parent 1beb3d2 commit bef8f68
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Mac/Compat/getwd.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ getwd(char *cwd)
sprintf(cwd, "I/O error %d in PBHGetVolSync", err);
return NULL;
}
#if 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;

Expand All @@ -77,12 +73,8 @@ getwd(char *cwd)
return NULL;
}
dirid= pb.d.ioDrParID;
#if 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 */
}
}
Expand Down

0 comments on commit bef8f68

Please sign in to comment.