Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fc186c3b
Commit
fc186c3b
authored
Nov 02, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Implemented _(w)dupenv_s.
parent
356b2d2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
6 deletions
+57
-6
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+2
-2
msvcr80.spec
dlls/msvcr80/msvcr80.spec
+2
-2
msvcr90.spec
dlls/msvcr90/msvcr90.spec
+2
-2
environ.c
dlls/msvcrt/environ.c
+49
-0
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-0
No files found.
dlls/msvcr100/msvcr100.spec
View file @
fc186c3b
...
...
@@ -581,7 +581,7 @@
@ extern _dstbias msvcrt._dstbias
@ cdecl _dup(long) msvcrt._dup
@ cdecl _dup2(long long) msvcrt._dup2
@
stub
_dupenv_s
@
cdecl _dupenv_s(ptr ptr str) msvcrt.
_dupenv_s
@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt
@ stub _ecvt_s
@ cdecl _encoded_null() msvcr90._encoded_null
...
...
@@ -1327,7 +1327,7 @@
@ stub _wctomb_l
@ stub _wctomb_s_l
@ stub _wctype
@
stub
_wdupenv_s
@
cdecl _wdupenv_s(ptr ptr wstr) msvcrt.
_wdupenv_s
@ extern _wenviron msvcrt._wenviron
@ varargs _wexecl(wstr wstr) msvcrt._wexecl
@ varargs _wexecle(wstr wstr) msvcrt._wexecle
...
...
dlls/msvcr80/msvcr80.spec
View file @
fc186c3b
...
...
@@ -421,7 +421,7 @@
@ extern _dstbias msvcrt._dstbias
@ cdecl _dup(long) msvcrt._dup
@ cdecl _dup2(long long) msvcrt._dup2
@
stub
_dupenv_s
@
cdecl _dupenv_s(ptr ptr str) msvcrt.
_dupenv_s
@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt
@ stub _ecvt_s
@ cdecl _encode_pointer(ptr) msvcr90._encode_pointer
...
...
@@ -1180,7 +1180,7 @@
@ stub _wctomb_l
@ stub _wctomb_s_l
@ stub _wctype
@
stub
_wdupenv_s
@
cdecl _wdupenv_s(ptr ptr wstr) msvcrt.
_wdupenv_s
@ extern _wenviron msvcrt._wenviron
@ varargs _wexecl(wstr wstr) msvcrt._wexecl
@ varargs _wexecle(wstr wstr) msvcrt._wexecle
...
...
dlls/msvcr90/msvcr90.spec
View file @
fc186c3b
...
...
@@ -413,7 +413,7 @@
@ extern _dstbias msvcrt._dstbias
@ cdecl _dup(long) msvcrt._dup
@ cdecl _dup2(long long) msvcrt._dup2
@
stub
_dupenv_s
@
cdecl _dupenv_s(ptr ptr str) msvcrt.
_dupenv_s
@ cdecl _ecvt(double long ptr ptr) msvcrt._ecvt
@ stub _ecvt_s
@ cdecl _encode_pointer(ptr) MSVCR90_encode_pointer
...
...
@@ -1167,7 +1167,7 @@
@ stub _wctomb_l
@ stub _wctomb_s_l
@ stub _wctype
@
stub
_wdupenv_s
@
cdecl _wdupenv_s(ptr ptr wstr) msvcrt.
_wdupenv_s
@ extern _wenviron msvcrt._wenviron
@ varargs _wexecl(wstr wstr) msvcrt._wexecl
@ varargs _wexecle(wstr wstr) msvcrt._wexecle
...
...
dlls/msvcrt/environ.c
View file @
fc186c3b
...
...
@@ -212,3 +212,52 @@ int CDECL _wputenv_s(const MSVCRT_wchar_t *name, const MSVCRT_wchar_t *value)
return
ret
;
}
/******************************************************************
* _dupenv_s (MSVCRT.@)
*/
int
_dupenv_s
(
char
**
buffer
,
MSVCRT_size_t
*
numberOfElements
,
const
char
*
varname
)
{
char
*
e
;
MSVCRT_size_t
sz
;
if
(
!
MSVCRT_CHECK_PMT
(
buffer
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
varname
)
||
!
(
e
=
MSVCRT_getenv
(
varname
)))
{
return
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
}
sz
=
strlen
(
e
)
+
1
;
if
(
!
(
*
buffer
=
MSVCRT_malloc
(
sz
)))
{
if
(
numberOfElements
)
*
numberOfElements
=
0
;
return
*
MSVCRT__errno
()
=
MSVCRT_ENOMEM
;
}
strcpy
(
*
buffer
,
e
);
if
(
numberOfElements
)
*
numberOfElements
=
sz
;
return
0
;
}
/******************************************************************
* _wdupenv_s (MSVCRT.@)
*/
int
_wdupenv_s
(
MSVCRT_wchar_t
**
buffer
,
MSVCRT_size_t
*
numberOfElements
,
const
MSVCRT_wchar_t
*
varname
)
{
MSVCRT_wchar_t
*
e
;
MSVCRT_size_t
sz
;
if
(
!
MSVCRT_CHECK_PMT
(
buffer
!=
NULL
)
||
!
MSVCRT_CHECK_PMT
(
varname
)
||
!
(
e
=
_wgetenv
(
varname
)))
{
return
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
}
sz
=
strlenW
(
e
)
+
1
;
if
(
!
(
*
buffer
=
MSVCRT_malloc
(
sz
*
sizeof
(
MSVCRT_wchar_t
))))
{
if
(
numberOfElements
)
*
numberOfElements
=
0
;
return
*
MSVCRT__errno
()
=
MSVCRT_ENOMEM
;
}
strcpyW
(
*
buffer
,
e
);
if
(
numberOfElements
)
*
numberOfElements
=
sz
;
return
0
;
}
dlls/msvcrt/msvcrt.spec
View file @
fc186c3b
...
...
@@ -1480,3 +1480,5 @@
@ cdecl _wcstod_l(wstr ptr) MSVCRT__wcstod_l
@ cdecl ___mb_cur_max_l_func(ptr)
@ cdecl _set_purecall_handler(ptr)
@ cdecl _dupenv_s(ptr ptr str)
@ cdecl _wdupenv_s(ptr ptr str)
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