libwinpr-crt: add strtok_s
This commit is contained in:
parent
dbd6149e01
commit
39ce1596f7
@ -49,6 +49,8 @@ WINPR_API WCHAR* _wcsdup(const WCHAR* strSource);
|
||||
|
||||
WINPR_API int _stricmp(const char* string1, const char* string2);
|
||||
|
||||
WINPR_API char* strtok_s(char* strToken, const char* strDelimit, char** context);
|
||||
|
||||
WINPR_API LPSTR CharUpperA(LPSTR lpsz);
|
||||
WINPR_API LPWSTR CharUpperW(LPWSTR lpsz);
|
||||
|
||||
|
@ -70,6 +70,11 @@ int _stricmp(const char* string1, const char* string2)
|
||||
return strcasecmp(string1, string2);
|
||||
}
|
||||
|
||||
char* strtok_s(char* strToken, const char* strDelimit, char** context)
|
||||
{
|
||||
return strtok_r(strToken, strDelimit, context);
|
||||
}
|
||||
|
||||
/* Windows API Sets - api-ms-win-core-string-l2-1-0.dll
|
||||
* http://msdn.microsoft.com/en-us/library/hh802935/
|
||||
*/
|
||||
|
@ -205,7 +205,7 @@ void reg_insert_key(Reg* reg, RegKey* key, RegKey* subkey)
|
||||
|
||||
path = _strdup(subkey->name);
|
||||
|
||||
name = strtok_r(path, "\\", &save);
|
||||
name = strtok_s(path, "\\", &save);
|
||||
|
||||
while (name != NULL)
|
||||
{
|
||||
@ -216,7 +216,7 @@ void reg_insert_key(Reg* reg, RegKey* key, RegKey* subkey)
|
||||
subkey->subname = _strdup(name);
|
||||
}
|
||||
|
||||
name = strtok_r(NULL, "\\", &save);
|
||||
name = strtok_s(NULL, "\\", &save);
|
||||
}
|
||||
|
||||
free(path);
|
||||
|
Loading…
Reference in New Issue
Block a user