From c7a4ea9d489b99787a22106ae53387f138002dcf Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 11 Apr 2026 10:10:13 +0300 Subject: [PATCH] [CRT] Remove _mbstrlen --- sdk/lib/crt/CMakeLists.txt | 1 - sdk/lib/crt/libcntpr.cmake | 1 - sdk/lib/crt/mbstring/mbstring.cmake | 4 ---- sdk/lib/crt/mbstring/mbstrlen.c | 37 ----------------------------- 4 files changed, 43 deletions(-) delete mode 100644 sdk/lib/crt/mbstring/mbstring.cmake delete mode 100644 sdk/lib/crt/mbstring/mbstrlen.c diff --git a/sdk/lib/crt/CMakeLists.txt b/sdk/lib/crt/CMakeLists.txt index 3b41fb6663a..eed421d9055 100644 --- a/sdk/lib/crt/CMakeLists.txt +++ b/sdk/lib/crt/CMakeLists.txt @@ -6,7 +6,6 @@ add_definitions(-D_CRTBLD) include(except/except.cmake) include(float/float.cmake) include(math/math.cmake) -include(mbstring/mbstring.cmake) include(mem/mem.cmake) include(misc/misc.cmake) include(printf/printf.cmake) diff --git a/sdk/lib/crt/libcntpr.cmake b/sdk/lib/crt/libcntpr.cmake index 470cc5854a6..9457145fd52 100644 --- a/sdk/lib/crt/libcntpr.cmake +++ b/sdk/lib/crt/libcntpr.cmake @@ -3,7 +3,6 @@ list(APPEND LIBCNTPR_SOURCE ${LIBCNTPR_EXCEPT_SOURCE} ${LIBCNTPR_FLOAT_SOURCE} ${LIBCNTPR_MATH_SOURCE} - ${LIBCNTPR_MBSTRING_SOURCE} ${LIBCNTPR_MEM_SOURCE} ${LIBCNTPT_MISC_SOURCE} ${LIBCNTPR_PRINTF_SOURCE} diff --git a/sdk/lib/crt/mbstring/mbstring.cmake b/sdk/lib/crt/mbstring/mbstring.cmake deleted file mode 100644 index 46427c9aad3..00000000000 --- a/sdk/lib/crt/mbstring/mbstring.cmake +++ /dev/null @@ -1,4 +0,0 @@ - -list(APPEND LIBCNTPR_MBSTRING_SOURCE - mbstring/mbstrlen.c -) diff --git a/sdk/lib/crt/mbstring/mbstrlen.c b/sdk/lib/crt/mbstring/mbstrlen.c deleted file mode 100644 index ace65ed8f20..00000000000 --- a/sdk/lib/crt/mbstring/mbstrlen.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/sdk/crt/mbstring/mbstrlen.c - * PURPOSE: Determines the length of a multi byte string, current locale - * PROGRAMERS: - * Copyright 1999 Alexandre Julliard - * Copyright 2000 Jon Griffths - * - */ - -#include -#include - -#ifdef _LIBCNT_ -unsigned short *NlsLeadByteInfo; -#define isleadbyte(c) NlsLeadByteInfo[c] -#else -int isleadbyte(int byte); -#endif - -/* - * @implemented - */ -size_t __cdecl _mbstrlen( const char *str ) -{ - size_t len = 0; - while(*str) - { - /* FIXME: According to the documentation we are supposed to test for - * multi-byte character validity. Whatever that means - */ - str += isleadbyte((unsigned char)*str) ? 2 : 1; - len++; - } - return len; -}