__getmainargs last argument is a pointer to new_mode.

This commit is contained in:
Alexandre Julliard 2001-02-21 02:20:08 +00:00
parent 5f195f8c01
commit 3fe81b46d3
3 changed files with 10 additions and 6 deletions

View File

@ -12,7 +12,7 @@ DEFAULT_DEBUG_CHANNEL(crtdll);
/* from msvcrt */ /* from msvcrt */
extern void __cdecl __getmainargs( int *argc, char ***argv, char **environ, 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 */ /* The following data items are not exported from msvcrt */
unsigned int CRTDLL__basemajor_dll; 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 ) 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 );
} }

View File

@ -233,24 +233,26 @@ void MSVCRT_free_args(void)
* __getmainargs (MSVCRT.@) * __getmainargs (MSVCRT.@)
*/ */
void __cdecl MSVCRT___getmainargs(int *argc, char ***argv, char **environ, 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; *argc = MSVCRT___argc;
*argv = MSVCRT___argv; *argv = MSVCRT___argv;
*environ = MSVCRT__environ; *environ = MSVCRT__environ;
MSVCRT__set_new_mode( *new_mode );
} }
/********************************************************************* /*********************************************************************
* __wgetmainargs (MSVCRT.@) * __wgetmainargs (MSVCRT.@)
*/ */
void __cdecl MSVCRT___wgetmainargs(int *argc, WCHAR ***wargv, WCHAR **wenviron, 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; *argc = MSVCRT___argc;
*wargv = MSVCRT___wargv; *wargv = MSVCRT___wargv;
*wenviron = MSVCRT__wenviron; *wenviron = MSVCRT__wenviron;
MSVCRT__set_new_mode( *new_mode );
} }
/********************************************************************* /*********************************************************************

View File

@ -34,6 +34,7 @@ typedef struct __MSVCRT_thread_data
((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y
void MSVCRT__set_errno(int); void MSVCRT__set_errno(int);
int __cdecl MSVCRT__set_new_mode(int mode);
int __cdecl MSVCRT__fcloseall(void); int __cdecl MSVCRT__fcloseall(void);
void *__cdecl MSVCRT_malloc(unsigned int); void *__cdecl MSVCRT_malloc(unsigned int);
void *__cdecl MSVCRT_calloc(unsigned int, unsigned int); void *__cdecl MSVCRT_calloc(unsigned int, unsigned int);