File tree Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,7 @@ set(TARGET_LIBC_ENTRYPOINTS
386386 libc.src.wchar.wmemchr
387387 libc.src.wchar.wcpcpy
388388 libc.src.wchar.wcpncpy
389+ libc.src.wchar.wcstok
389390
390391 # sys/uio.h entrypoints
391392 libc.src.sys.uio.writev
Original file line number Diff line number Diff line change @@ -189,6 +189,14 @@ functions:
189189 arguments :
190190 - type : wchar_t *__restrict
191191 - type : const wchar_t *__restrict
192+ - name : wcstok
193+ standards :
194+ - stdc
195+ return_type : wchar_t *
196+ arguments :
197+ - type : wchar_t *__restrict
198+ - type : const wchar_t *__restrict
199+ - type : wchar_t** __restrict
192200 - name : wcpcpy
193201 standards :
194202 - stdc
Original file line number Diff line number Diff line change @@ -34,6 +34,16 @@ add_entrypoint_object(
3434 libc.src.__support.wctype_utils
3535)
3636
37+ add_entrypoint_object(
38+ wcstok
39+ SRCS
40+ wcstok.cpp
41+ HDRS
42+ wcstok.h
43+ DEPENDS
44+ libc.hdr.types.wchar_t
45+ )
46+
3747add_entrypoint_object(
3848 wcrtomb
3949 SRCS
Original file line number Diff line number Diff line change 1+ // ===-- Implementation of wcstok ------------------------------------------===//
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/wcstok.h"
10+
11+ #include " hdr/types/wchar_t.h"
12+ #include " src/__support/common.h"
13+
14+ namespace LIBC_NAMESPACE_DECL {
15+
16+ LLVM_LIBC_FUNCTION (wchar_t *, wcstok,
17+ (wchar_t *__restrict str, const wchar_t *__restrict delim,
18+ wchar_t **__restrict ptr)) {
19+
20+ }
21+
22+ } // namespace LIBC_NAMESPACE_DECL
Original file line number Diff line number Diff line change 1+ // ===-- Implementation header for wcstok ----------------------------------===//
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_WCSTOK_H
10+ #define LLVM_LIBC_SRC_WCHAR_WCSTOK_H
11+
12+ #include " hdr/types/wchar_t.h"
13+ #include " src/__support/macros/config.h"
14+
15+ namespace LIBC_NAMESPACE_DECL {
16+
17+ wchar_t *wcstok (wchar_t *__restrict str, const wchar_t *__restrict delim,
18+ wchar_t **__restrict ptr);
19+
20+ } // namespace LIBC_NAMESPACE_DECL
21+
22+ #endif // LLVM_LIBC_SRC_WCHAR_WCSTOK_H
You can’t perform that action at this time.
0 commit comments