ReactOS 0.4.16-dev-2320-ge1853c6
msvcrt20.c File Reference
#include <stdio.h>
Include dependency graph for msvcrt20.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 

Functions

void _cdecl __getmainargs (int *argc, char ***argv, char ***envp, int expand_wildcards, int *new_mode)
 
void _cdecl __wgetmainargs (int *argc, wchar_t ***wargv, wchar_t ***wenvp, int expand_wildcards, int *new_mode)
 
void _cdecl MSVCRT20__getmainargs (int *argc, char ***argv, char ***envp, int expand_wildcards, int new_mode)
 
void _cdecl MSVCRT20__wgetmainargs (int *argc, wchar_t ***wargv, wchar_t ***wenvp, int expand_wildcards, int new_mode)
 

Macro Definition Documentation

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 21 of file msvcrt20.c.

Function Documentation

◆ __getmainargs()

void _cdecl __getmainargs ( int argc,
char ***  argv,
char ***  envp,
int  expand_wildcards,
int new_mode 
)

Definition at line 579 of file data.c.

581{
582 TRACE("(%p,%p,%p,%d,%p).\n", argc, argv, envp, expand_wildcards, new_mode);
583
584 if (expand_wildcards) {
588 if (wargv_expand) {
590
593 }else {
594 expand_wildcards = 0;
595 }
596 }
597 if (!expand_wildcards) {
598#ifdef __REACTOS__
599 if ((MSVCRT___argv == NULL) || (MSVCRT___argc == 0))
600 {
601 MSVCRT___argv = cmdline_to_argvA(MSVCRT__acmdln, &MSVCRT___argc);
602 }
603#else
606#endif
607 }
608
611 *envp = MSVCRT__environ;
612
613 if (new_mode)
614 _set_new_mode( *new_mode );
615 return 0;
616}
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
MonoAssembly int argc
Definition: metahost.c:107
static char ** build_argv(WCHAR **wargv)
Definition: data.c:63
static int initial_argc
Definition: data.c:30
static int build_expanded_wargv(int *argc, wchar_t **argv)
Definition: data.c:471
static int wargc_expand
Definition: data.c:32
char ** MSVCRT___argv
Definition: data.c:50
static WCHAR ** initial_wargv
Definition: data.c:29
int MSVCRT___argc
Definition: data.c:31
char ** MSVCRT__environ
Definition: data.c:55
char * MSVCRT__acmdln
Definition: data.c:53
static wchar_t ** wargv_expand
Definition: data.c:52
int CDECL _set_new_mode(int mode)
Definition: heap.c:227
#define argv
Definition: mplay32.c:18
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by MSVCRT20__getmainargs().

◆ __wgetmainargs()

void _cdecl __wgetmainargs ( int argc,
wchar_t ***  wargv,
wchar_t ***  wenvp,
int  expand_wildcards,
int new_mode 
)

Definition at line 536 of file data.c.

538{
539 TRACE("(%p,%p,%p,%d,%p).\n", argc, wargv, wenvp, expand_wildcards, new_mode);
540
541 if (expand_wildcards) {
545 if (wargv_expand) {
547
550 }else {
551 expand_wildcards = 0;
552 }
553 }
554 if (!expand_wildcards) {
555#ifdef __REACTOS__
556 if ((MSVCRT___wargv == NULL) || (MSVCRT___argc == 0))
557 {
559 }
560#else
563#endif
564 }
565
567
569 *wargv = MSVCRT___wargv;
570 *wenvp = MSVCRT__wenviron;
571 if (new_mode)
572 _set_new_mode( *new_mode );
573 return 0;
574}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
wchar_t ** MSVCRT___wargv
Definition: data.c:51
static WCHAR ** cmdline_to_argv(const WCHAR *src, int *ret_argc)
Definition: data.c:85
wchar_t ** MSVCRT__wenviron
Definition: data.c:56
wchar_t * MSVCRT__wcmdln
Definition: data.c:54
int env_init(BOOL unicode, BOOL modif)
Definition: environ.c:30

Referenced by MSVCRT20__wgetmainargs().

◆ MSVCRT20__getmainargs()

void _cdecl MSVCRT20__getmainargs ( int argc,
char ***  argv,
char ***  envp,
int  expand_wildcards,
int  new_mode 
)

Definition at line 35 of file msvcrt20.c.

37{
38 __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
39}
void _cdecl __getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, int *new_mode)
Definition: data.c:579

◆ MSVCRT20__wgetmainargs()

void _cdecl MSVCRT20__wgetmainargs ( int argc,
wchar_t ***  wargv,
wchar_t ***  wenvp,
int  expand_wildcards,
int  new_mode 
)

Definition at line 46 of file msvcrt20.c.

48{
49 __wgetmainargs( argc, wargv, wenvp, expand_wildcards, &new_mode );
50}
void _cdecl __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenvp, int expand_wildcards, int *new_mode)
Definition: data.c:536