Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
58dd97ef
Commit
58dd97ef
authored
Jun 25, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Jun 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implement _wmakepath_s.
parent
9628a0d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
8 deletions
+113
-8
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
dir.c
dlls/msvcrt/dir.c
+104
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
dir.c
dlls/msvcrt/tests/dir.c
+0
-0
stdlib.h
include/msvcrt/stdlib.h
+1
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
58dd97ef
...
@@ -1310,8 +1310,8 @@
...
@@ -1310,8 +1310,8 @@
@ stub _wgetdcwd_nolock
@ stub _wgetdcwd_nolock
@ cdecl _wgetenv(wstr) msvcrt._wgetenv
@ cdecl _wgetenv(wstr) msvcrt._wgetenv
@ stub _wgetenv_s
@ stub _wgetenv_s
@ cdecl _wmakepath(
ws
tr wstr wstr wstr wstr) msvcrt._wmakepath
@ cdecl _wmakepath(
p
tr wstr wstr wstr wstr) msvcrt._wmakepath
@
stub
_wmakepath_s
@
cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt.
_wmakepath_s
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ stub _wmktemp_s
@ stub _wmktemp_s
...
...
dlls/msvcr80/msvcr80.spec
View file @
58dd97ef
...
@@ -1159,8 +1159,8 @@
...
@@ -1159,8 +1159,8 @@
@ extern _winmajor msvcrt._winmajor
@ extern _winmajor msvcrt._winmajor
@ extern _winminor msvcrt._winminor
@ extern _winminor msvcrt._winminor
@ extern _winver msvcrt._winver
@ extern _winver msvcrt._winver
@ cdecl _wmakepath(
ws
tr wstr wstr wstr wstr) msvcrt._wmakepath
@ cdecl _wmakepath(
p
tr wstr wstr wstr wstr) msvcrt._wmakepath
@
stub
_wmakepath_s
@
cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt.
_wmakepath_s
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ stub _wmktemp_s
@ stub _wmktemp_s
...
...
dlls/msvcr90/msvcr90.spec
View file @
58dd97ef
...
@@ -1143,8 +1143,8 @@
...
@@ -1143,8 +1143,8 @@
@ stub _wgetdcwd_nolock
@ stub _wgetdcwd_nolock
@ cdecl _wgetenv(wstr) msvcrt._wgetenv
@ cdecl _wgetenv(wstr) msvcrt._wgetenv
@ stub _wgetenv_s
@ stub _wgetenv_s
@ cdecl _wmakepath(
ws
tr wstr wstr wstr wstr) msvcrt._wmakepath
@ cdecl _wmakepath(
p
tr wstr wstr wstr wstr) msvcrt._wmakepath
@
stub
_wmakepath_s
@
cdecl _wmakepath_s(ptr long wstr wstr wstr wstr) msvcrt.
_wmakepath_s
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmkdir(wstr) msvcrt._wmkdir
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ cdecl _wmktemp(wstr) msvcrt._wmktemp
@ stub _wmktemp_s
@ stub _wmktemp_s
...
...
dlls/msvcrt/dir.c
View file @
58dd97ef
...
@@ -1182,6 +1182,110 @@ range:
...
@@ -1182,6 +1182,110 @@ range:
}
}
/*********************************************************************
/*********************************************************************
* _wmakepath_s (MSVCRT.@)
*
* Safe version of _wmakepath.
*/
int
CDECL
_wmakepath_s
(
MSVCRT_wchar_t
*
path
,
MSVCRT_size_t
size
,
const
MSVCRT_wchar_t
*
drive
,
const
MSVCRT_wchar_t
*
directory
,
const
MSVCRT_wchar_t
*
filename
,
const
MSVCRT_wchar_t
*
extension
)
{
MSVCRT_wchar_t
*
p
=
path
;
if
(
!
path
||
!
size
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
return
MSVCRT_EINVAL
;
}
if
(
drive
&&
drive
[
0
])
{
if
(
size
<=
2
)
goto
range
;
*
p
++
=
drive
[
0
];
*
p
++
=
':'
;
size
-=
2
;
}
if
(
directory
&&
directory
[
0
])
{
unsigned
int
len
=
strlenW
(
directory
);
unsigned
int
needs_separator
=
directory
[
len
-
1
]
!=
'/'
&&
directory
[
len
-
1
]
!=
'\\'
;
unsigned
int
copylen
=
min
(
size
-
1
,
len
);
if
(
size
<
2
)
goto
range
;
memmove
(
p
,
directory
,
copylen
*
sizeof
(
MSVCRT_wchar_t
));
if
(
size
<=
len
)
goto
range
;
p
+=
copylen
;
size
-=
copylen
;
if
(
needs_separator
)
{
if
(
size
<
2
)
goto
range
;
*
p
++
=
'\\'
;
size
-=
1
;
}
}
if
(
filename
&&
filename
[
0
])
{
unsigned
int
len
=
strlenW
(
filename
);
unsigned
int
copylen
=
min
(
size
-
1
,
len
);
if
(
size
<
2
)
goto
range
;
memmove
(
p
,
filename
,
copylen
*
sizeof
(
MSVCRT_wchar_t
));
if
(
size
<=
len
)
goto
range
;
p
+=
len
;
size
-=
len
;
}
if
(
extension
&&
extension
[
0
])
{
unsigned
int
len
=
strlenW
(
extension
);
unsigned
int
needs_period
=
extension
[
0
]
!=
'.'
;
unsigned
int
copylen
;
if
(
size
<
2
)
goto
range
;
if
(
needs_period
)
{
*
p
++
=
'.'
;
size
-=
1
;
}
copylen
=
min
(
size
-
1
,
len
);
memcpy
(
p
,
extension
,
copylen
*
sizeof
(
MSVCRT_wchar_t
));
if
(
size
<=
len
)
goto
range
;
p
+=
copylen
;
}
*
p
=
'\0'
;
return
0
;
range:
path
[
0
]
=
'\0'
;
*
MSVCRT__errno
()
=
MSVCRT_ERANGE
;
return
MSVCRT_ERANGE
;
}
/*********************************************************************
* _searchenv (MSVCRT.@)
* _searchenv (MSVCRT.@)
*
*
* Search for a file in a list of paths from an environment variable.
* Search for a file in a list of paths from an environment variable.
...
...
dlls/msvcrt/msvcrt.spec
View file @
58dd97ef
...
@@ -1089,8 +1089,8 @@
...
@@ -1089,8 +1089,8 @@
@ extern _winminor MSVCRT__winminor
@ extern _winminor MSVCRT__winminor
# stub _winput_s
# stub _winput_s
@ extern _winver MSVCRT__winver
@ extern _winver MSVCRT__winver
@ cdecl _wmakepath(
ws
tr wstr wstr wstr wstr)
@ cdecl _wmakepath(
p
tr wstr wstr wstr wstr)
# stub _wmakepath_s
@ cdecl _wmakepath_s(ptr long wstr wstr wstr wstr)
@ cdecl _wmkdir(wstr)
@ cdecl _wmkdir(wstr)
@ cdecl _wmktemp(wstr)
@ cdecl _wmktemp(wstr)
# stub _wmktemp_s
# stub _wmktemp_s
...
...
dlls/msvcrt/tests/dir.c
View file @
58dd97ef
This diff is collapsed.
Click to expand it.
include/msvcrt/stdlib.h
View file @
58dd97ef
...
@@ -205,6 +205,7 @@ wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
...
@@ -205,6 +205,7 @@ wchar_t* __cdecl _ultow(__msvcrt_ulong,wchar_t*,int);
wchar_t
*
__cdecl
_wfullpath
(
wchar_t
*
,
const
wchar_t
*
,
size_t
);
wchar_t
*
__cdecl
_wfullpath
(
wchar_t
*
,
const
wchar_t
*
,
size_t
);
wchar_t
*
__cdecl
_wgetenv
(
const
wchar_t
*
);
wchar_t
*
__cdecl
_wgetenv
(
const
wchar_t
*
);
void
__cdecl
_wmakepath
(
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
);
void
__cdecl
_wmakepath
(
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
);
int
__cdecl
_wmakepath_s
(
wchar_t
*
,
size_t
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
,
const
wchar_t
*
);
void
__cdecl
_wperror
(
const
wchar_t
*
);
void
__cdecl
_wperror
(
const
wchar_t
*
);
int
__cdecl
_wputenv
(
const
wchar_t
*
);
int
__cdecl
_wputenv
(
const
wchar_t
*
);
void
__cdecl
_wsearchenv
(
const
wchar_t
*
,
const
wchar_t
*
,
wchar_t
*
);
void
__cdecl
_wsearchenv
(
const
wchar_t
*
,
const
wchar_t
*
,
wchar_t
*
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment