mirror of
https://github.com/Wind4/vlmcsd.git
synced 2025-05-30 14:35:15 -04:00
vlmcsd-svn1031-2016-10-06-Hotbird64
This commit is contained in:
parent
0b2c216c06
commit
d413afbadf
54 changed files with 2404 additions and 737 deletions
14
output.c
14
output.c
|
@ -2,6 +2,10 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#endif // _DEFAULT_SOURCE
|
||||
|
||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG
|
||||
#define CONFIG "config.h"
|
||||
#endif // CONFIG
|
||||
|
@ -66,8 +70,12 @@ static void vlogger(const char *message, va_list args)
|
|||
|
||||
// We write everything to a string before we really log inside the critical section
|
||||
// so formatting the output can be concurrent
|
||||
int len = strlen(mbstr);
|
||||
vsnprintf(mbstr + len, sizeof(mbstr) - len, message, args);
|
||||
int len = (int)strlen(mbstr);
|
||||
//# if !_MSC_VER
|
||||
vlmcsd_vsnprintf(mbstr + len, sizeof(mbstr) - len, message, args);
|
||||
//# else
|
||||
// wvsprintf(mbstr + len, message, args);
|
||||
//# endif
|
||||
|
||||
lock_mutex(&logmutex);
|
||||
fprintf(log, "%s", mbstr);
|
||||
|
@ -104,7 +112,7 @@ int printerrorf(const char *const fmt, ...)
|
|||
# ifdef IS_LIBRARY
|
||||
|
||||
size_t len = strlen(ErrorMessage);
|
||||
vsnprintf(ErrorMessage + len, MESSAGE_BUFFER_SIZE - len - 1, fmt, arglist);
|
||||
vlmcsd_vsnprintf(ErrorMessage + len, MESSAGE_BUFFER_SIZE - len - 1, fmt, arglist);
|
||||
|
||||
# else // !IS_LIBRARY
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue