Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
d6f25d70
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
9 个月 前同步成功
通知
8
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d6f25d70
编写于
11月 01, 2005
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix numerous bugs in the Win32 path splitter
上级
b02da8eb
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
29 addition
and
5 deletion
+29
-5
crypto/dso/dso_win32.c
crypto/dso/dso_win32.c
+29
-5
未找到文件。
crypto/dso/dso_win32.c
浏览文件 @
d6f25d70
...
...
@@ -313,6 +313,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
struct
file_st
*
result
=
NULL
;
enum
{
IN_NODE
,
IN_DEVICE
,
IN_FILE
}
position
;
const
char
*
start
=
filename
;
char
last
;
if
(
!
filename
)
{
...
...
@@ -343,7 +344,8 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
do
{
switch
(
filename
[
0
])
last
=
filename
[
0
];
switch
(
last
)
{
case
':'
:
if
(
position
!=
IN_DEVICE
)
...
...
@@ -368,10 +370,19 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
start
=
++
filename
;
result
->
dir
=
start
;
}
else
if
(
position
==
IN_DEVICE
)
{
position
=
IN_FILE
;
filename
++
;
result
->
dir
=
start
;
result
->
dirlen
=
filename
-
start
;
start
=
filename
;
}
else
{
filename
++
;
result
->
dirlen
+=
filename
-
start
;
start
=
filename
;
}
break
;
case
'\0'
:
...
...
@@ -385,12 +396,19 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
{
if
(
assume_last_is_dir
)
{
result
->
devicelen
+=
filename
-
start
;
if
(
position
==
IN_DEVICE
)
{
result
->
dir
=
start
;
result
->
dirlen
=
0
;
}
result
->
dirlen
+=
filename
-
start
;
}
else
{
result
->
file
=
start
;
result
->
filelen
=
filename
-
start
;
result
->
filelen
=
filename
-
start
;
}
}
}
...
...
@@ -400,7 +418,7 @@ static struct file_st *win32_splitter(DSO *dso, const char *filename,
break
;
}
}
while
(
*
filename
);
while
(
last
);
if
(
!
result
->
nodelen
)
result
->
node
=
NULL
;
if
(
!
result
->
devicelen
)
result
->
device
=
NULL
;
...
...
@@ -488,10 +506,13 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
result
[
offset
]
=
'\\'
;
offset
++
;
start
=
end
+
1
;
}
#if 0 /* Not needed, since the directory converter above already appeneded
a backslash */
if(file_split->predir && (file_split->dir || file_split->file))
{
result[offset] = '\\'; offset++;
}
#endif
start
=
file_split
->
dir
;
while
(
file_split
->
dirlen
>
(
start
-
file_split
->
dir
))
{
...
...
@@ -506,10 +527,13 @@ static char *win32_joiner(DSO *dso, const struct file_st *file_split)
result
[
offset
]
=
'\\'
;
offset
++
;
start
=
end
+
1
;
}
#if 0 /* Not needed, since the directory converter above already appeneded
a backslash */
if(file_split->dir && file_split->file)
{
result[offset] = '\\'; offset++;
}
#endif
strncpy
(
&
result
[
offset
],
file_split
->
file
,
file_split
->
filelen
);
offset
+=
file_split
->
filelen
;
result
[
offset
]
=
'\0'
;
...
...
@@ -560,7 +584,7 @@ static char *win32_merger(DSO *dso, const char *filespec1, const char *filespec2
return
(
NULL
);
}
filespec2_split
=
win32_splitter
(
dso
,
filespec2
,
0
);
if
(
!
filespec
1
_split
)
if
(
!
filespec
2
_split
)
{
DSOerr
(
DSO_F_WIN32_MERGER
,
ERR_R_MALLOC_FAILURE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录