Fabcoin Core  0.16.2
P2P Digital Currency
util.c
Go to the documentation of this file.
1 /*
2  This file is part of cpp-ethereum.
3 
4  cpp-ethereum is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  cpp-ethereum is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
16 */
21 #include <stdarg.h>
22 #include <stdio.h>
23 #include "util.h"
24 
25 #ifdef _MSC_VER
26 
27 // foward declare without all of Windows.h
28 __declspec(dllimport) void __stdcall OutputDebugStringA(const char* lpOutputString);
29 
30 void debugf(const char *str, ...)
31 {
32  va_list args;
33  va_start(args, str);
34 
35  char buf[1<<16];
36  _vsnprintf_s(buf, sizeof(buf), sizeof(buf), str, args);
37  buf[sizeof(buf)-1] = '\0';
38  OutputDebugStringA(buf);
39 }
40 
41 #endif
__declspec(dllimport)
Definition: util_win32.c:26
#define debugf
Definition: util.h:32