diff options
author | Tim Schumacher <timschumi@gmx.de> | 2021-05-27 12:44:54 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-05-30 14:56:50 +0100 |
commit | c2b47c0676073678e9921a7eb37616af179d25da (patch) | |
tree | dd64594532e2427a2ee337f217f6c5a73d476a36 /Userland | |
parent | d364abe4d5ebd417757783474e88a1b154c3e0d6 (diff) | |
download | serenity-c2b47c0676073678e9921a7eb37616af179d25da.zip |
LibC: Add stubs for wctype and iswctype
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibC/wchar.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibC/wctype.cpp | 24 | ||||
-rw-r--r-- | Userland/Libraries/LibC/wctype.h | 16 |
4 files changed, 42 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt index f5d9722bc7..99a640b194 100644 --- a/Userland/Libraries/LibC/CMakeLists.txt +++ b/Userland/Libraries/LibC/CMakeLists.txt @@ -56,6 +56,7 @@ set(LIBC_SOURCES utime.cpp utsname.cpp wchar.cpp + wctype.cpp ) file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp") diff --git a/Userland/Libraries/LibC/wchar.h b/Userland/Libraries/LibC/wchar.h index 551b8b2300..35b192f939 100644 --- a/Userland/Libraries/LibC/wchar.h +++ b/Userland/Libraries/LibC/wchar.h @@ -16,6 +16,7 @@ __BEGIN_DECLS #endif typedef __WINT_TYPE__ wint_t; +typedef unsigned long int wctype_t; size_t wcslen(const wchar_t*); wchar_t* wcscpy(wchar_t*, const wchar_t*); diff --git a/Userland/Libraries/LibC/wctype.cpp b/Userland/Libraries/LibC/wctype.cpp new file mode 100644 index 0000000000..7a68b7c389 --- /dev/null +++ b/Userland/Libraries/LibC/wctype.cpp @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2021, the SerenityOS developers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <AK/Format.h> +#include <assert.h> +#include <wctype.h> + +extern "C" { + +wctype_t wctype(const char*) +{ + dbgln("FIXME: Implement wctype()"); + TODO(); +} + +int iswctype(wint_t, wctype_t) +{ + dbgln("FIXME: Implement iswctype()"); + TODO(); +} +} diff --git a/Userland/Libraries/LibC/wctype.h b/Userland/Libraries/LibC/wctype.h new file mode 100644 index 0000000000..6d91f8cc71 --- /dev/null +++ b/Userland/Libraries/LibC/wctype.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2021, the SerenityOS developers + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#include <wchar.h> + +__BEGIN_DECLS + +wctype_t wctype(const char* name); +int iswctype(wint_t wc, wctype_t desc); + +__END_DECLS |