File tree Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Expand file tree Collapse file tree 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ // ===-- Implementation of mbstowcs ----------------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ #include " src/wchar/mbstowcs.h"
10+
11+ #include " hdr/types/size_t.h"
12+ #include " hdr/types/wchar_t.h"
13+ #include " src/__support/common.h"
14+ #include " src/__support/libc_errno.h"
15+ #include " src/__support/macros/config.h"
16+ #include " src/__support/wchar/mbstate.h"
17+ #include " src/__support/wchar/string_converter.h"
18+
19+ namespace LIBC_NAMESPACE_DECL {
20+
21+ LLVM_LIBC_FUNCTION (int , mbstowcs,
22+ (wchar_t *__restrict pwcs, const char *__restrict s,
23+ size_t n)) {
24+ static internal::mbstate internal_mbstate;
25+ internal::StringConverter<char8_t > str_conv (
26+ reinterpret_cast <const char8_t *>(pwcs), &internal_mbstate, n);
27+ }
28+
29+ } // namespace LIBC_NAMESPACE_DECL
Original file line number Diff line number Diff line change 1+ // ===-- Implementation header for mbstowcs --------------------------------===//
2+ //
3+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+ // See https://llvm.org/LICENSE.txt for license information.
5+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+ //
7+ // ===----------------------------------------------------------------------===//
8+
9+ #ifndef LLVM_LIBC_SRC_WCHAR_MBSTOWCS_H
10+ #define LLVM_LIBC_SRC_WCHAR_MBSTOWCS_H
11+
12+ #include " hdr/types/size_t.h"
13+ #include " hdr/types/wchar_t.h"
14+ #include " src/__support/macros/config.h"
15+
16+ namespace LIBC_NAMESPACE_DECL {
17+
18+ int mbstowcs (wchar_t *__restrict pwcs, const char *__restrict s, size_t n);
19+
20+ } // namespace LIBC_NAMESPACE_DECL
21+
22+ #endif // LLVM_LIBC_SRC_WCHAR_MBSTOWCS_H
You can’t perform that action at this time.
0 commit comments