Commit 3fe81b46 authored by Alexandre Julliard's avatar Alexandre Julliard

__getmainargs last argument is a pointer to new_mode.

parent 5f195f8c
......@@ -12,7 +12,7 @@ DEFAULT_DEBUG_CHANNEL(crtdll);
/* from msvcrt */
extern void __cdecl __getmainargs( int *argc, char ***argv, char **environ,
int expand_wildcards, void *_startupinfo );
int expand_wildcards, int *new_mode );
/* The following data items are not exported from msvcrt */
unsigned int CRTDLL__basemajor_dll;
......@@ -52,5 +52,6 @@ BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
*/
void __cdecl __GetMainArgs( int *argc, char ***argv, char **environ, int expand_wildcards )
{
__getmainargs( argc, argv, environ, expand_wildcards, NULL );
int new_mode = 0;
__getmainargs( argc, argv, environ, expand_wildcards, &new_mode );
}
......@@ -233,24 +233,26 @@ void MSVCRT_free_args(void)
* __getmainargs (MSVCRT.@)
*/
void __cdecl MSVCRT___getmainargs(int *argc, char ***argv, char **environ,
int expand_wildcards, void *_startupinfo)
int expand_wildcards, int *new_mode)
{
TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, environ, expand_wildcards, _startupinfo);
TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, environ, expand_wildcards, new_mode);
*argc = MSVCRT___argc;
*argv = MSVCRT___argv;
*environ = MSVCRT__environ;
MSVCRT__set_new_mode( *new_mode );
}
/*********************************************************************
* __wgetmainargs (MSVCRT.@)
*/
void __cdecl MSVCRT___wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron,
int expand_wildcards, void *_startupinfo)
int expand_wildcards, int *new_mode)
{
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenviron, expand_wildcards, _startupinfo);
TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenviron, expand_wildcards, new_mode);
*argc = MSVCRT___argc;
*wargv = MSVCRT___wargv;
*wenviron = MSVCRT__wenviron;
MSVCRT__set_new_mode( *new_mode );
}
/*********************************************************************
......
......@@ -34,6 +34,7 @@ typedef struct __MSVCRT_thread_data
((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y
void MSVCRT__set_errno(int);
int __cdecl MSVCRT__set_new_mode(int mode);
int __cdecl MSVCRT__fcloseall(void);
void *__cdecl MSVCRT_malloc(unsigned int);
void *__cdecl MSVCRT_calloc(unsigned int, unsigned int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment