mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 15:55:07 +00:00
LibC: Add stubs for wctype and iswctype
This commit is contained in:
parent
d364abe4d5
commit
c2b47c0676
4 changed files with 42 additions and 0 deletions
|
@ -56,6 +56,7 @@ set(LIBC_SOURCES
|
||||||
utime.cpp
|
utime.cpp
|
||||||
utsname.cpp
|
utsname.cpp
|
||||||
wchar.cpp
|
wchar.cpp
|
||||||
|
wctype.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")
|
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")
|
||||||
|
|
|
@ -16,6 +16,7 @@ __BEGIN_DECLS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef __WINT_TYPE__ wint_t;
|
typedef __WINT_TYPE__ wint_t;
|
||||||
|
typedef unsigned long int wctype_t;
|
||||||
|
|
||||||
size_t wcslen(const wchar_t*);
|
size_t wcslen(const wchar_t*);
|
||||||
wchar_t* wcscpy(wchar_t*, 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…
Add table
Add a link
Reference in a new issue