Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Musl
提交
ad4a5367
T
Third Party Musl
项目概览
OpenHarmony
/
Third Party Musl
大约 1 年 前同步成功
通知
37
Star
125
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Musl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ad4a5367
编写于
7月 24, 2013
作者:
R
Rich Felker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update strxfrm/wcsxfrm for future LC_COLLATE support and ABI compat
上级
4350935c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
14 deletion
+20
-14
src/locale/strxfrm.c
src/locale/strxfrm.c
+10
-1
src/locale/strxfrm_l.c
src/locale/strxfrm_l.c
+0
-6
src/locale/wcsxfrm.c
src/locale/wcsxfrm.c
+10
-1
src/locale/wcsxfrm_l.c
src/locale/wcsxfrm_l.c
+0
-6
未找到文件。
src/locale/strxfrm.c
浏览文件 @
ad4a5367
#include <string.h>
#include <string.h>
#include <locale.h>
#include "libc.h"
/* collate only by code points */
/* collate only by code points */
size_t
strxfrm
(
char
*
restrict
dest
,
const
char
*
restrict
src
,
size_t
n
)
size_t
__strxfrm_l
(
char
*
restrict
dest
,
const
char
*
restrict
src
,
size_t
n
,
locale_t
loc
)
{
{
size_t
l
=
strlen
(
src
);
size_t
l
=
strlen
(
src
);
if
(
n
>
l
)
strcpy
(
dest
,
src
);
if
(
n
>
l
)
strcpy
(
dest
,
src
);
return
l
;
return
l
;
}
}
size_t
strxfrm
(
char
*
restrict
dest
,
const
char
*
restrict
src
,
size_t
n
)
{
return
__strxfrm_l
(
dest
,
src
,
n
,
LC_GLOBAL_LOCALE
);
}
weak_alias
(
__strxfrm_l
,
strxfrm_l
);
src/locale/strxfrm_l.c
已删除
100644 → 0
浏览文件 @
4350935c
#include <string.h>
size_t
strxfrm_l
(
char
*
restrict
dest
,
const
char
*
restrict
src
,
size_t
n
,
locale_t
l
)
{
return
strxfrm
(
dest
,
src
,
n
);
}
src/locale/wcsxfrm.c
浏览文件 @
ad4a5367
#include <wchar.h>
#include <wchar.h>
#include <locale.h>
#include "libc.h"
/* collate only by code points */
/* collate only by code points */
size_t
wcsxfrm
(
wchar_t
*
restrict
dest
,
const
wchar_t
*
restrict
src
,
size_t
n
)
size_t
__wcsxfrm_l
(
wchar_t
*
restrict
dest
,
const
wchar_t
*
restrict
src
,
size_t
n
,
locale_t
loc
)
{
{
size_t
l
=
wcslen
(
src
);
size_t
l
=
wcslen
(
src
);
if
(
l
>=
n
)
{
if
(
l
>=
n
)
{
...
@@ -10,3 +12,10 @@ size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n)
...
@@ -10,3 +12,10 @@ size_t wcsxfrm(wchar_t *restrict dest, const wchar_t *restrict src, size_t n)
}
else
wcscpy
(
dest
,
src
);
}
else
wcscpy
(
dest
,
src
);
return
l
;
return
l
;
}
}
size_t
wcsxfrm
(
wchar_t
*
restrict
dest
,
const
wchar_t
*
restrict
src
,
size_t
n
)
{
return
__wcsxfrm_l
(
dest
,
src
,
n
,
LC_GLOBAL_LOCALE
);
}
weak_alias
(
__wcsxfrm_l
,
wcsxfrm_l
);
src/locale/wcsxfrm_l.c
已删除
100644 → 0
浏览文件 @
4350935c
#include <wchar.h>
size_t
wcsxfrm_l
(
wchar_t
*
restrict
dest
,
const
wchar_t
*
restrict
src
,
size_t
n
,
locale_t
locale
)
{
return
wcsxfrm
(
dest
,
src
,
n
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录