Making progress on util::dprintf
This commit is contained in:
@@ -357,6 +357,22 @@ inline eng::string ss(const ARGS & ... args) {
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
||||
|
||||
// dprintf
|
||||
//
|
||||
// Send a debugging message to somewhere that it can be seen. This routine
|
||||
// initially just sends output to stderr. But it can be hooked to send output
|
||||
// somewhere else, like to a debug output window.
|
||||
//
|
||||
// The hook function must be a function that accepts a single line of text. The
|
||||
// hook function will always be passed one line, consisting of printable
|
||||
// characters only. There will be no control characters. The newline is
|
||||
// implied.
|
||||
//
|
||||
void dprintf(const char *format, ...);
|
||||
void hook_dprintf(void (*func)(const char *oneline));
|
||||
|
||||
// A better API than std::setfill, std::hex, std::setw, std::setprecision
|
||||
//
|
||||
// Usage examples:
|
||||
|
||||
Reference in New Issue
Block a user