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
5ab5e1c5
Commit
5ab5e1c5
authored
Feb 20, 2001
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 20, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix prototypes of MSVCRT___getmainargs and MSVCRT___wgetmainargs.
Protect MSVCRT__acmdln global variable from corruption.
parent
9f758cc5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
data.c
dlls/msvcrt/data.c
+16
-8
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+2
-2
No files found.
dlls/msvcrt/data.c
View file @
5ab5e1c5
...
...
@@ -142,8 +142,13 @@ void MSVCRT_init_args(void)
int
xargc
,
end
,
last_arg
,
afterlastspace
;
DWORD
version
;
MSVCRT__acmdln
=
cmdline
=
MSVCRT__strdup
(
GetCommandLineA
()
);
MSVCRT__wcmdln
=
wcmdline
=
wstrdupa
(
cmdline
);
MSVCRT__acmdln
=
MSVCRT__strdup
(
GetCommandLineA
()
);
MSVCRT__wcmdln
=
wcmdline
=
wstrdupa
(
MSVCRT__acmdln
);
/* Make a copy of MSVCRT__acmdln to be able modify it.
We will free it at the end of processing. */
cmdline
=
MSVCRT__strdup
(
MSVCRT__acmdln
);
TRACE
(
"got '%s', wide = '%s'
\n
"
,
cmdline
,
debugstr_w
(
wcmdline
));
version
=
GetVersion
();
...
...
@@ -207,6 +212,9 @@ void MSVCRT_init_args(void)
MSVCRT___argv
=
xargv
;
MSVCRT___wargv
=
wxargv
;
/* Free a no more needed copy of the command line */
MSVCRT_free
(
cmdline
);
TRACE
(
"found %d arguments
\n
"
,
MSVCRT___argc
);
MSVCRT__environ
=
GetEnvironmentStringsA
();
MSVCRT___initenv
=
&
MSVCRT__environ
;
...
...
@@ -224,25 +232,25 @@ void MSVCRT_free_args(void)
/*********************************************************************
* __getmainargs (MSVCRT.@)
*/
char
**
__cdecl
MSVCRT___getmainargs
(
DWORD
*
argc
,
char
***
argv
,
char
**
environ
,
DWORD
flag
)
void
__cdecl
MSVCRT___getmainargs
(
int
*
argc
,
char
***
argv
,
char
**
environ
,
int
expand_wildcards
,
void
*
_startupinfo
)
{
TRACE
(
"(%p,%p,%p,%
ld).
\n
"
,
argc
,
argv
,
environ
,
flag
);
TRACE
(
"(%p,%p,%p,%
d,%p).
\n
"
,
argc
,
argv
,
environ
,
expand_wildcards
,
_startupinfo
);
*
argc
=
MSVCRT___argc
;
*
argv
=
MSVCRT___argv
;
*
environ
=
MSVCRT__environ
;
return
environ
;
}
/*********************************************************************
* __wgetmainargs (MSVCRT.@)
*/
WCHAR
**
__cdecl
MSVCRT___wgetmainargs
(
DWORD
*
argc
,
WCHAR
***
wargv
,
WCHAR
**
wenviron
,
DWORD
flag
)
void
__cdecl
MSVCRT___wgetmainargs
(
int
*
argc
,
WCHAR
***
wargv
,
WCHAR
**
wenviron
,
int
expand_wildcards
,
void
*
_startupinfo
)
{
TRACE
(
"(%p,%p,%p,%
ld).
\n
"
,
argc
,
wargv
,
wenviron
,
flag
);
TRACE
(
"(%p,%p,%p,%
d,%p).
\n
"
,
argc
,
wargv
,
wenviron
,
expand_wildcards
,
_startupinfo
);
*
argc
=
MSVCRT___argc
;
*
wargv
=
MSVCRT___wargv
;
*
wenviron
=
MSVCRT__wenviron
;
return
wenviron
;
}
/*********************************************************************
...
...
dlls/msvcrt/msvcrt.spec
View file @
5ab5e1c5
...
...
@@ -96,7 +96,7 @@ debug_channels (msvcrt)
@ cdecl __dllonexit(ptr ptr ptr) MSVCRT___dllonexit
@ cdecl __doserrno() MSVCRT___doserrno
@ stub __fpecode #()
@ cdecl __getmainargs(ptr ptr ptr long) MSVCRT___getmainargs
@ cdecl __getmainargs(ptr ptr ptr long
ptr
) MSVCRT___getmainargs
@ extern __initenv MSVCRT___initenv
@ cdecl __isascii(long) MSVCRT___isascii
@ cdecl __iscsym(long) MSVCRT___iscsym
...
...
@@ -147,7 +147,7 @@ debug_channels (msvcrt)
@ cdecl __unDNameEx() MSVCRT___unDNameEx #FIXME
@ extern __unguarded_readlc_active MSVCRT___unguarded_readlc_active
@ extern __wargv MSVCRT___wargv
@ cdecl __wgetmainargs(ptr ptr ptr long) MSVCRT___wgetmainargs
@ cdecl __wgetmainargs(ptr ptr ptr long
ptr
) MSVCRT___wgetmainargs
@ extern __winitenv MSVCRT___winitenv
@ cdecl _abnormal_termination() MSVCRT__abnormal_termination
@ cdecl _access(str long) MSVCRT__access
...
...
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