ReactOS 0.4.16-dev-2204-g370eb8c
misc.c
Go to the documentation of this file.
1/*
2 * msvcrt.dll misc functions
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 <stdlib.h>
22#include <sys/types.h>
23
24#include "msvcrt.h"
25#include "wine/debug.h"
26#include "ntsecapi.h"
27#include "windows.h"
28#include "wine/asm.h"
29
31
32static unsigned int output_format;
33
34#ifdef _MSC_VER
35#pragma function(_byteswap_ushort, _byteswap_ulong, _byteswap_uint64)
36#endif
37
38/*********************************************************************
39 * _beep (MSVCRT.@)
40 */
41void CDECL _beep( unsigned int freq, unsigned int duration)
42{
43 TRACE(":Freq %d, Duration %d\n",freq,duration);
44 Beep(freq, duration);
45}
46
47/*********************************************************************
48 * srand (MSVCRT.@)
49 */
50void CDECL srand( unsigned int seed )
51{
53 data->random_seed = seed;
54}
55
56/*********************************************************************
57 * rand (MSVCRT.@)
58 */
59int CDECL rand(void)
60{
62
63 /* this is the algorithm used by MSVC, according to
64 * http://en.wikipedia.org/wiki/List_of_pseudorandom_number_generators */
65 data->random_seed = data->random_seed * 214013 + 2531011;
66 return (data->random_seed >> 16) & RAND_MAX;
67}
68
69/*********************************************************************
70 * rand_s (MSVCRT.@)
71 */
72int CDECL rand_s(unsigned int *pval)
73{
74 if (!pval || !RtlGenRandom(pval, sizeof(*pval)))
75 {
76 *_errno() = EINVAL;
77 return EINVAL;
78 }
79 return 0;
80}
81
82/*********************************************************************
83 * _sleep (MSVCRT.@)
84 */
86{
87 TRACE("_sleep for %ld milliseconds\n",timeout);
89}
90
91/*********************************************************************
92 * _lfind (MSVCRT.@)
93 */
94void* CDECL _lfind(const void* match, const void* start,
95 unsigned int* array_size, unsigned int elem_size,
96 int (CDECL *cf)(const void*,const void*) )
97{
98 unsigned int size = *array_size;
99 if (size)
100 do
101 {
102 if (cf(match, start) == 0)
103 return (void *)start; /* found */
104 start = (const char *)start + elem_size;
105 } while (--size);
106 return NULL;
107}
108
109/*********************************************************************
110 * _lfind_s (MSVCRT.@)
111 */
112void* CDECL _lfind_s(const void* match, const void* start,
113 unsigned int* array_size, unsigned int elem_size,
114 int (CDECL *cf)(void*,const void*,const void*),
115 void* context)
116{
117 unsigned int size;
118 if (!MSVCRT_CHECK_PMT(match != NULL)) return NULL;
119 if (!MSVCRT_CHECK_PMT(array_size != NULL)) return NULL;
120 if (!MSVCRT_CHECK_PMT(start != NULL || *array_size == 0)) return NULL;
121 if (!MSVCRT_CHECK_PMT(cf != NULL)) return NULL;
122 if (!MSVCRT_CHECK_PMT(elem_size != 0)) return NULL;
123
124 size = *array_size;
125 if (size)
126 do
127 {
128 if (cf(context, match, start) == 0)
129 return (void *)start; /* found */
130 start = (const char *)start + elem_size;
131 } while (--size);
132 return NULL;
133}
134
135/*********************************************************************
136 * _lsearch (MSVCRT.@)
137 */
138void* CDECL _lsearch(const void* match, void* start,
139 unsigned int* array_size, unsigned int elem_size,
140 int (CDECL *cf)(const void*,const void*) )
141{
142 unsigned int size = *array_size;
143 if (size)
144 do
145 {
146 if (cf(match, start) == 0)
147 return start; /* found */
148 start = (char*)start + elem_size;
149 } while (--size);
150
151 /* not found, add to end */
152 memcpy(start, match, elem_size);
153 array_size[0]++;
154 return start;
155}
156
157/*********************************************************************
158 * bsearch_s (msvcrt.@)
159 */
160void* CDECL bsearch_s(const void *key, const void *base, size_t nmemb, size_t size,
161 int (__cdecl *compare)(void *, const void *, const void *), void *ctx)
162{
163 ssize_t min = 0;
164 ssize_t max = nmemb - 1;
165
166 if (!MSVCRT_CHECK_PMT(size != 0)) return NULL;
167 if (!MSVCRT_CHECK_PMT(compare != NULL)) return NULL;
168
169 while (min <= max)
170 {
171 ssize_t cursor = min + (max - min) / 2;
172 int ret = compare(ctx, key,(const char *)base+(cursor*size));
173 if (!ret)
174 return (char*)base+(cursor*size);
175 if (ret < 0)
176 max = cursor - 1;
177 else
178 min = cursor + 1;
179 }
180 return NULL;
181}
182
183static int CDECL compare_wrapper(void *ctx, const void *e1, const void *e2)
184{
185 int (__cdecl *compare)(const void *, const void *) = ctx;
186 return compare(e1, e2);
187}
188
189/*********************************************************************
190 * bsearch (msvcrt.@)
191 */
192void* CDECL bsearch(const void *key, const void *base, size_t nmemb,
193 size_t size, int (__cdecl *compar)(const void *, const void *))
194{
195 return bsearch_s(key, base, nmemb, size, compare_wrapper, compar);
196}
197/*********************************************************************
198 * _chkesp (MSVCRT.@)
199 *
200 * Trap to a debugger if the value of the stack pointer has changed.
201 *
202 * PARAMS
203 * None.
204 *
205 * RETURNS
206 * Does not return.
207 *
208 * NOTES
209 * This function is available for iX86 only.
210 *
211 * When VC++ generates debug code, it stores the value of the stack pointer
212 * before calling any external function, and checks the value following
213 * the call. It then calls this function, which will trap if the values are
214 * not the same. Usually this means that the prototype used to call
215 * the function is incorrect. It can also mean that the .spec entry has
216 * the wrong calling convention or parameters.
217 */
218#ifdef __i386__
219
220# if defined(__GNUC__) || defined(__clang__)
221
222__ASM_GLOBAL_FUNC(_chkesp,
223 "jnz 1f\n\t"
224 "ret\n"
225 "1:\tpushl %ebp\n\t"
226 __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
227 __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
228 "movl %esp,%ebp\n\t"
229 __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
230 "subl $12,%esp\n\t"
231 "pushl %eax\n\t"
232 "pushl %ecx\n\t"
233 "pushl %edx\n\t"
234 "call " __ASM_NAME("chkesp_fail") "\n\t"
235 "popl %edx\n\t"
236 "popl %ecx\n\t"
237 "popl %eax\n\t"
238 "leave\n\t"
239 __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
240 __ASM_CFI(".cfi_same_value %ebp\n\t")
241 "ret")
242
243void CDECL chkesp_fail(void)
244{
245 ERR("Stack pointer incorrect after last function call - Bad prototype/spec entry?\n");
246 DebugBreak();
247}
248
249# else /* __GNUC__ || __clang__ */
250
251/**********************************************************************/
252
253void CDECL _chkesp(void)
254{
255}
256
257# endif /* __GNUC__ || __clang__ */
258
259#endif /* __i386__ */
260
261static inline void swap(char *l, char *r, size_t size)
262{
263 char tmp;
264
265 while(size--) {
266 tmp = *l;
267 *l++ = *r;
268 *r++ = tmp;
269 }
270}
271
272static void small_sort(void *base, size_t nmemb, size_t size,
273 int (CDECL *compar)(void *, const void *, const void *), void *context)
274{
275 size_t e, i;
276 char *max, *p;
277
278 for(e=nmemb; e>1; e--) {
279 max = base;
280 for(i=1; i<e; i++) {
281 p = (char*)base + i*size;
282 if(compar(context, p, max) > 0)
283 max = p;
284 }
285
286 if(p != max)
287 swap(p, max, size);
288 }
289}
290
291static void quick_sort(void *base, size_t nmemb, size_t size,
292 int (CDECL *compar)(void *, const void *, const void *), void *context)
293{
294 size_t stack_lo[8*sizeof(size_t)], stack_hi[8*sizeof(size_t)];
295 size_t beg, end, lo, hi, med;
296 int stack_pos;
297
298 stack_pos = 0;
299 stack_lo[stack_pos] = 0;
300 stack_hi[stack_pos] = nmemb-1;
301
302#define X(i) ((char*)base+size*(i))
303 while(stack_pos >= 0) {
304 beg = stack_lo[stack_pos];
305 end = stack_hi[stack_pos--];
306
307 if(end-beg < 8) {
308 small_sort(X(beg), end-beg+1, size, compar, context);
309 continue;
310 }
311
312 lo = beg;
313 hi = end;
314 med = lo + (hi-lo+1)/2;
315 if(compar(context, X(lo), X(med)) > 0)
316 swap(X(lo), X(med), size);
317 if(compar(context, X(lo), X(hi)) > 0)
318 swap(X(lo), X(hi), size);
319 if(compar(context, X(med), X(hi)) > 0)
320 swap(X(med), X(hi), size);
321
322 lo++;
323 hi--;
324 while(1) {
325 while(lo <= hi) {
326 if(lo!=med && compar(context, X(lo), X(med))>0)
327 break;
328 lo++;
329 }
330
331 while(med != hi) {
332 if(compar(context, X(hi), X(med)) <= 0)
333 break;
334 hi--;
335 }
336
337 if(hi < lo)
338 break;
339
340 swap(X(lo), X(hi), size);
341 if(hi == med)
342 med = lo;
343 lo++;
344 hi--;
345 }
346
347 while(hi > beg) {
348 if(hi!=med && compar(context, X(hi), X(med))!=0)
349 break;
350 hi--;
351 }
352
353 if(hi-beg >= end-lo) {
354 stack_lo[++stack_pos] = beg;
355 stack_hi[stack_pos] = hi;
356 stack_lo[++stack_pos] = lo;
357 stack_hi[stack_pos] = end;
358 }else {
359 stack_lo[++stack_pos] = lo;
360 stack_hi[stack_pos] = end;
361 stack_lo[++stack_pos] = beg;
362 stack_hi[stack_pos] = hi;
363 }
364 }
365#undef X
366}
367
368/*********************************************************************
369 * qsort_s (MSVCRT.@)
370 *
371 * This function is trying to sort data doing identical comparisons
372 * as native does. There are still cases where it behaves differently.
373 */
374void CDECL qsort_s(void *base, size_t nmemb, size_t size,
375 int (CDECL *compar)(void *, const void *, const void *), void *context)
376{
377 const size_t total_size = nmemb*size;
378
379 if (!MSVCRT_CHECK_PMT(base != NULL || (base == NULL && nmemb == 0))) return;
380 if (!MSVCRT_CHECK_PMT(size > 0)) return;
381 if (!MSVCRT_CHECK_PMT(compar != NULL)) return;
382 if (total_size / size != nmemb) return;
383
384 if (nmemb < 2) return;
385
386 quick_sort(base, nmemb, size, compar, context);
387}
388
389/*********************************************************************
390 * qsort (MSVCRT.@)
391 */
392void CDECL qsort(void *base, size_t nmemb, size_t size,
393 int (CDECL *compar)(const void*, const void*))
394{
395 qsort_s(base, nmemb, size, compare_wrapper, compar);
396}
397
398/*********************************************************************
399 * _get_output_format (MSVCRT.@)
400 */
401unsigned int CDECL _get_output_format(void)
402{
403 return output_format;
404}
405
406/*********************************************************************
407 * _set_output_format (MSVCRT.@)
408 */
409unsigned int CDECL _set_output_format(unsigned int new_output_format)
410{
411 unsigned int ret = output_format;
412
413 if(!MSVCRT_CHECK_PMT(new_output_format==0 || new_output_format==_TWO_DIGIT_EXPONENT))
414 return ret;
415
416 output_format = new_output_format;
417 return ret;
418}
419
420/*********************************************************************
421 * _resetstkoflw (MSVCRT.@)
422 */
424{
425 int stack_addr;
426 DWORD oldprot;
427
428 /* causes stack fault that updates NtCurrentTeb()->Tib.StackLimit */
429 return VirtualProtect(&stack_addr, 1, PAGE_GUARD|PAGE_READWRITE, &oldprot);
430}
431
432#if _MSVCR_VER>=80 && _MSVCR_VER<=90
433
434/*********************************************************************
435 * _decode_pointer (MSVCR80.@)
436 */
437void * CDECL _decode_pointer(void * ptr)
438{
439 return DecodePointer(ptr);
440}
441
442/*********************************************************************
443 * _encode_pointer (MSVCR80.@)
444 */
445void * CDECL _encode_pointer(void * ptr)
446{
447 return EncodePointer(ptr);
448}
449
450#endif /* _MSVCR_VER>=80 && _MSVCR_VER<=90 */
451
452#if _MSVCR_VER>=80 && _MSVCR_VER<=100
453/*********************************************************************
454 * _encoded_null (MSVCR80.@)
455 */
456void * CDECL _encoded_null(void)
457{
458 TRACE("\n");
459
460 return EncodePointer(NULL);
461}
462#endif
463
464#if _MSVCR_VER>=70
465/*********************************************************************
466 * _CRT_RTC_INIT (MSVCR70.@)
467 */
468void* CDECL _CRT_RTC_INIT(void *unk1, void *unk2, int unk3, int unk4, int unk5)
469{
470 TRACE("%p %p %x %x %x\n", unk1, unk2, unk3, unk4, unk5);
471 return NULL;
472}
473#endif
474
475#if _MSVCR_VER>=80
476
477/*********************************************************************
478 * _CRT_RTC_INITW (MSVCR80.@)
479 */
480void* CDECL _CRT_RTC_INITW(void *unk1, void *unk2, int unk3, int unk4, int unk5)
481{
482 TRACE("%p %p %x %x %x\n", unk1, unk2, unk3, unk4, unk5);
483 return NULL;
484}
485
486/*********************************************************************
487 * _byteswap_ushort (MSVCR80.@)
488 */
489unsigned short CDECL _byteswap_ushort(unsigned short s)
490{
491 return (s<<8) + (s>>8);
492}
493
494/*********************************************************************
495 * _byteswap_ulong (MSVCR80.@)
496 */
498{
499 return (l<<24) + ((l<<8)&0xFF0000) + ((l>>8)&0xFF00) + (l>>24);
500}
501
502/*********************************************************************
503 * _byteswap_uint64 (MSVCR80.@)
504 */
505unsigned __int64 CDECL _byteswap_uint64(unsigned __int64 i)
506{
507 return (i<<56) + ((i&0xFF00)<<40) + ((i&0xFF0000)<<24) + ((i&0xFF000000)<<8) +
508 ((i>>8)&0xFF000000) + ((i>>24)&0xFF0000) + ((i>>40)&0xFF00) + (i>>56);
509}
510
511#endif /* _MSVCR_VER>=80 */
512
513#if _MSVCR_VER>=110
514
515/*********************************************************************
516 * __crtGetShowWindowMode (MSVCR110.@)
517 */
518int CDECL __crtGetShowWindowMode(void)
519{
521
523 TRACE("flags=%lx window=%d\n", si.dwFlags, si.wShowWindow);
524 return si.dwFlags & STARTF_USESHOWWINDOW ? si.wShowWindow : SW_SHOWDEFAULT;
525}
526
527/*********************************************************************
528 * __crtInitializeCriticalSectionEx (MSVCR110.@)
529 */
530BOOL CDECL __crtInitializeCriticalSectionEx(
531 CRITICAL_SECTION *cs, DWORD spin_count, DWORD flags)
532{
533 TRACE("(%p %lx %lx)\n", cs, spin_count, flags);
534 return InitializeCriticalSectionEx(cs, spin_count, flags);
535}
536
537#endif /* _MSVCR_VER>=110 */
538
539#if _MSVCR_VER>=120
540/*********************************************************************
541 * _vacopy (MSVCR120.@)
542 */
543void CDECL _vacopy(va_list *dest, va_list src)
544{
545 va_copy(*dest, src);
546}
547#endif
548
549#if _MSVCR_VER>=80
550/*********************************************************************
551 * _crt_debugger_hook (MSVCR80.@)
552 */
553void CDECL _crt_debugger_hook(int reserved)
554{
555 WARN("(%x)\n", reserved);
556}
557#endif
558
559#if _MSVCR_VER>=110
560/*********************************************************************
561 * __crtUnhandledException (MSVCR110.@)
562 */
563LONG CDECL __crtUnhandledException(EXCEPTION_POINTERS *ep)
564{
565 TRACE("(%p)\n", ep);
567 return UnhandledExceptionFilter(ep);
568}
569#endif
570
571#if _MSVCR_VER>=120
572/*********************************************************************
573 * __crtSleep (MSVCR120.@)
574 */
575void CDECL __crtSleep(DWORD timeout)
576{
577 TRACE("(%lu)\n", timeout);
578 Sleep(timeout);
579}
580
581/*********************************************************************
582 * _SetWinRTOutOfMemoryExceptionCallback (MSVCR120.@)
583 */
584void CDECL _SetWinRTOutOfMemoryExceptionCallback(void *callback)
585{
586 FIXME("(%p): stub\n", callback);
587}
588#endif
#define compare
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
r l[0]
Definition: byte_order.h:168
BOOL WINAPI Beep(IN DWORD dwFreq, IN DWORD dwDuration)
Definition: deviceio.c:48
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
LONG WINAPI UnhandledExceptionFilter(IN PEXCEPTION_POINTERS ExceptionInfo)
Definition: except.c:269
LPTOP_LEVEL_EXCEPTION_FILTER WINAPI DECLSPEC_HOTPATCH SetUnhandledExceptionFilter(IN LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)
Definition: except.c:790
VOID WINAPI GetStartupInfoW(IN LPSTARTUPINFOW lpStartupInfo)
Definition: proc.c:1279
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
int *CDECL _errno(void)
Definition: errno.c:215
#define __cdecl
Definition: corecrt.h:121
unsigned int size_t
Definition: corecrt.h:203
#define __int64
Definition: corecrt.h:72
unsigned long __msvcrt_ulong
Definition: corecrt.h:168
#define EINVAL
Definition: errno.h:44
#define va_copy(d, s)
Definition: stdarg.h:29
#define _TWO_DIGIT_EXPONENT
Definition: stdio.h:68
_ACRTIMP unsigned short __cdecl _byteswap_ushort(unsigned short)
Definition: intrin_arm.h:42
#define RAND_MAX
Definition: stdlib.h:34
_ACRTIMP __msvcrt_ulong __cdecl _byteswap_ulong(__msvcrt_ulong)
_ACRTIMP unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64)
Definition: byteswap.cpp:49
char * va_list
Definition: vadefs.h:50
void CDECL qsort_s(void *base, size_t nmemb, size_t size, int(CDECL *compar)(void *, const void *, const void *), void *context)
Definition: misc.c:374
void CDECL _sleep(__msvcrt_ulong timeout)
Definition: misc.c:85
void CDECL _beep(unsigned int freq, unsigned int duration)
Definition: misc.c:41
static unsigned int output_format
Definition: misc.c:32
void *CDECL bsearch_s(const void *key, const void *base, size_t nmemb, size_t size, int(__cdecl *compare)(void *, const void *, const void *), void *ctx)
Definition: misc.c:160
#define X(i)
int CDECL rand(void)
Definition: misc.c:59
void *CDECL _lsearch(const void *match, void *start, unsigned int *array_size, unsigned int elem_size, int(CDECL *cf)(const void *, const void *))
Definition: misc.c:138
int CDECL rand_s(unsigned int *pval)
Definition: misc.c:72
unsigned int CDECL _set_output_format(unsigned int new_output_format)
Definition: misc.c:409
static void small_sort(void *base, size_t nmemb, size_t size, int(CDECL *compar)(void *, const void *, const void *), void *context)
Definition: misc.c:272
void CDECL srand(unsigned int seed)
Definition: misc.c:50
void CDECL qsort(void *base, size_t nmemb, size_t size, int(CDECL *compar)(const void *, const void *))
Definition: misc.c:392
static int CDECL compare_wrapper(void *ctx, const void *e1, const void *e2)
Definition: misc.c:183
void *CDECL _lfind(const void *match, const void *start, unsigned int *array_size, unsigned int elem_size, int(CDECL *cf)(const void *, const void *))
Definition: misc.c:94
int CDECL _resetstkoflw(void)
Definition: misc.c:423
void *CDECL _lfind_s(const void *match, const void *start, unsigned int *array_size, unsigned int elem_size, int(CDECL *cf)(void *, const void *, const void *), void *context)
Definition: misc.c:112
unsigned int CDECL _get_output_format(void)
Definition: misc.c:401
static void quick_sort(void *base, size_t nmemb, size_t size, int(CDECL *compar)(void *, const void *, const void *), void *context)
Definition: misc.c:291
thread_data_t *CDECL msvcrt_get_thread_data(void)
Definition: thread.c:45
#define MSVCRT_CHECK_PMT(x)
Definition: msvcrt.h:378
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
return ret
Definition: mutex.c:146
r reserved
Definition: btrfs.c:3006
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
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
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLbitfield flags
Definition: glext.h:7161
GLfloat GLfloat p
Definition: glext.h:8902
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 cs
Definition: i386-dis.c:442
const char cursor[]
Definition: icontest.c:13
#define e
Definition: ke_i.h:82
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static IPrintDialogCallback callback
Definition: printdlg.c:326
static SYSTEM_INFO si
Definition: virtual.c:39
static char * dest
Definition: rtl.c:135
static DWORD unk1
Definition: cursoricon.c:1638
#define __ASM_NAME(name)
Definition: config.h:934
#define __ASM_GLOBAL_FUNC(name, code)
Definition: port.h:201
#define min(a, b)
Definition: monoChain.cc:55
static UINT array_size
Definition: msctf.cpp:39
#define PAGE_READWRITE
Definition: nt_native.h:1307
#define PAGE_GUARD
Definition: nt_native.h:1313
#define RtlGenRandom
Definition: ntsecapi.h:691
long LONG
Definition: pedump.c:60
#define swap(a, b)
Definition: qsort.c:63
int ssize_t
Definition: rosdhcp.h:50
_RTC_error_fnW __cdecl _CRT_RTC_INITW(void *_Res0, void **_Res1, int _Res2, int _Res3, int _Res4)
Definition: mscmain.c:65
_RTC_error_fn __cdecl _CRT_RTC_INIT(void *_Res0, void **_Res1, int _Res2, int _Res3, int _Res4)
void *__cdecl _decode_pointer(void *)
Definition: mingw_helpers.c:19
void *__cdecl _encode_pointer(void *)
Definition: mingw_helpers.c:25
void *__cdecl _encoded_null()
#define TRACE(s)
Definition: solgame.cpp:4
Definition: bug.cpp:8
Definition: http.c:7252
Definition: copy.c:22
Definition: match.c:28
Definition: dhcpd.h:248
#define max(a, b)
Definition: svc.c:63
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:790
#define bsearch
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
Definition: virtmem.c:135
PVOID WINAPI EncodePointer(PVOID)
#define STARTF_USESHOWWINDOW
Definition: winbase.h:468
void WINAPI DebugBreak(void)
PVOID WINAPI DecodePointer(PVOID)
#define __ASM_CFI(str)
Definition: asm.h:39
#define SW_SHOWDEFAULT
Definition: winuser.h:791