From 9f633a1871ac5dbf21fca0a6d1cfd41d4084ca4c Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 3 May 2019 18:17:33 +0200 Subject: [PATCH] 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 :^) --- LibC/string.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/LibC/string.cpp b/LibC/string.cpp index 3b9909b834..43e545852f 100644 --- a/LibC/string.cpp +++ b/LibC/string.cpp @@ -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; +} + }