I couldn't figure out why the ConvertMacPathToUnixPath symbol is no longer exported by the NSPR library, so we'll include our implementation in the meantime.

This commit is contained in:
javi%netscape.com 2001-02-01 21:54:22 +00:00
Родитель b8986c4568
Коммит 2b19fc9918
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -53,6 +53,26 @@ static nsIStringBundle* gPIPNSSBundle = nsnull;
#ifdef XP_MAC
extern OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath);
OSErr ConvertMacPathToUnixPath(const char *macPath, char **unixPath)
{
PRIntn len;
char *cursor;
len = PL_strlen(macPath);
cursor = (char*)PR_Malloc(len+2);
if (!cursor)
return memFullErr;
memcpy(cursor+1, macPath, len+1);
*unixPath = cursor;
*cursor = '/';
while ((cursor = PL_strchr(cursor, ':')) != NULL) {
*cursor = '/';
cursor++;
}
return noErr;
}
#endif
static void InitializePIPNSSBundle();