ReactOS  0.4.12-dev-102-g4b7f1e0
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 void logmsg(char* string, ...)
8 {
10 
11  FILE* debug_file = fopen("c:\\audiosrv-debug.txt", "a");
12 
13  if (debug_file)
14  {
15  va_start(args, string);
16  vfprintf(debug_file, string, args);
17  va_end(args);
18  fclose(debug_file);
19  }
20  else
21  {
22  char buf[256];
23  va_start(args, string);
24  vsprintf(buf, string, args);
25  OutputDebugStringA(buf);
26  va_end(args);
27  }
28 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define va_end(ap)
Definition: acmsvcex.h:90
char * va_list
Definition: acmsvcex.h:78
void logmsg(char *string,...)
Definition: debug.c:7
_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