mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:07:34 +00:00
LibC: Implement btowc()
This commit is contained in:
parent
e4fa9c917e
commit
405f3d0aa3
1 changed files with 11 additions and 3 deletions
|
@ -154,10 +154,18 @@ long long wcstoll(const wchar_t*, wchar_t**, int)
|
|||
TODO();
|
||||
}
|
||||
|
||||
wint_t btowc(int)
|
||||
wint_t btowc(int c)
|
||||
{
|
||||
dbgln("FIXME: Implement btowc()");
|
||||
TODO();
|
||||
if (c == EOF) {
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
// Multi-byte sequences in UTF-8 have their highest bit set
|
||||
if (c & (1 << 7)) {
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
return c;
|
||||
}
|
||||
|
||||
size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue