mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Remove old mystrtok_r for MinGW
This commit is contained in:
parent
e73eed247e
commit
b146673c3d
3 changed files with 0 additions and 32 deletions
|
@ -55,11 +55,6 @@
|
|||
#define strncasecmp(x, y, n) strnicmp(x, y, n)
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
// was broken in 2013, unclear if still needed
|
||||
#define strtok_r(x, y, z) mystrtok_r(x, y, z)
|
||||
#endif
|
||||
|
||||
#if !HAVE_STRLCPY
|
||||
#define strlcpy(d, s, n) mystrlcpy(d, s, n)
|
||||
#endif
|
||||
|
|
|
@ -292,32 +292,6 @@ size_t mystrlcpy(char *dst, const char *src, size_t size) noexcept
|
|||
return srclen;
|
||||
}
|
||||
|
||||
char *mystrtok_r(char *s, const char *sep, char **lasts) noexcept
|
||||
{
|
||||
char *t;
|
||||
|
||||
if (!s)
|
||||
s = *lasts;
|
||||
|
||||
while (*s && strchr(sep, *s))
|
||||
s++;
|
||||
|
||||
if (!*s)
|
||||
return nullptr;
|
||||
|
||||
t = s;
|
||||
while (*t) {
|
||||
if (strchr(sep, *t)) {
|
||||
*t++ = '\0';
|
||||
break;
|
||||
}
|
||||
t++;
|
||||
}
|
||||
|
||||
*lasts = t;
|
||||
return s;
|
||||
}
|
||||
|
||||
u64 read_seed(const char *str)
|
||||
{
|
||||
char *endptr = nullptr;
|
||||
|
|
|
@ -84,7 +84,6 @@ u32 readFlagString(std::string str, const FlagDesc *flagdesc, u32 *flagmask);
|
|||
std::string writeFlagString(u32 flags, const FlagDesc *flagdesc, u32 flagmask);
|
||||
|
||||
size_t mystrlcpy(char *dst, const char *src, size_t size) noexcept;
|
||||
char *mystrtok_r(char *s, const char *sep, char **lasts) noexcept;
|
||||
|
||||
/// @brief turn string into a map seed. either directly if it's a number or by hashing it.
|
||||
u64 read_seed(const char *str);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue