mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibC: Add stubs for wctype and iswctype
This commit is contained in:
parent
d364abe4d5
commit
c2b47c0676
Notes:
sideshowbarker
2024-07-18 17:09:50 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/c2b47c06760 Pull-request: https://github.com/SerenityOS/serenity/pull/7537
4 changed files with 42 additions and 0 deletions
|
@ -56,6 +56,7 @@ set(LIBC_SOURCES
|
|||
utime.cpp
|
||||
utsname.cpp
|
||||
wchar.cpp
|
||||
wctype.cpp
|
||||
)
|
||||
|
||||
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")
|
||||
|
|
|
@ -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*);
|
||||
|
|
24
Userland/Libraries/LibC/wctype.cpp
Normal file
24
Userland/Libraries/LibC/wctype.cpp
Normal 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();
|
||||
}
|
||||
}
|
16
Userland/Libraries/LibC/wctype.h
Normal file
16
Userland/Libraries/LibC/wctype.h
Normal 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
|
Loading…
Reference in a new issue