ReactOS  0.4.15-dev-499-g1f31905
debug.c
Go to the documentation of this file.
1 /* Service debugging (simply logs to a file) */
2 
3 #include "audiosrv.h"
4 
5 #include <stdio.h>
6 
7 // FIXME: Disabled to work around CORE-16814 (and CORE-16912).
8 // #define ENABLE_LOGMSG_FILE
9 
10 void logmsg(char* string, ...)
11 {
12  va_list args;
13 
14 #ifdef ENABLE_LOGMSG_FILE
15  FILE* debug_file = fopen("c:\\audiosrv-debug.txt", "a");
16 
17  if (debug_file)
18  {
19  va_start(args, string);
20  vfprintf(debug_file, string, args);
21  va_end(args);
22  fclose(debug_file);
23  }
24  else
25 #endif
26  {
27  char buf[256];
28  va_start(args, string);
29  vsprintf(buf, string, args);
31  va_end(args);
32  }
33 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
Definition: match.c:390
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
void logmsg(char *string,...)
Definition: debug.c:10
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define va_start(ap, A)
Definition: acmsvcex.h:91
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
#define args
Definition: format.c:66
void WINAPI SHIM_OBJ_NAME() OutputDebugStringA(LPCSTR lpOutputString)
Definition: ignoredbgout.c:18