mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibC: Add strcoll() and strxfrm().
These are obviously not locale-aware implementations, but rather really just strcmp() and strcpy() with different names. This makes vim build and run :^)
This commit is contained in:
parent
052be28c3b
commit
9f633a1871
1 changed files with 15 additions and 0 deletions
|
@ -369,5 +369,20 @@ char *strtok(char* str, const char* delim)
|
|||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
int strcoll(const char* s1, const char* s2)
|
||||
{
|
||||
return strcmp(s1, s2);
|
||||
}
|
||||
|
||||
size_t strxfrm(char* dest, const char* src, size_t n)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < n && src[i] != '\0'; ++i)
|
||||
dest[i] = src[i];
|
||||
for ( ; i < n; ++i)
|
||||
dest[i] = '\0';
|
||||
return i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue