Last change
on this file since 367 was 337, checked in by coas-nagasima, 6 years ago |
ASP3版ECNLを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
529 bytes
|
Rev | Line | |
---|
[337] | 1 | #include <wchar.h>
|
---|
| 2 | #include <locale.h>
|
---|
| 3 | #include "locale_impl.h"
|
---|
| 4 | #include "libc.h"
|
---|
| 5 |
|
---|
| 6 | /* collate only by code points */
|
---|
| 7 | size_t __wcsxfrm_l(wchar_t *restrict dest, const wchar_t *restrict src, size_t n, locale_t loc)
|
---|
| 8 | {
|
---|
| 9 | size_t l = wcslen(src);
|
---|
| 10 | if (l < n) {
|
---|
| 11 | wmemcpy(dest, src, l+1);
|
---|
| 12 | } else if (n) {
|
---|
| 13 | wmemcpy(dest, src, n-1);
|
---|
| 14 | dest[n-1] = 0;
|
---|
| 15 | }
|
---|
| 16 | return l;
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n)
|
---|
| 20 | {
|
---|
| 21 | return __wcsxfrm_l(dest, src, n, CURRENT_LOCALE);
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | weak_alias(__wcsxfrm_l, wcsxfrm_l);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.