LibC: Add stubs for wctype and iswctype

This commit is contained in:
Tim Schumacher 2021-05-27 12:44:54 +02:00 committed by Linus Groh
parent d364abe4d5
commit c2b47c0676
Notes: sideshowbarker 2024-07-18 17:09:50 +09:00
4 changed files with 42 additions and 0 deletions

View file

@ -56,6 +56,7 @@ set(LIBC_SOURCES
utime.cpp
utsname.cpp
wchar.cpp
wctype.cpp
)
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")

View file

@ -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*);

View file

@ -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();
}
}

View file

@ -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