ReactOS 0.4.16-dev-2104-gb84fa49
data.c
Go to the documentation of this file.
1/*
2 * msvcrt.dll dll data items
3 *
4 * Copyright 2000 Jon Griffiths
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <fcntl.h>
22#include <math.h>
23#include "msvcrt.h"
24#include <winnls.h>
25#include "wine/debug.h"
26
28
30static int initial_argc;
32static int wargc_expand;
33unsigned int MSVCRT__commode = 0;
35unsigned int MSVCRT__osver = 0;
36unsigned int MSVCRT__osplatform = 0;
37unsigned int MSVCRT__winmajor = 0;
38unsigned int MSVCRT__winminor = 0;
39unsigned int MSVCRT__winver = 0;
40#ifdef _CRTDLL
41unsigned int CRTDLL__basemajor_dll = 0;
42unsigned int CRTDLL__baseminor_dll = 0;
43unsigned int CRTDLL__baseversion_dll = 0;
44unsigned int CRTDLL__cpumode_dll = 1;
45unsigned int CRTDLL__osmode_dll = 1;
46#endif
47unsigned int MSVCRT___setlc_active = 0;
49double MSVCRT__HUGE = 0;
51wchar_t **MSVCRT___wargv = NULL;
52static wchar_t **wargv_expand;
62
63static char **build_argv( WCHAR **wargv )
64{
65 int argc;
66 char *p, **argv;
67 DWORD total = 0;
68
69 for (argc = 0; wargv[argc]; argc++)
70 total += WideCharToMultiByte( CP_ACP, 0, wargv[argc], -1, NULL, 0, NULL, NULL );
71
72 argv = HeapAlloc( GetProcessHeap(), 0, total + (argc + 1) * sizeof(*argv) );
73 p = (char *)(argv + argc + 1);
74 for (argc = 0; wargv[argc]; argc++)
75 {
76 DWORD reslen = WideCharToMultiByte( CP_ACP, 0, wargv[argc], -1, p, total, NULL, NULL );
77 argv[argc] = p;
78 p += reslen;
79 total -= reslen;
80 }
81 argv[argc] = NULL;
82 return argv;
83}
84
85static WCHAR **cmdline_to_argv( const WCHAR *src, int *ret_argc )
86{
87 WCHAR **argv, *arg, *dst;
88 int argc, in_quotes = 0, bcount = 0, len = wcslen(src) + 1;
89
90 argc = 2 + len / 2;
91 argv = HeapAlloc( GetProcessHeap(), 0, argc * sizeof(*argv) + len * sizeof(WCHAR) );
92 arg = dst = (WCHAR *)(argv + argc);
93 argc = 0;
94 while (*src)
95 {
96 if ((*src == ' ' || *src == '\t') && !in_quotes)
97 {
98 /* skip the remaining spaces */
99 while (*src == ' ' || *src == '\t') src++;
100 if (!*src) break;
101 /* close the argument and copy it */
102 *dst++ = 0;
103 argv[argc++] = arg;
104 /* start with a new argument */
105 arg = dst;
106 bcount = 0;
107 }
108 else if (*src == '\\')
109 {
110 *dst++ = *src++;
111 bcount++;
112 }
113 else if (*src == '"')
114 {
115 if ((bcount & 1) == 0)
116 {
117 /* Preceded by an even number of '\', this is half that
118 * number of '\', plus a '"' which we discard.
119 */
120 dst -= bcount / 2;
121 src++;
122 if (in_quotes && *src == '"') *dst++ = *src++;
123#ifdef __REACTOS__
124 in_quotes = !in_quotes;
125#else
126 else in_quotes = !in_quotes;
127#endif
128 }
129 else
130 {
131 /* Preceded by an odd number of '\', this is half that
132 * number of '\' followed by a '"'
133 */
134 dst -= bcount / 2 + 1;
135 *dst++ = *src++;
136 }
137 bcount = 0;
138 }
139 else /* a regular character */
140 {
141 *dst++ = *src++;
142 bcount = 0;
143 }
144 }
145 *dst = 0;
146 argv[argc++] = arg;
147 argv[argc] = NULL;
148 *ret_argc = argc;
149 return argv;
150}
151
152#ifdef __REACTOS__
153static CHAR **cmdline_to_argvA( const CHAR *src, int *ret_argc )
154{
155 CHAR **argv, *arg, *dst;
156 int argc, in_quotes = 0, bcount = 0, len = strlen(src) + 1;
157
158 argc = 2 + len / 2;
159 argv = HeapAlloc( GetProcessHeap(), 0, argc * sizeof(*argv) + len * sizeof(CHAR) );
160 arg = dst = (CHAR *)(argv + argc);
161 argc = 0;
162 while (*src)
163 {
164 if ((*src == ' ' || *src == '\t') && !in_quotes)
165 {
166 /* skip the remaining spaces */
167 while (*src == ' ' || *src == '\t') src++;
168 if (!*src) break;
169 /* close the argument and copy it */
170 *dst++ = 0;
171 argv[argc++] = arg;
172 /* start with a new argument */
173 arg = dst;
174 bcount = 0;
175 }
176 else if (*src == '\\')
177 {
178 *dst++ = *src++;
179 bcount++;
180 }
181 else if (*src == '"')
182 {
183 if ((bcount & 1) == 0)
184 {
185 /* Preceded by an even number of '\', this is half that
186 * number of '\', plus a '"' which we discard.
187 */
188 dst -= bcount / 2;
189 src++;
190 if (in_quotes && *src == '"') *dst++ = *src++;
191#ifdef __REACTOS__
192 in_quotes = !in_quotes;
193#else
194 else in_quotes = !in_quotes;
195#endif
196 }
197 else
198 {
199 /* Preceded by an odd number of '\', this is half that
200 * number of '\' followed by a '"'
201 */
202 dst -= bcount / 2 + 1;
203 *dst++ = *src++;
204 }
205 bcount = 0;
206 }
207 else /* a regular character */
208 {
209 *dst++ = *src++;
210 bcount = 0;
211 }
212 }
213 *dst = 0;
214 argv[argc++] = arg;
215 argv[argc] = NULL;
216 *ret_argc = argc;
217 return argv;
218}
219#endif
220
223
224/***********************************************************************
225 * __p___argc (MSVCRT.@)
226 */
227int* CDECL __p___argc(void) { return &MSVCRT___argc; }
228
229/***********************************************************************
230 * __p__commode (MSVCRT.@)
231 */
232unsigned int* CDECL __p__commode(void) { return &MSVCRT__commode; }
233
234
235/***********************************************************************
236 * __p__pgmptr (MSVCRT.@)
237 */
238char** CDECL __p__pgmptr(void) { return &MSVCRT__pgmptr; }
239
240/***********************************************************************
241 * __p__wpgmptr (MSVCRT.@)
242 */
244
245/***********************************************************************
246 * _get_pgmptr (MSVCRT.@)
247 */
248int CDECL _get_pgmptr(char** p)
249{
250 if (!MSVCRT_CHECK_PMT(p)) return EINVAL;
251
252 *p = MSVCRT__pgmptr;
253 return 0;
254}
255
256/***********************************************************************
257 * _get_wpgmptr (MSVCRT.@)
258 */
260{
261 if (!MSVCRT_CHECK_PMT(p)) return EINVAL;
263 return 0;
264}
265
266/***********************************************************************
267 * __p__fmode (MSVCRT.@)
268 */
269int* CDECL __p__fmode(void) { return &MSVCRT__fmode; }
270
271/***********************************************************************
272 * _set_fmode (MSVCRT.@)
273 */
275{
276 /* TODO: support _O_WTEXT */
278 return EINVAL;
279
281 return 0;
282}
283
284/***********************************************************************
285 * _get_fmode (MSVCRT.@)
286 */
288{
290 return EINVAL;
291
293 return 0;
294}
295
296/***********************************************************************
297 * __p__osver (MSVCRT.@)
298 */
299unsigned int* CDECL __p__osver(void) { return &MSVCRT__osver; }
300
301/***********************************************************************
302 * __p__winmajor (MSVCRT.@)
303 */
304unsigned int* CDECL __p__winmajor(void) { return &MSVCRT__winmajor; }
305
306/***********************************************************************
307 * __p__winminor (MSVCRT.@)
308 */
309unsigned int* CDECL __p__winminor(void) { return &MSVCRT__winminor; }
310
311/***********************************************************************
312 * __p__winver (MSVCRT.@)
313 */
314unsigned int* CDECL __p__winver(void) { return &MSVCRT__winver; }
315
316/*********************************************************************
317 * __p__acmdln (MSVCRT.@)
318 */
319char** CDECL __p__acmdln(void) { return &MSVCRT__acmdln; }
320
321/*********************************************************************
322 * __p__wcmdln (MSVCRT.@)
323 */
324wchar_t** CDECL __p__wcmdln(void) { return &MSVCRT__wcmdln; }
325
326/*********************************************************************
327 * __p___argv (MSVCRT.@)
328 */
329char*** CDECL __p___argv(void) { return &MSVCRT___argv; }
330
331/*********************************************************************
332 * __p___wargv (MSVCRT.@)
333 */
334wchar_t*** CDECL __p___wargv(void) { return &MSVCRT___wargv; }
335
336/*********************************************************************
337 * __p__environ (MSVCRT.@)
338 */
339char*** CDECL __p__environ(void)
340{
341 return &MSVCRT__environ;
342}
343
344/*********************************************************************
345 * __p__wenviron (MSVCRT.@)
346 */
347wchar_t*** CDECL __p__wenviron(void)
348{
349 return &MSVCRT__wenviron;
350}
351
352/*********************************************************************
353 * __p___initenv (MSVCRT.@)
354 */
355char*** CDECL __p___initenv(void) { return &MSVCRT___initenv; }
356
357/*********************************************************************
358 * __p___winitenv (MSVCRT.@)
359 */
360wchar_t*** CDECL __p___winitenv(void) { return &MSVCRT___winitenv; }
361
362/*********************************************************************
363 * _get_osplatform (MSVCRT.@)
364 */
366{
367 if (!MSVCRT_CHECK_PMT(pValue != NULL)) return EINVAL;
369 return 0;
370}
371
372/* INTERNAL: Create a wide string from an ascii string */
373wchar_t *msvcrt_wstrdupa(const char *str)
374{
375 const unsigned int len = strlen(str) + 1 ;
376 wchar_t *wstr = malloc(len* sizeof (wchar_t));
377 if (!wstr)
378 return NULL;
380 return wstr;
381}
382
383/*********************************************************************
384 * ___unguarded_readlc_active_add_func (MSVCRT.@)
385 */
387{
389}
390
391/*********************************************************************
392 * ___setlc_active_func (MSVCRT.@)
393 */
394unsigned int CDECL ___setlc_active_func(void)
395{
397}
398
399/* INTERNAL: Since we can't rely on Winelib startup code calling w/getmainargs,
400 * we initialise data values during DLL loading. When called by a native
401 * program we simply return the data we've already initialised. This also means
402 * you can call multiple times without leaking
403 */
405{
407
414
415 TRACE("got %s, wide = %s argc=%d\n", debugstr_a(MSVCRT__acmdln),
417
425 TRACE( "winver %08x winmajor %08x winminor %08x osver %08x\n",
427#ifdef _CRTDLL
431#endif
432
436#ifndef __REACTOS__
438#endif
439
441
443 if (MSVCRT__pgmptr)
444 {
446 MSVCRT__pgmptr[0] = '\0';
447 else
448 MSVCRT__pgmptr[MAX_PATH - 1] = '\0';
449 }
450
452 if (MSVCRT__wpgmptr)
453 {
455 MSVCRT__wpgmptr[0] = '\0';
456 else
457 MSVCRT__wpgmptr[MAX_PATH - 1] = '\0';
458 }
459}
460
461/* INTERNAL: free memory used by args */
463{
464 /* FIXME: more things to free */
469}
470
471static int build_expanded_wargv(int *argc, wchar_t **argv)
472{
473 int i, size=0, args_no=0, path_len;
474 BOOL is_expandable;
475 HANDLE h;
476
477 args_no = 0;
478 for(i=0; i < initial_argc; i++) {
480 int len = 0;
481
482 is_expandable = FALSE;
483 for(path_len = wcslen(initial_wargv[i])-1; path_len>=0; path_len--) {
484 if(initial_wargv[i][path_len]=='*' || initial_wargv[i][path_len]=='?')
485 is_expandable = TRUE;
486 else if(initial_wargv[i][path_len]=='\\' || initial_wargv[i][path_len]=='/')
487 break;
488 }
489 path_len++;
490
491 if(is_expandable)
493 else
495
496 if(h != INVALID_HANDLE_VALUE) {
497 do {
498 if(data.cFileName[0]=='.' && (data.cFileName[1]=='\0' ||
499 (data.cFileName[1]=='.' && data.cFileName[2]=='\0')))
500 continue;
501
502 len = wcslen(data.cFileName)+1;
503 if(argv) {
504 argv[args_no] = (wchar_t*)(argv+*argc+1)+size;
505 memcpy(argv[args_no], initial_wargv[i], path_len*sizeof(wchar_t));
506 memcpy(argv[args_no]+path_len, data.cFileName, len*sizeof(wchar_t));
507 }
508 args_no++;
509 size += len+path_len;
510 }while(FindNextFileW(h, &data));
511 FindClose(h);
512 }
513
514 if(!len) {
516 if(argv) {
517 argv[args_no] = (wchar_t*)(argv+*argc+1)+size;
518 memcpy(argv[args_no], initial_wargv[i], len*sizeof(wchar_t));
519 }
520 args_no++;
521 size += len;
522 }
523 }
524
525 if(argv)
526 argv[args_no] = NULL;
527 size *= sizeof(wchar_t);
528 size += (args_no+1)*sizeof(wchar_t*);
529 *argc = args_no;
530 return size;
531}
532
533/*********************************************************************
534 * __wgetmainargs (MSVCRT.@)
535 */
536int CDECL __wgetmainargs(int *argc, wchar_t** *wargv, wchar_t** *wenvp,
537 int expand_wildcards, int *new_mode)
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}
575
576/*********************************************************************
577 * __getmainargs (MSVCRT.@)
578 */
579int CDECL __getmainargs(int *argc, char** *argv, char** *envp,
580 int expand_wildcards, int *new_mode)
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}
617
618#ifdef _CRTDLL
619/*********************************************************************
620 * __GetMainArgs (CRTDLL.@)
621 */
622void CDECL __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards )
623{
624 int new_mode = 0;
625 __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
626}
627#endif
628
629/*********************************************************************
630 * _initterm (MSVCRT.@)
631 */
633{
635
636 TRACE("(%p,%p)\n",start,end);
637 while (current<end)
638 {
639 if (*current)
640 {
641 TRACE("Call init function %p\n",*current);
642 (**current)();
643 TRACE("returned\n");
644 }
645 current++;
646 }
647}
648
649/*********************************************************************
650 * _initterm_e (MSVCRT.@)
651 *
652 * call an array of application initialization functions and report the return value
653 */
655{
656 int res = 0;
657
658 TRACE("(%p, %p)\n", table, end);
659
660 while (!res && table < end) {
661 if (*table) {
662 TRACE("calling %p\n", **table);
663 res = (**table)();
664 if (res)
665 TRACE("function %p failed: %#x\n", *table, res);
666
667 }
668 table++;
669 }
670 return res;
671}
672
673/*********************************************************************
674 * __set_app_type (MSVCRT.@)
675 */
676void CDECL __set_app_type(int app_type)
677{
678 TRACE("(%d) %s application\n", app_type, app_type == 2 ? "Gui" : "Console");
679 MSVCRT_app_type = app_type;
680}
681
682#if _MSVCR_VER>=140
683
684/*********************************************************************
685 * _configure_narrow_argv (UCRTBASE.@)
686 */
688{
689 TRACE("(%d)\n", mode);
690 return 0;
691}
692
693/*********************************************************************
694 * _initialize_narrow_environment (UCRTBASE.@)
695 */
697{
698 TRACE("\n");
699 return env_init(FALSE, FALSE);
700}
701
702/*********************************************************************
703 * _get_initial_narrow_environment (UCRTBASE.@)
704 */
706{
707 TRACE("\n");
709 return MSVCRT___initenv;
710}
711
712/*********************************************************************
713 * _configure_wide_argv (UCRTBASE.@)
714 */
716{
717 WARN("(%d) stub\n", mode);
718 return 0;
719}
720
721/*********************************************************************
722 * _initialize_wide_environment (UCRTBASE.@)
723 */
725{
726 TRACE("\n");
727 return env_init(TRUE, FALSE);
728}
729
730/*********************************************************************
731 * _get_initial_wide_environment (UCRTBASE.@)
732 */
734{
735 TRACE("\n");
737 return MSVCRT___winitenv;
738}
739
740/*********************************************************************
741 * _get_narrow_winmain_command_line (UCRTBASE.@)
742 */
744{
745 static char *narrow_command_line;
746 char *s;
747
748 if (narrow_command_line)
749 return narrow_command_line;
750
751 s = GetCommandLineA();
752 while (*s && *s != ' ' && *s != '\t')
753 {
754 if (*s++ == '"')
755 {
756 while (*s && *s++ != '"')
757 ;
758 }
759 }
760
761 while (*s == ' ' || *s == '\t')
762 s++;
763
764 return narrow_command_line = s;
765}
766
767/*********************************************************************
768 * _get_wide_winmain_command_line (UCRTBASE.@)
769 */
771{
772 static wchar_t *wide_command_line;
773 wchar_t *s;
774
775 if (wide_command_line)
776 return wide_command_line;
777
778 s = GetCommandLineW();
779 while (*s && *s != ' ' && *s != '\t')
780 {
781 if (*s++ == '"')
782 {
783 while (*s && *s++ != '"')
784 ;
785 }
786 }
787
788 while (*s == ' ' || *s == '\t')
789 s++;
790
791 return wide_command_line = s;
792}
793
794#endif /* _MSVCR_VER>=140 */
795
796/*********************************************************************
797 * _get_winmajor (MSVCRT.@)
798 */
800{
801 if (!MSVCRT_CHECK_PMT(value != NULL)) return EINVAL;
803 return 0;
804}
805
806/*********************************************************************
807 * _get_winminor (MSVCRT.@)
808 */
810{
811 if (!MSVCRT_CHECK_PMT(value != NULL)) return EINVAL;
813 return 0;
814}
815
816/*********************************************************************
817 * _get_osver (MSVCRT.@)
818 */
820{
821 if (!MSVCRT_CHECK_PMT(value != NULL)) return EINVAL;
823 return 0;
824}
static int argc
Definition: ServiceArgs.c:12
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define WARN(fmt,...)
Definition: precomp.h:61
#define _strdup
Definition: debug_ros.c:7
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define _O_BINARY
Definition: cabinet.h:51
#define _O_TEXT
Definition: cabinet.h:50
unsigned int CRTDLL__cpumode_dll
Definition: dllmain.c:40
unsigned int CRTDLL__baseminor_dll
Definition: dllmain.c:38
void __GetMainArgs(int *argc, char ***argv, char ***envp, int expand_wildcards)
Definition: dllmain.c:160
unsigned int CRTDLL__basemajor_dll
Definition: dllmain.c:37
unsigned int CRTDLL__baseversion_dll
Definition: dllmain.c:39
unsigned int CRTDLL__osmode_dll
Definition: dllmain.c:43
#define CDECL
Definition: compat.h:29
#define GetProcessHeap()
Definition: compat.h:736
#define CP_ACP
Definition: compat.h:109
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
Definition: version.c:37
LPWSTR WINAPI GetCommandLineW(void)
Definition: process.c:1338
LPSTR WINAPI GetCommandLineA(void)
Definition: process.c:1329
DWORD WINAPI GetVersion(void)
Definition: version.c:1458
unsigned int *CDECL __p__osver(void)
Definition: data.c:299
wchar_t * msvcrt_wstrdupa(const char *str)
Definition: data.c:373
unsigned int MSVCRT__winmajor
Definition: data.c:37
wchar_t ***CDECL __p__wenviron(void)
Definition: data.c:347
wchar_t ** MSVCRT___wargv
Definition: data.c:51
unsigned int MSVCRT__osplatform
Definition: data.c:36
unsigned int MSVCRT___unguarded_readlc_active
Definition: data.c:48
int CDECL _get_osver(int *value)
Definition: data.c:819
int *CDECL __p__fmode(void)
Definition: data.c:269
unsigned int *CDECL __p__winver(void)
Definition: data.c:314
char * MSVCRT__pgmptr
Definition: data.c:60
unsigned int MSVCRT___setlc_active
Definition: data.c:47
wchar_t ** MSVCRT___winitenv
Definition: data.c:58
char **CDECL __p__pgmptr(void)
Definition: data.c:238
unsigned int MSVCRT__osver
Definition: data.c:35
unsigned int *CDECL __p__winminor(void)
Definition: data.c:309
static char ** build_argv(WCHAR **wargv)
Definition: data.c:63
unsigned int MSVCRT__commode
Definition: data.c:33
WCHAR **CDECL __p__wpgmptr(void)
Definition: data.c:243
void msvcrt_free_args(void)
Definition: data.c:462
int(CDECL * _INITTERM_E_FN)(void)
Definition: data.c:222
char **CDECL __p__acmdln(void)
Definition: data.c:319
int MSVCRT__fmode
Definition: data.c:34
int CDECL _get_wpgmptr(WCHAR **p)
Definition: data.c:259
wchar_t **CDECL __p__wcmdln(void)
Definition: data.c:324
int CDECL __wgetmainargs(int *argc, wchar_t ***wargv, wchar_t ***wenvp, int expand_wildcards, int *new_mode)
Definition: data.c:536
int CDECL _set_fmode(int mode)
Definition: data.c:274
static WCHAR ** cmdline_to_argv(const WCHAR *src, int *ret_argc)
Definition: data.c:85
unsigned int *CDECL __p__commode(void)
Definition: data.c:232
static int initial_argc
Definition: data.c:30
static int build_expanded_wargv(int *argc, wchar_t **argv)
Definition: data.c:471
int CDECL _get_pgmptr(char **p)
Definition: data.c:248
unsigned int CDECL ___setlc_active_func(void)
Definition: data.c:394
int CDECL _get_osplatform(int *pValue)
Definition: data.c:365
int CDECL _get_fmode(int *mode)
Definition: data.c:287
int *CDECL __p___argc(void)
Definition: data.c:227
static int wargc_expand
Definition: data.c:32
int CDECL _get_winminor(int *value)
Definition: data.c:809
char ** MSVCRT___argv
Definition: data.c:50
unsigned int MSVCRT__winminor
Definition: data.c:38
int MSVCRT_app_type
Definition: data.c:59
void CDECL __set_app_type(int app_type)
Definition: data.c:676
wchar_t ***CDECL __p___wargv(void)
Definition: data.c:334
int CDECL _initterm_e(_INITTERM_E_FN *table, _INITTERM_E_FN *end)
Definition: data.c:654
char ***CDECL __p___argv(void)
Definition: data.c:329
void msvcrt_init_args(void)
Definition: data.c:404
int CDECL __getmainargs(int *argc, char ***argv, char ***envp, int expand_wildcards, int *new_mode)
Definition: data.c:579
char ** MSVCRT___initenv
Definition: data.c:57
unsigned int *CDECL ___unguarded_readlc_active_add_func(void)
Definition: data.c:386
wchar_t ** MSVCRT__wenviron
Definition: data.c:56
char ***CDECL __p__environ(void)
Definition: data.c:339
double MSVCRT__HUGE
Definition: data.c:49
char ***CDECL __p___initenv(void)
Definition: data.c:355
static WCHAR ** initial_wargv
Definition: data.c:29
unsigned int MSVCRT__winver
Definition: data.c:39
wchar_t ***CDECL __p___winitenv(void)
Definition: data.c:360
void(CDECL * _INITTERMFUN)(void)
Definition: data.c:221
int MSVCRT___argc
Definition: data.c:31
char ** MSVCRT__environ
Definition: data.c:55
wchar_t * MSVCRT__wcmdln
Definition: data.c:54
WCHAR * MSVCRT__wpgmptr
Definition: data.c:61
unsigned int *CDECL __p__winmajor(void)
Definition: data.c:304
int CDECL _get_winmajor(int *value)
Definition: data.c:799
void CDECL _initterm(_INITTERMFUN *start, _INITTERMFUN *end)
Definition: data.c:632
char * MSVCRT__acmdln
Definition: data.c:53
static wchar_t ** wargv_expand
Definition: data.c:52
int env_init(BOOL unicode, BOOL modif)
Definition: environ.c:30
int CDECL _set_new_mode(int mode)
Definition: heap.c:227
_ACRTIMP errno_t __cdecl _configure_narrow_argv(_crt_argv_mode)
_ACRTIMP errno_t __cdecl _configure_wide_argv(_crt_argv_mode)
_ACRTIMP char *__cdecl _get_narrow_winmain_command_line(void)
_ACRTIMP wchar_t **__cdecl _get_initial_wide_environment(void)
_ACRTIMP int __cdecl _initialize_narrow_environment(void)
_ACRTIMP char **__cdecl _get_initial_narrow_environment(void)
_ACRTIMP int __cdecl _initialize_wide_environment(void)
_ACRTIMP wchar_t *__cdecl _get_wide_winmain_command_line(void)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
_ACRTIMP wchar_t *__cdecl _wcsdup(const wchar_t *) __WINE_DEALLOC(free) __WINE_MALLOC
Definition: wcs.c:81
#define EINVAL
Definition: errno.h:44
#define HUGE_VAL
Definition: math.h:274
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
#define MSVCRT_CHECK_PMT(x)
Definition: msvcrt.h:378
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
PWCHAR pValue
size_t total
GLuint start
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLuint GLuint end
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLenum mode
Definition: glext.h:6217
GLenum GLenum dst
Definition: glext.h:6340
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
struct task_struct * current
Definition: linux.c:32
static DWORD path_len
Definition: batch.c:31
static DWORD LPDWORD reslen
Definition: directory.c:51
#define argv
Definition: mplay32.c:18
const WCHAR * str
#define wchar_t
Definition: wchar.h:102
#define TRACE(s)
Definition: solgame.cpp:4
ULONG dwPlatformId
Definition: rtltypes.h:241
ULONG dwOSVersionInfoSize
Definition: rtltypes.h:237
ULONG dwMajorVersion
Definition: rtltypes.h:238
ULONG dwBuildNumber
Definition: rtltypes.h:240
ULONG dwMinorVersion
Definition: rtltypes.h:239
Definition: pdh_main.c:96
OSVERSIONINFO osvi
Definition: ver.c:28
void * arg
Definition: msvc.h:10
#define MB_PRECOMPOSED
Definition: winnls.h:299
struct _OSVERSIONINFOW OSVERSIONINFOW
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175