MLIB
Loading...
Searching...
No Matches
dprintf.h File Reference

Declaration of mlib::dprintf() function. More...

Go to the source code of this file.

Macros

#define MAX_DPRINTF_CHARS   1024
 maximum message size
 

Functions

bool mlib::dprintf (const char *fmt,...)
 A printf-style function for debug messages.
 

Detailed Description

Declaration of mlib::dprintf() function.

Function Documentation

◆ dprintf()

bool mlib::dprintf ( const char * fmt,
... )

A printf-style function for debug messages.

On Windows platform, the function uses the OutputDebugString API call to generate the output.

On other platforms, output is sent to stderr.

Message length is limited to MAX_DPRINTF_CHARS characters.

Parameters
fmtprint format
Returns
true if successful, false otherwise
Note
Function is thread-safe. Calls from different threads are serialized by a critical section object.