ReactOS 0.4.16-dev-1667-g359205b
debug.c
Go to the documentation of this file.
1/*
2 * Management of the debugging channels
3 *
4 * Copyright 2000 Alexandre Julliard
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 "wine/config.h"
22#include "wine/port.h"
23
24#include <stdlib.h>
25#include <stdio.h>
26#include <stdarg.h>
27#include <string.h>
28#include <ctype.h>
29#include <excpt.h>
30
31#define WIN32_NO_STATUS
32#include "wine/debug.h"
33#include "wine/library.h"
34
35#include "winternl.h"
36
39
40static const char * const debug_classes[] = { "fixme", "err", "warn", "trace" };
41
42#define MAX_DEBUG_OPTIONS 256
43
44static unsigned char default_flags = (1 << __WINE_DBCL_ERR) | (1 << __WINE_DBCL_FIXME);
45static int nb_debug_options = -1;
47
49
50static void debug_init(void);
51
52
53/* Wine format */
54static int winefmt_default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
55 const char *file, const char *func, const int line, const char *format, va_list args );
56/* ReactOS format (default) */
57static int rosfmt_default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
58 const char *file, const char *func, const int line, const char *format, va_list args );
59/* Extended format */
60static int extfmt_default_dbg_vlog( enum __wine_debug_class cls, struct __wine_debug_channel *channel,
61 const char *file, const char *func, const int line, const char *format, va_list args );
62
63
64static int __cdecl cmp_name( const void *p1, const void *p2 )
65{
66 const char *name = p1;
67 const struct __wine_debug_channel *chan = p2;
68 return strcmp( name, chan->name );
69}
70
71/* get the flags to use for a given channel, possibly setting them too in case of lazy init */
72unsigned char __wine_dbg_get_channel_flags( struct __wine_debug_channel *channel )
73{
74 if (nb_debug_options == -1) debug_init();
75
77 {
79 sizeof(debug_options[0]), cmp_name );
80 if (opt) return opt->flags;
81 }
82 /* no option for this channel */
83 if (channel->flags & (1 << __WINE_DBCL_INIT)) channel->flags = default_flags;
84 return default_flags;
85}
86
87/* set the flags to use for a given channel; return 0 if the channel is not available to set */
89 unsigned char set, unsigned char clear )
90{
91 if (nb_debug_options == -1) debug_init();
92
94 {
96 sizeof(debug_options[0]), cmp_name );
97 if (opt)
98 {
99 opt->flags = (opt->flags & ~clear) | set;
100 return 1;
101 }
102 }
103 return 0;
104}
105
106/* add a new debug option at the end of the option list */
107static void add_option( const char *name, unsigned char set, unsigned char clear )
108{
109 int min = 0, max = nb_debug_options - 1, pos, res;
110
111 if (!name[0]) /* "all" option */
112 {
113 default_flags = (default_flags & ~clear) | set;
114 return;
115 }
116 if (strlen(name) >= sizeof(debug_options[0].name)) return;
117
118 while (min <= max)
119 {
120 pos = (min + max) / 2;
122 if (!res)
123 {
124 debug_options[pos].flags = (debug_options[pos].flags & ~clear) | set;
125 return;
126 }
127 if (res < 0) max = pos - 1;
128 else min = pos + 1;
129 }
130 if (nb_debug_options >= MAX_DEBUG_OPTIONS) return;
131
132 pos = min;
134 (nb_debug_options - pos) * sizeof(debug_options[0]) );
136 debug_options[pos].flags = (default_flags & ~clear) | set;
138}
139
140/* parse a set of debugging option specifications and add them to the option list */
141static void parse_options( const char *str )
142{
143 char *opt, *next, *options;
144 unsigned int i;
145
146 if (!(options = _strdup(str))) return;
147 for (opt = options; opt; opt = next)
148 {
149 const char *p;
150 unsigned char set = 0, clear = 0;
151
152 if ((next = strchr( opt, ',' ))) *next++ = 0;
153
154 p = opt + strcspn( opt, "+-" );
155 if (!p[0]) p = opt; /* assume it's a debug channel name */
156
157 if (p > opt)
158 {
159 for (i = 0; i < sizeof(debug_classes)/sizeof(debug_classes[0]); i++)
160 {
161 int len = strlen(debug_classes[i]);
162 if (len != (p - opt)) continue;
163 if (!memcmp( opt, debug_classes[i], len )) /* found it */
164 {
165 if (*p == '+') set |= 1 << i;
166 else clear |= 1 << i;
167 break;
168 }
169 }
170 if (i == sizeof(debug_classes)/sizeof(debug_classes[0])) /* bad class name, skip it */
171 continue;
172 }
173 else
174 {
175 if (*p == '-') clear = ~0;
176 else set = ~0;
177 }
178 if (*p == '+' || *p == '-') p++;
179 if (!p[0]) continue;
180
181 if (!strcmp( p, "all" ))
182 default_flags = (default_flags & ~clear) | set;
183 else
184 add_option( p, set, clear );
185 }
186 free( options );
187}
188
189/*
190 * The syntax of the DEBUGCHANNEL environment variable is:
191 * DEBUGCHANNEL=[class]+xxx,[class]-yyy,...
192 *
193 * For example: DEBUGCHANNEL=+all,warn-heap
194 * turns on all messages except warning heap messages.
195 *
196 * The available message classes are: err, warn, fixme, trace.
197 *
198 * In order to select a different debug trace format, the
199 * DEBUGFORMAT environment variable should be used:
200 *
201 * DEBUGFORMAT=fmt
202 *
203 * where fmt is the format name: 'wine', or 'extended' (abbreviation: 'ext').
204 * If no format or an invalid one is specified, the fall-back default format
205 * is used instead.
206 */
207
208/* initialize all options at startup */
209static void debug_init(void)
210{
211 char *wine_debug;
213 /* GetEnvironmentVariableA will change LastError! */
214 DWORD LastError = GetLastError();
215
216 if (nb_debug_options != -1) return; /* already initialized */
218
219 dwLength = GetEnvironmentVariableA("DEBUGCHANNEL", NULL, 0);
220 if (dwLength)
221 {
222 wine_debug = malloc(dwLength);
223 if (wine_debug)
224 {
225 if (GetEnvironmentVariableA("DEBUGCHANNEL", wine_debug, dwLength) < dwLength)
226 parse_options(wine_debug);
227 free(wine_debug);
228 }
229 }
230
231 dwLength = GetEnvironmentVariableA("DEBUGFORMAT", NULL, 0);
232 if (dwLength)
233 {
234 wine_debug = malloc(dwLength);
235 if (wine_debug)
236 {
237 if (GetEnvironmentVariableA("DEBUGFORMAT", wine_debug, dwLength) < dwLength)
238 {
239 if (strcmp(wine_debug, "wine") == 0)
240 {
242 }
243 else
244 if (strcmp(wine_debug, "extended") == 0 ||
245 strcmp(wine_debug, "ext") == 0)
246 {
248 }
249 else
250 {
252 }
253 }
254 free(wine_debug);
255 }
256 }
257
258 SetLastError(LastError);
259}
260
261/* varargs wrapper for funcs.dbg_vprintf */
262int wine_dbg_printf( const char *format, ... )
263{
264 int ret;
266
268 ret = funcs.dbg_vprintf( format, valist );
269 va_end(valist);
270 return ret;
271}
272
273/* printf with temp buffer allocation */
274const char *wine_dbg_sprintf( const char *format, ... )
275{
276 static const int max_size = 200;
277 char *ret;
278 int len;
280
282 ret = funcs.get_temp_buffer( max_size );
284 if (len == -1 || len >= max_size) ret[max_size-1] = 0;
285 else funcs.release_temp_buffer( ret, len + 1 );
286 va_end(valist);
287 return ret;
288}
289
290
291/* varargs wrapper for funcs.dbg_vlog */
293 const char *func, const char *format, ... )
294{
295 int ret;
297
298 if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
299
301 ret = funcs.dbg_vlog( cls, channel, NULL, func, 0, format, valist );
302 va_end(valist);
303 return ret;
304}
305
306
307/* ReactOS compliant debug format wrapper for funcs.dbg_vlog */
309 const char *file, const char *func, const int line, const char *format, ... )
310{
311 int ret;
313
314 if (!(__wine_dbg_get_channel_flags( channel ) & (1 << cls))) return -1;
315
317 ret = funcs.dbg_vlog( cls, channel, file, func, line, format, valist );
318 va_end(valist);
319 return ret;
320}
321
322
323/* allocate some tmp string space */
324/* FIXME: this is not 100% thread-safe */
325static char *get_temp_buffer( size_t size )
326{
327 static char *list[32];
328 static long pos = 0;
329 char *ret;
330 long idx;
331
332 idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
333 if ((ret = realloc( list[idx], size ))) list[idx] = ret;
334 return ret;
335}
336
337
338/* release unused part of the buffer */
339static void release_temp_buffer( char *buffer, size_t size )
340{
341 /* don't bother doing anything */
342}
343
344
345/* default implementation of wine_dbgstr_an */
346static const char *default_dbgstr_an( const char *str, int n )
347{
348 static const char hex[16] = "0123456789abcdef";
349 char *dst, *res;
350 size_t size;
351
352 if (!((ULONG_PTR)str >> 16))
353 {
354 if (!str) return "(null)";
355 res = funcs.get_temp_buffer( 6 );
356 sprintf( res, "#%04x", LOWORD(str) );
357 return res;
358 }
359 if (n == -1) n = strlen(str);
360 if (n < 0) n = 0;
361 size = 10 + min( 300, n * 4 );
362 dst = res = funcs.get_temp_buffer( size );
363 *dst++ = '"';
364 while (n-- > 0 && dst <= res + size - 9)
365 {
366 unsigned char c = *str++;
367 switch (c)
368 {
369 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
370 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
371 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
372 case '"': *dst++ = '\\'; *dst++ = '"'; break;
373 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
374 default:
375 if (c >= ' ' && c <= 126)
376 *dst++ = c;
377 else
378 {
379 *dst++ = '\\';
380 *dst++ = 'x';
381 *dst++ = hex[(c >> 4) & 0x0f];
382 *dst++ = hex[c & 0x0f];
383 }
384 }
385 }
386 *dst++ = '"';
387 if (n > 0)
388 {
389 *dst++ = '.';
390 *dst++ = '.';
391 *dst++ = '.';
392 }
393 *dst++ = 0;
394 funcs.release_temp_buffer( res, dst - res );
395 return res;
396}
397
398
399/* default implementation of wine_dbgstr_wn */
400static const char *default_dbgstr_wn( const WCHAR *str, int n )
401{
402 char *dst, *res;
403 size_t size;
404
405 if (!((ULONG_PTR)str >> 16))
406 {
407 if (!str) return "(null)";
408 res = funcs.get_temp_buffer( 6 );
409 sprintf( res, "#%04x", LOWORD(str) );
410 return res;
411 }
412 if (n == -1)
413 {
414 const WCHAR *end = str;
415 while (*end) end++;
416 n = end - str;
417 }
418 if (n < 0) n = 0;
419 size = 12 + min( 300, n * 5 );
420 dst = res = funcs.get_temp_buffer( size );
421 *dst++ = 'L';
422 *dst++ = '"';
423 while (n-- > 0 && dst <= res + size - 10)
424 {
425 WCHAR c = *str++;
426 switch (c)
427 {
428 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
429 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
430 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
431 case '"': *dst++ = '\\'; *dst++ = '"'; break;
432 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
433 default:
434 if (c >= ' ' && c <= 126)
435 *dst++ = c;
436 else
437 {
438 *dst++ = '\\';
439 sprintf(dst,"%04x",c);
440 dst+=4;
441 }
442 }
443 }
444 *dst++ = '"';
445 if (n > 0)
446 {
447 *dst++ = '.';
448 *dst++ = '.';
449 *dst++ = '.';
450 }
451 *dst++ = 0;
452 funcs.release_temp_buffer( res, dst - res );
453 return res;
454}
455
456
457/* default implementation of wine_dbg_vprintf */
458static int default_dbg_vprintf( const char *format, va_list args )
459{
460 return vDbgPrintExWithPrefix("", -1, 0, format, args);
461}
462
463
464/* default implementation of wine_dbg_vlog */
465/* Wine format */
467 const char *file, const char *func, const int line, const char *format, va_list args )
468{
469 int ret = 0;
470
471 if (TRACE_ON(pid))
474
475 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
476 ret += wine_dbg_printf( "%s:%s:%s ", debug_classes[cls], channel->name, func );
477 if (format)
478 ret += funcs.dbg_vprintf( format, args );
479 return ret;
480}
481/* ReactOS format (default) */
483 const char *file, const char *func, const int line, const char *format, va_list args )
484{
485 int ret = 0;
486
487 if (TRACE_ON(tid))
489
490 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
491 ret += wine_dbg_printf( "%s:", debug_classes[cls] );
492
493 if (file && line)
494 ret += wine_dbg_printf( "(%s:%d) ", file, line );
495 else
496 ret += wine_dbg_printf( "%s:%s: ", channel->name, func );
497
498 if (format)
499 ret += funcs.dbg_vprintf( format, args );
500 return ret;
501}
502/* Extended format */
504 const char *file, const char *func, const int line, const char *format, va_list args )
505{
506 int ret = 0;
507
508 if (TRACE_ON(pid) || TRACE_ON(tid))
509 {
510 ret += wine_dbg_printf( "[%04x:%04x]:",
513 }
514
515 if (cls < sizeof(debug_classes)/sizeof(debug_classes[0]))
516 ret += wine_dbg_printf( "%s:", debug_classes[cls] );
517
518 if (file && line)
519 ret += wine_dbg_printf( "(%s:%d):", file, line );
520
521 ret += wine_dbg_printf( "%s:%s ", channel->name, func );
522
523 if (format)
524 ret += funcs.dbg_vprintf( format, args );
525 return ret;
526}
527
528/* wrappers to use the function pointers */
529
530const char *wine_dbgstr_an( const char * s, int n )
531{
532 return funcs.dbgstr_an(s, n);
533}
534
535const char *wine_dbgstr_wn( const WCHAR *s, int n )
536{
537 return funcs.dbgstr_wn(s, n);
538}
539
541 struct __wine_debug_functions *old_funcs, size_t size )
542{
543 if (old_funcs) memcpy( old_funcs, &funcs, min(sizeof(funcs),size) );
544 if (new_funcs) memcpy( &funcs, new_funcs, min(sizeof(funcs),size) );
545}
546
547static struct __wine_debug_functions funcs =
548{
555};
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strchr(const char *String, int ch)
Definition: utclib.c:501
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
static INT max_size
Definition: history.c:51
#define HandleToULong(h)
Definition: basetsd.h:95
Definition: list.h:37
Definition: _set.h:50
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define _strdup
Definition: debug_ros.c:7
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
unsigned int idx
Definition: utils.c:41
#define SetLastError(x)
Definition: compat.h:752
#define TRACE_ON(x)
Definition: compat.h:75
#define WINE_DECLARE_DEBUG_CHANNEL(x)
Definition: compat.h:45
#define GetEnvironmentVariableA(x, y, z)
Definition: compat.h:754
static DWORD DWORD * dwLength
Definition: fusion.c:86
static LPSTR get_temp_buffer(void)
Definition: dplayx.c:88
return ret
Definition: mutex.c:146
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble s
Definition: gl.h:2039
GLuint GLuint end
Definition: gl.h:1545
GLenum func
Definition: glext.h:6028
GLdouble n
Definition: glext.h:7729
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLenum GLenum dst
Definition: glext.h:6340
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
int hex(char ch)
static TfClientId tid
#define NtCurrentTeb
#define c
Definition: ke_i.h:80
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static va_list valist
Definition: printf.c:46
#define min(a, b)
Definition: monoChain.cc:55
#define LOWORD(l)
Definition: pedump.c:82
static unsigned __int64 next
Definition: rand_nt.c:6
#define list
Definition: rosglue.h:35
#define wine_dbgstr_wn
Definition: testlist.c:2
const WCHAR * str
_Check_return_ _CRTIMP size_t __cdecl strcspn(_In_z_ const char *_Str, _In_z_ const char *_Control)
strcpy
Definition: string.h:131
__wine_debug_class
Definition: debug.h:50
@ __WINE_DBCL_ERR
Definition: debug.h:52
@ __WINE_DBCL_INIT
Definition: debug.h:57
@ __WINE_DBCL_FIXME
Definition: debug.h:51
#define interlocked_xchg_add
Definition: port.h:348
const char * wine_dbg_sprintf(const char *format,...)
Definition: debug.c:274
static void release_temp_buffer(char *buffer, size_t size)
Definition: debug.c:339
int __wine_dbg_set_channel_flags(struct __wine_debug_channel *channel, unsigned char set, unsigned char clear)
Definition: debug.c:88
static const char *const debug_classes[]
Definition: debug.c:40
static void parse_options(const char *str)
Definition: debug.c:141
static unsigned char default_flags
Definition: debug.c:44
int ros_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format,...)
Definition: debug.c:308
static int nb_debug_options
Definition: debug.c:45
static void debug_init(void)
Definition: debug.c:209
const char * wine_dbgstr_an(const char *s, int n)
Definition: debug.c:530
static void add_option(const char *name, unsigned char set, unsigned char clear)
Definition: debug.c:107
static int extfmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
Definition: debug.c:503
#define MAX_DEBUG_OPTIONS
Definition: debug.c:42
static struct __wine_debug_functions funcs
Definition: debug.c:48
static const char * default_dbgstr_an(const char *str, int n)
Definition: debug.c:346
int wine_dbg_printf(const char *format,...)
Definition: debug.c:262
static int winefmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
Definition: debug.c:466
static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]
Definition: debug.c:46
static int default_dbg_vprintf(const char *format, va_list args)
Definition: debug.c:458
static int rosfmt_default_dbg_vlog(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *func, const int line, const char *format, va_list args)
Definition: debug.c:482
void __wine_dbg_set_functions(const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size)
Definition: debug.c:540
static const char * default_dbgstr_wn(const WCHAR *str, int n)
Definition: debug.c:400
static int __cdecl cmp_name(const void *p1, const void *p2)
Definition: debug.c:64
int wine_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *func, const char *format,...)
Definition: debug.c:292
ULONG NTAPI vDbgPrintExWithPrefix(IN PCCH Prefix, IN ULONG ComponentId, IN ULONG Level, IN PCCH Format, IN va_list ap)
Definition: debug.c:167
HANDLE UniqueThread
Definition: compat.h:826
HANDLE UniqueProcess
Definition: compat.h:825
unsigned char flags
Definition: debug.h:62
char name[15]
Definition: debug.h:63
Definition: match.c:390
Definition: fci.c:127
Definition: format.c:58
Definition: parser.c:49
Definition: name.c:39
#define max(a, b)
Definition: svc.c:63
#define bsearch
#define vsnprintf
Definition: tif_win32.c:406
uint32_t ULONG_PTR
Definition: typedefs.h:65
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define __wine_dbg_get_channel_flags(channel)
Definition: wine_debug.c:172
_Out_ PCLIENT_ID ClientId
Definition: kefuncs.h:1151
__wchar_t WCHAR
Definition: xmlstorage.h:180